Friday, March 4, 2011

Using Django pagelets...

One issue that I encountered when using django-pagelets is that clicking on the "Add pagelet" would add a pagelet but it would never render within the page. The problem appears to be that we're missing a content_area parameter, which indicates to the create_pagelet view to apply the pagelet to a section. If you look at The Django admin section, it appears to show a default section, but checking things in the SQL database you'll notice that content_area is set to blank.

The solution is to include these changes into django-pagelets:

Or at the very least, put this _render_content_area.html in your own templates/pagelets.html to prevent content_area from ever being blank:

No comments:

Post a Comment