Hi all!
I'm a new python and django user, and this is my first post in this
group!
I'm writing a small app that shows a list of objects after a
successfull login.
I made a custom view to handle authentication and at the same time to
keep the semplicity of the generic view list_detail.obkect_list:
def myobjectlist(request):
if request.user.is_authenticated():
return list_detail.object_list(request,
queryset=myObj.objects.all().order_by('-date), paginate_by=10,
extra_context = {'user' : request.user,})
else:
return HttpResponseRedirect('/login/')
In urls.py, I have a line like this:
(r'^list/$', myobjectlist),
Everything works fine if there is only one page.
But if I click to the link to the second page, that sends me to /list/?
page=2, I get a 404 error.
It seems that the list_detail.object_list wrapped inside the
myobjectlist viw can't handle the querystring parameter and return the
right objects... is this the reason for the error or I'm missing
something?
How can I resolve this?
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---