[BangPypers] Django admin URL redirect problem in admin page
Asif Jamadar
asif.jamadar at rezayat.net
Wed Nov 30 16:00:47 CET 2011
Dear All,
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?
More information about the BangPypers
mailing list