username in the database

0 views
Skip to first unread message

Mary

unread,
Feb 22, 2007, 2:45:19 PM2/22/07
to Django users
hi all;

I am creating a model that will create a table that will contain some
articles that will be filled by admin people so i need to know how can
i create a

field in the database that adds the user name of the logged person
when he add an article

Also how can i create a field that add a time stamp

thank you in advance;

Mary Adel

Honza Král

unread,
Feb 22, 2007, 6:20:36 PM2/22/07
to django...@googlegroups.com
On 2/22/07, Mary <madelg...@gmail.com> wrote:
>
> hi all;
>
> I am creating a model that will create a table that will contain some
> articles that will be filled by admin people so i need to know how can
> i create a
>
> field in the database that adds the user name of the logged person
> when he add an article

see http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser

>
> Also how can i create a field that add a time stamp

just create a DateTimeField( auto_now=True )

>
> thank you in advance;
>
> Mary Adel
>
>
> >
>


--
Honza Král
E-Mail: Honza...@gmail.com
ICQ#: 107471613
Phone: +420 606 678585

Reply all
Reply to author
Forward
0 new messages