thanks for your help.

2010/7/20 Franklin Einspruch <franklin.einspr...@gmail.com>

> cowboy,
>
> I think you're looking for this:
>
> http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey
>
> Franklin
>
> 2010/7/20 Ian Lewis <ianmle...@gmail.com>:
>  > Hi,
> >
> > On Tue, Jul 20, 2010 at 11:42 AM, pengbo xue <pengbo...@gmail.com>
> wrote:
> >> how can I create tables and foreignkey as below information.
> >>
> >> create a user object "models.User" and include kewords like this,
> >>
> >> username: modify the max_length of username to 32,default is 30.
> >> email:
> >> password:
> >> is_staff:   false
> >> is_active:  true
> >> is_superuser:  false
> >
> > It sounds like you are getting at but there isn't really a good way to
> > change the length of the username field in contrib.auth without
> > modifying Django's source code or implementing your own auth layer.
> >
> > As for the is_staff, is_active, is_superuser fields, do you want to
> > create data in the table? or do you want to set the default value of
> > the fields? It looks like the default values are the same as what you
> > have written here.
> >
> > If you want to create initial data you can do that using fixtures.
> > See: http://docs.djangoproject.com/en/dev/howto/initial-data/
> >
> >> create object "profile" for storaging other info of user:
> >>
> >> nickname:CharField
> >> birthday:DateField
> >> Zone:reliaion zone table
> >> work:relation work table
> >> degree:relation degree table
> >> interest:TextField
> >> agree_open_info:BooleanField
> >
> > For this you'll need to create a model for your user profile and
> > specify it in the AUTH_PROFILE_MODULE setting. You can then access a
> > user's profile using the get_profile() method on the user.
> >
> > See:
> http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
> >
> > Ian
> >
> >
> > --
> > =======================================
> > 株式会社ビープラウド  イアン・ルイス
> > 〒150-0021
> > 東京都渋谷区恵比寿西2-3-2 NSビル6階
> > email: ianmle...@beproud.jp
> > TEL:03-6416-9836
> > FAX:03-6416-9837
> > http://www.beproud.jp/
> > =======================================
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> >
> >
>
>
>
> --
> Art, writing, journal: http://einspruch.com
> Comics: http://themoonfellonme.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
薛鹏博

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to