according to
http://www.djangoproject.com/documentation/request_response/ I can
access to currently logged-in user:
<blockquote>
user
A django.models.auth.users.User object representing the currently
logged-in user.
</blockquote>
But dopcumentation tell no more than that about this.
How can I access to id of current logged-in user in a model?
for example:
from django.models import auth
class Article(meta.Model):
title = meta.CharField(maxlength=255)
content = meta.TextField()
author_name = meta.CharField(maxlength=50, default=auth.users.User.id)
creation_date = meta.DateTimeField('creation date', auto_now_add=True)