users must be able to register and authenticate
django.contrib.auth- the module you need. Be sure to check your custom login form documents .
Each user must have a profile (or a model with all required fields)
You need to install settings.AUTH_PROFILE_MODULEas others note.
, 1.1 1.0. .
django builtin, / -
, ; , " " . django.contrib.auth.models.User django.contrib.auth.models.Group. , , .
EDIT: ( )...
djangobook, django 1.0 ( 1.2, 0.96) , - - ? , , ? .
djangobook ; . , Django 1.1.1; NIS.
, . Django .
, , , ( AUTH_PROFILE_MODULE),
.
, ( , , User -)?
, User.get_profile().
( "" , )?
: save().
signal - , :
from django.db.models.signals import post_save
from django.contrib.auth import User
from myUserProfileApp import UserProfile
def make_user_profile(sender, **kwargs):
if 'created' not in kwargs or not kwargs['created']:
return
profile = UserProfile(user=kwargs["instance"])
profile.save()
post_save.connect(make_user_profile, sender=User, weak=False)
. :
$ ./manage.py shell
>>> from django.contrib.auth import User
>>> from myUserProfileApp import UserProfile
>>> for u in User.objects.all():
... UserProfile(user=u).save()
...
, , :
>>> for u in User.objects.all():
... try:
... UserProfile(user=u).save()
... except:
... pass