Django Userena Problem
Hi all,
I am using Django-userena for my registration process. I made a
custome model in a app called 'users'. However since custom model is
not handled by syncdb, I am using south. I tried to migrate but got
this error instead.
django.db.utils.DatabaseError: relation "users_userprofile" already exists
however when I am trying to signin into my system, I am getting this error
relation "users_profile" does not exist
I guess I am missing something out here, Any kind of help/pointers or
docs will be of great use.
My models.py looks something like this :
class Profile(models.Model):
GENDER_CHOICES =(
(1, _('Male')),
(2, _('Female')),
)
user = models.OneToOneField(User,
unique=True,
verbose_name =('user'),
related_name = 'profile')
gender = models.PositiveSmallIntegerField(_('gender'),
choices=GENDER_CHOICES,
blank = True,
null=True)
website = models.URLField(_('website'), blank=True, verify_exists=True)
location = models.CharField(_('location'), max_length=255, blank=True)
birth_date = models.DateField(_('birth date'), blank=True, null=True)
about_me = models.TextField(_('about me'), blank = True)
@property
def age(self):
some operations
def create_user_profile(sender, instance, created, **kwargs):
if created:
Profile.objects.create(user=instance)
post_save.connect(create_user_profile, sender=User)
-------------
Regards
Subhodip Biswas
GPG key : FAEA34AB
Server : pgp.mit.edu
http://subhodipbiswas.wordpress.com
http:/www.fedoraproject.org/wiki/SubhodipBiswas
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home