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

{% load_pages %} does not appear to work anymore #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When attempting to render a page as such:

-- in urls.py --
    (r'^topics/physical/?$', topic),

-- in views.py --
def topic(request):
    return render_to_response('topic.html', locals(),
context_instance=RequestContext(request))

-- in topic.html --
{% load cache pages_tags %}
{% load_pages %}
{% for page in pages %}
    {% pages_menu page %}
{% endfor %}

The {% load_pages %} tag does not return an error, yet {{ pages }} is empty.

(Note: no URL for 'topics/physical' exists in the page CMS.)

Original issue reported on code.google.com by intellin...@gmail.com on 10 Sep 2009 at 7:27

GoogleCodeExporter commented 9 years ago
Check that you have any published pages. You should have some pages that can be
displayed in the CMS to have something in the pages variable...

You problem is certainly because the details view called in the tag generate an 
error
404. What do you get if you remove the try: except: pass in the template tag?

Original comment by batiste....@gmail.com on 15 Sep 2009 at 8:02

GoogleCodeExporter commented 9 years ago
I have several published pages in the CMS. When removing the try: except: pass, 
I do
indeed get a 404. Here's the traceback:

http://dpaste.com/93888/

Original comment by intellin...@gmail.com on 15 Sep 2009 at 3:39

GoogleCodeExporter commented 9 years ago
Fixed in revision 693

Original comment by batiste....@gmail.com on 17 Sep 2009 at 8:01

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by intellin...@gmail.com on 17 Sep 2009 at 1:13

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 23 Sep 2009 at 3:06