from django.contrib.auth.models import Userfrom django.db.models.signals import post_savefrom django.db import modelsclass UserProfile(models.Model):name = models.TextField()scratchpad = models.TextField()user = models.ForeignKey(User, unique = True)def create_user_profile(sender, instance, created, **kwargs):if created:UserProfile.objects.create(user = instance)post_save.connect(create_user_profile, sender = User)
AUTH_PROFILE_MODULE = 'models.UserProfile'
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 settingsException 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 11:48:23 -0600
![]() |
Christos Jonathan Hayward, an Orthodox Christian author. Author Bio • Email • Facebook • Google Plus • Kindle + Books! • LinkedIn • Twitter • Web • What's New? I invite you to visit my "theology, literature, and other creative works" site. See a random page!
|
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Server time: Tue, 14 Feb 2012 12:17:42 -0600
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 settingException 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
--
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 django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Did you include the module in your settings.py?
Kevin
Please excuse brevity, sent from phone
Do I need to create a separate application under pim and load "<new application>.UserProfile"?
To indicate that this model is the user profile model for a given site, fill in the setting AUTH_PROFILE_MODULE with a string consisting of the following items, separated by a dot:
For example, if the profile model was a class named UserProfile and was defined inside an application named accounts, the appropriate setting would be:
AUTH_PROFILE_MODULE = 'accounts.UserProfile'
--
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/-/v-G9LkGXdEoJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.