django-wiki / django-nyt

Notification system for Django with batteries included: Email digests, user settings, JSON API
Apache License 2.0
144 stars 47 forks source link

Keeping settings.AUTH_USER_MODEL into account #5

Closed jandebleser closed 10 years ago

jandebleser commented 10 years ago

Hey, I'm having troubles running the south migrations because I'm not using the standard User model.

This is what I get:

CommandError: One or more models did not validate:
django_nyt.notification: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.

It looks to me this is related or similar to this issue: https://github.com/django-wiki/django-wiki/issues/145 And this was the fix: https://github.com/django-wiki/django-wiki/commit/e506c0941bfed1104394ffc176484c928685080f

Could you have a look please?

Kind regards,

Jan

benjaoming commented 10 years ago

Could you test this?

jandebleser commented 10 years ago

Yes!! That is working. Thank you for your quick response!

benjaoming commented 10 years ago

Cool! It's been done before, but as I don't user custom user models*, I'm quick to forget to make the south migrations compatible. But the script is always nice and handy...

https://gist.github.com/benjaoming/5605160

*and hopefully never will ;)