Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Django 1.5 custom user model not supported #592

dtougas opened this Issue · 8 comments

4 participants


I am running Django 1.5, Mezzanine 1.4.3, and I am using a custom user model defined in my The South migration core:0004_set_site_permissions fails in this situation because it requires the auth.User model.


Thanks Damien. I suspected this would be an issue and at this point I'm not sure what the solution will be.

Meanwhile you can certainly make use of the approach with Profile models, which Mezzanine is actually built around.


I thought about taking that approach, but since this is a new site in early development and the Profile model is now deprecated, that I might try the new "blessed" way. Perhaps this is too bleeding edge :-)


At this stage I can at least say that by using a profile model, there will be an upgrade path with Mezzanine, since Mezzanine's accounts app has made heavy use of it for quite some time, with production sites in place using that feature.

I can't say for certain what that will look like, but one path that may pan out would be:

  • We can't support custom user models due to a fundamental incompatibility with South.
  • Profile models are removed from Django 1.6, which we'll need to support.

If that turns out to be the case, we may end up implementing our own way of using a Profile style model, which could just involve removing references to user.get_profile and providing our own way of doing that.


Thanks Stephen. I guess for now I will stick with the Profile model then, so that I can take full advantage of Mezzanine's accounts app.


Is it just this one migration that's broken? If this were fixed, would Mezzanine work with a custom user model, or is there something else preventing that?


I don't know for sure. Most likely the accounts app wouldn't work right though, as it depends on a profile class.


Maybe there can be a management command that does this instead of a migration? If I am reading it correctly, this migration does the following:

  1. Collects all the Site objects
  2. Adds those sites to the SitePermissions of each user.

In my use case, I'm adding Mezzanine to a project that already exists and has a custom user model. I don't have my Site objects set up yet anyway, so this migration is likely only going to reflect the Site objects that existed at the time of migration, not the Site objects that will exist when I'm done. Same goes for the users.


Fixed in a9ea147

@stephenmcd stephenmcd closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.