Skip to content

huandzh/Django-Block-Render

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Render a block from any template.

This is from Snippet 942 Which in turn was adapted from 769

Changes I've made:

  1. Reformat code style to PEP-8 (in progress; I'm learning).
  2. Fix problem with nested {% extends %} in django 1.3+, as per this comment on the 942 snippet.
  3. Refactor _render_template_block_nodelist for neater handling of exceptions (todo)

The description in snippet 769 has some usage examples, and this StackOverflow thread also provides an example.

About

Render just one block from a template, useful for AJAX (originally from django snippets 769 and 942)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%