Thanks Bryan:
i will try to do that.
and i will be glad if i u can post ur app
thanks.
--~--~-~--~~~---~--~~
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@google
You can import User from django.contrib.auth.models
The save method of the Person class needs to create a User object
programatically, e.g. User.objects.create_user(username, email,
password)
Then you can call super(Person, self).save()
This should give you enough to figure out the rest, but if
hi
i have create the a save method, to add the user. but the user cannot
be accessed from the person class. this is the code any suggestion to
correct it:
from django.db import models
import datetime
class Persons (models.Model):
user = models.OneToOneField(Users)
firstName = models.Char
1. Override the save() method in your person class to create a user
object if one does not yet exist.
2. Try "True" with a capital T.
3. Should be solved by point 1.
Hope this helps :)
Bryan
--~--~-~--~~~---~--~~
You received this message because you are subsc
Hi:
i am trying to establish a one to one relationship between 2 tables, i
am using the
OneToOneFields in the models.py, this is working in the first time.
but the problems are as follows:
1) how can i force the person to create a user every time? (person and
user are the 2 tables in the database)
5 matches
Mail list logo