Awesome. Thanks ...
On Feb 5, 1:00 am, r_f_d <[EMAIL PROTECTED]> wrote:
> Sure, you can do it, with two (at least) ways, one is to put this into
> your model so it automatically happens, search the documentation or
> users group for threadlocals middleware. The other way is to simply
> put it in
>
> When someone is creating a new Article in the admin app I want the new
> Article's author field to be the user's id.
>
> Is that possible ?
See: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
-Rajesh D
--~--~-~--~~~---~--~~
You received this m
Sure, you can do it, with two (at least) ways, one is to put this into
your model so it automatically happens, search the documentation or
users group for threadlocals middleware. The other way is to simply
put it into your view as all views get the request, request.user will
provide you with wha
I need the default value of a field in a model to be the id of the
user creating the new instance of the object the model is modeling
( am I making sense at all?)
i.e. :
class Article(models.Model):
category = models.ForeignKey(Category)
title = models.CharField(max_length=200)
sub_ti
4 matches
Mail list logo