google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

pages #190

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use 
{% load_pages %}
   {% for page in pages %}
      {% pages_menu page %}
   {% endfor %}
in a site wide base template
2. create a view using pagination in an object_list generic view

from django.conf.urls.defaults import *
from django.contrib.auth.models import User

urlpatterns = patterns('django.views.generic.list_detail',
    (r'userlist/$', 'object_list', {
                                      'queryset': User.objects.all(),
                                      'paginate_by': 10,
                                      'template_name': 'test/user_list.html',
                                    }
    ),
)

What is the expected output? What do you see instead?

expect a list paginated

TemplateDoesNotExist at /test/userlist/

test/user_list.html

Request Method:     GET
Request URL:    http://localhost:8000/test/userlist/?page=2
Exception Type:     TemplateDoesNotExist
Exception Value:    

test/user_list.html

problem is:
'pages' is supposed to be an int for pagination

can be fixed by modifiing LoadPagesNode in pages_tags

Are you using the trunk version or a released version of this CMS?
r781

If you can write a test that reproduce the problem, there is better chance
it will be resolved quickly.

Original issue reported on code.google.com by bruno.fe...@gmail.com on 14 Dec 2009 at 4:49

GoogleCodeExporter commented 9 years ago
oops, sorry for the title.

"pages: load_pages <> Paginator conflict" 
would have been nice (but can't change)

Original comment by bruno.fe...@gmail.com on 15 Dec 2009 at 8:25

GoogleCodeExporter commented 9 years ago
We need to rename this variable pages. It far to generic. What about 
pages_navigation?

Original comment by batiste....@gmail.com on 15 Dec 2009 at 9:00

GoogleCodeExporter commented 9 years ago
Seems nice to me :) 

(no conflict with django variable names)

Original comment by bruno.fe...@gmail.com on 15 Dec 2009 at 10:32

GoogleCodeExporter commented 9 years ago
The modification is effective on the github project :

http://github.com/batiste/django-page-cms

Original comment by batiste....@gmail.com on 31 Dec 2009 at 10:30