In one of my django app, I extended the django User model and created
a new 'UserProfile ' model. But when I'm trying to add new user
through this model in admin page, the URL is not redirecting to
successful page, instead its stopped on 'admin/auth/user/add/?
_popup=1' this URL. (user is created but not redirecting to success
page)
Here is the code
class UserProfile(User):
age = models.CharField(max_length=20, blank=True, null=True)
education = models.CharField(max_length=50, blank=True,
null=True,
choices=EDUCATION_CHOICES)
class TestPopulation(models.Model):
user = models.ManyToManyField(UserProfile, blank=True, null=True)
questionnaire = models.ManyToManyField(Questionnaire, blank=True,
null=True)
def __unicode__(self):
return "%s" % (self.user)
This creating creating the user object in admin page but not
redirecting to successpage, instead its stopped at 'admin/auth/user/
add/?_popup=1'
Any suggestions?
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment