Steve K
Steve K

Reputation: 11369

Django 1.5 and new User model : what about third party apps?

I am making some tests on a development site, currently using Django 1.4. Most Django users are aware that Django 1.5 brings more flexibility in User models.

The project I'm working on uses monkey-patching on the auth.User model, and it works well. This adds useful methods I use everytime.

I have not added any database field on the User model for the sake of compatibility, my code only involves this:

User.__bases__ += (UserPlus,)
User.__unicode__ = UserPlus.__unicode__
UserPlusManager().contribute_to_class(User, 'objects')

with UserPlusManager being a subclass of UserManager.

Now, imagine I want to switch to the new user model. I already have many apps in INSTALLED_APPS, some of them are on unmaintained repos and have models with fields tied to auth.User. I don't see a ny obvious strategy for this kind of configuration.

So, is it really advisable to upgrade to Django 1.5 with this in mind ? If so, what steps should I take ?

Upvotes: 1

Views: 179

Answers (1)

Brandon Taylor
Brandon Taylor

Reputation: 34573

If a construct in Django changes, any third-party apps that leverage that construct would have to react accordingly. If your project is dependent on third-party apps that aren't 1.5 compatible, you should wait to upgrade your project until they are.

Upvotes: 3

Related Questions