On May 4, 5:42 am, "Guillaume Lederrey" <[EMAIL PROTECTED]>
wrote:
> I havent done any functional programming in a long time , but ... isnt
> there a way to use an anonymous function (if that's what it is called)
> and do the wrapper "inline" ? Something like :

Yeah, something like that would work, although tying it into your
example above would look pretty ugly, I'm guessing::

    (r'^test/$', lambda request: HttpResponse('Hello, %s' %
request.user)),

If you're only trying to get the currently logged in user into the
template context, it's already there as ``{{ user }}`` if you're using
generic views [1]. Sorry I didn't mention that in my first reply.

.. [1] 
http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-auth
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to