Karen, thanks, I think I will follow the way of the custom template
tag.
Bastien


On Apr 22, 4:32 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Wed, Apr 22, 2009 at 5:13 AM, Bastien <bastien.roche...@gmail.com> wrote:
>
> > The last thread about that is quite old, I was wondering if there is
> > any new way to do that?
>
> Likely nothing has changed.  It's still the case that models are independent
> of requests, so trying to tightly couple them can lead to problems.  What it
> request.user when you are manipulating a model from a shell prompt or an
> independent Python script?
>
> > I wrote a method in a model that requires the current user and I use
> > this method in a template so I guess I can't pass any argument, can I?
>
> No, you can't pass a arguments to methods in templates.  Template tags are
> quite easy to write, though, so you might try looking into that.
>
> Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to