Opppps my bug. It was a mistype in a model. Exception gone now On Tue, Jan 27, 2009 at 8:43 PM, Oleg Oltar <oltarase...@gmail.com> wrote:
> Hi! > I want to add a profile to every user, that I can register in my > application. In future it should contain such fields as avatar, email, > about_me fields > > I found a snippet how to extend django User model: > http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ > > But when added the proposed code to my view: > (so now it looks like this) > from django.contrib.auth.models import User > > > class UserProfile(models.Model): > url = models.URLField > about = models.TextField() > user = models.ForeignKey(User, unique=True) > > > I caught an exception on syncdb > > class UserProfile(models.Model): > File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py", > line 80, in __new__ > new_class.add_to_class(obj_name, obj) > File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py", > line 164, in add_to_class > value.contribute_to_class(cls, name) > TypeError: Error when calling the metaclass bases > unbound method contribute_to_class() must be called with URLField > instance as first argument (got ModelBase instance instead) > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---