django-generic-views

Django Generic View - Access to request

Hi, I am using django generic views, how do I get access to the request in my template. URLs: file_objects = { 'queryset' : File.objects.filter(is_good=True), } urlpatterns = patterns('', (r'^files/', 'django.views.generic.list_detail.object_list', dict(file_objects, template_name='files.html')), ) ...

django generic view pagination by item id (not page number)

I love the ease of django's pagination system, but is there anyway to tweak it where it's paginating by item id instead of page number? Because I am ordering in descending order, if there is an update on a page while a user is going through the pages, the ordering is off. For instance, if each page had 3 items Item #1 Item #2 Item #3 ...

Django Generic object_list pagination. Adding instead of replacing arguments

Hi. I'm having some trouble with the django generic object_list function's pagination not really being "smart" enough to compensate my daftness. I'm trying to do a url for listing with optional arguments for page number and category. The url in urls.py looks like this: url(r'^all/(?:(?P<category>[-\w]+)/page-(?P<urlpage>\d+))?/$', ...

Language problem with date based generic views

I've changed the language-code from en-us to es-ar and the url's began to fail. Example: When I click in "Agosto 2010" the URL is "http://mysite.com/weblog/2010/ago/" and the server couldn't finde the page. But if I browse "http://mysite.com/weblog/2010/aug/ the server finds and shows the page. urls.py: urlpatterns = patterns('django....