Thanks Alex.
It worked beautifully now.
Regards,
On Mar 20, 12:43 am, Alex Gaynor wrote:
> On Thu, Mar 19, 2009 at 9:32 AM, Joshua Partogi wrote:
>
>
>
>
>
> > Dear all,
>
> > How do I get the current logged in user to be used and inserted to a
On Thu, Mar 19, 2009 at 9:32 AM, Joshua Partogi wrote:
>
> Dear all,
>
> How do I get the current logged in user to be used and inserted to a model?
> from django.db import models
> from django.contrib.auth.models import User
>
> class News(models.Model):
>creator =
Dear all,
How do I get the current logged in user to be used and inserted to a model?
from django.db import models
from django.contrib.auth.models import User
class News(models.Model):
creator = models.ForeignKey(User)
I want the creator field to be the current logged in user.
Thank you
3 matches
Mail list logo