Pages

Thursday, August 13, 2009

django and AUTH_PROFILE_MODULE

This has been mentioned all over but for some reason I still made the same mistake everyone else did.

When setting up a user profile in django, the value for AUTH_PROFILE_MODULE should just be the application name then the name of the model. For example, my project's name is "foo", the application is "bar" and the model is UserProfile. It made sense for me to put:
AUTH_PROFILE_MODULE = 'foo.bar.models.UserProfile'

That gave me a "too many values to unpack error". The proper value is
AUTH_PROFILE_MODULE = 'bar.UserProfile'

Hopefully this helps someone out, maybe just me in a few months when I forget what I did.

3 comments: