I am subclassing User in magic-removal, and ran into this gotcha. My
model:
class Account(User):
tel = models.CharField(maxlength = 14, blank=True)
book = models.ManyToManyField(Book, blank=True)
in a view I when I try this:
acc = Account.objects.get(username=test_username)
print "returning type = %s " % type(acc)
it does find the right record, but returns an User instance. it prints:
returning type = <class 'django.contrib.auth.models.User'> JohnDoe
>From there, if I try to use it as an Account instance (such as
"acc.tel") python raises an execption.
Can any one point me in the right direction?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---