How to access HttpRequest from urls.py in Django 1.2
I need to do the same thing asked in How to access HttpRequest from urls.py in Django but using version 1.2. Sorry, is what I have. I don't want to clutter the urls.py, so the two solutions given are not valid fo开发者_如何学Pythonr me :)
Thank you very much for your time.
from django.views.generic.list_detail import object_list
url('^URL_HERE/(?P<object_id>\d+)$', lambda request, *a, **k: object_detail(request, *a,
queryset=MyModel.objects.filter(user=request.user),
template="myapp/mytmplate.html", **k) )
精彩评论