If I import models, it crashes. The top-level project is pim; under that I have models.py, which contains UserProfile. Specifying pim.UserProfile and pim.models.UserProfile gets two different error messages. Do I need to create a separate application under pim and load "<new application>.UserProfile"?
On Tue, Feb 14, 2012 at 12:32 PM, Kevin Anthony <[email protected]>wrote: > Did you include the module in your settings.py? > > Kevin > Please excuse brevity, sent from phone > On Feb 14, 2012 1:27 PM, "Christos Jonathan Hayward" < > [email protected]> wrote: > >> Thank you, little master and creecode. I tried 'pim.UserProfile' and >> 'pim.models.UserProfile' and they both errored out. With 'pim.UserProfile', >> which it looks like the documentation calls for, I get: >> >> SiteProfileNotAvailable at / >> >> Unable to load the profile model, check AUTH_PROFILE_MODULE in your project >> settings >> >> Request Method: GET Request URL: http://localhost:8000/ Django Version: >> 1.3.1 Exception Type: SiteProfileNotAvailable Exception Value: >> >> Unable to load the profile model, check AUTH_PROFILE_MODULE in your project >> settings >> >> Exception Location: >> /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py >> in get_profile, line 380 Python Executable:/usr/local/bin/python Python >> Version:2.7.0 Python Path: >> >> ['/Users/jonathan/pim', >> >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg', >> >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg', >> '/usr/local/Cellar/python/2.7/lib/python27.zip', >> '/usr/local/Cellar/python/2.7/lib/python2.7', >> '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin', >> '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac', >> '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >> '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk', >> '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old', >> '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload', >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages', >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL', >> '/usr/local/lib/python2.7/site-packages', >> >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info'] >> >> Server time: Tue, 14 Feb 2012 12:17:42 -0600 >> >> >> With 'pim.models.UserProfile' I get a slightly different: >> >> SiteProfileNotAvailable at / >> >> app_label and model_name should be separated by a dot in the >> AUTH_PROFILE_MODULE setting >> >> Request Method: GET Request URL: http://localhost:8000/ Django Version: >> 1.3.1 Exception Type: SiteProfileNotAvailable Exception Value: >> >> app_label and model_name should be separated by a dot in the >> AUTH_PROFILE_MODULE setting >> >> Exception Location: >> /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py >> in get_profile, line 373 Python Executable:/usr/local/bin/python Python >> Version:2.7.0 Python Path: >> >> ['/Users/jonathan/pim', >> >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg', >> >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg', >> '/usr/local/Cellar/python/2.7/lib/python27.zip', >> '/usr/local/Cellar/python/2.7/lib/python2.7', >> '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin', >> '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac', >> '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages', >> '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk', >> '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old', >> '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload', >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages', >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL', >> '/usr/local/lib/python2.7/site-packages', >> >> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info'] >> >> Server time: Tue, 14 Feb 2012 12:25:41 -0600 >> >> >> "pim" is the name of the project. Do I need to create a distinct >> application within that project? >> >> On Tue, Feb 14, 2012 at 12:20 PM, creecode <[email protected]> wrote: >> >>> Hello Jonathan, >>> >>> See the "Storing additional information about >>> users<https://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users>" >>> section in the docs. There it mentions the expected format of >>> AUTH_PROFILE_MODULE. >>> >>> I suspect what you need to do is wrap your UserProfile model up in it's >>> own app if it isn't in one already. Alternately you need to change the >>> "models" in AUTH_PROFILE_MODULE to the name of your app. >>> >>> Let us know if that works for you. >>> >>> Toodle-looooooooo.............. >>> creecode >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/django-users/-/HSX4NGpn66kJ. >>> >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> >> >> -- >> [image: Christos Jonathan Hayward] <http://jonathanscorner.com/> >> Christos Jonathan Hayward, an Orthodox Christian author. >> >> Author Bio <http://jonathanscorner.com/author/> • >> *Email<[email protected]> >> * • Facebook <http://www.facebook.com/christos.jonathan.hayward> • Google >> Plus <http://jonathanscorner.com/plus> • *Kindle + >> Books!*<http://JonathansCorner.com/book-store/> >> • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • >> Twitter<http://twitter.com/JonathansCorner> >> • *Web <http://jonathanscorner.com/>* • What's >> New?<http://jonathanscorner.com/> >> I invite you to visit my "theology, literature, and other creative works" >> site. *See a random page! <http://random.jonathanscorner.com/>* >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- [image: Christos Jonathan Hayward] <http://jonathanscorner.com/> Christos Jonathan Hayward, an Orthodox Christian author. Author Bio <http://jonathanscorner.com/author/> • *Email<[email protected]> * • Facebook <http://www.facebook.com/christos.jonathan.hayward> • Google Plus <http://jonathanscorner.com/plus> • *Kindle + Books!*<http://JonathansCorner.com/book-store/> • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • Twitter<http://twitter.com/JonathansCorner> • *Web <http://jonathanscorner.com/>* • What's New?<http://jonathanscorner.com/> I invite you to visit my "theology, literature, and other creative works" site. *See a random page! <http://random.jonathanscorner.com/>* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

