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 very much.
--
If you can't believe in God the chances are your God is too small.
Read my blog: http://joshuajava.wordpress.com/
Follow me on twitter: http://twitter.com/jpartogi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---