django-improved-inlinesInline object rendering for Django, based on django-basic-apps + filters + templates | |
Download |
django-improved-inlines Ranking & Summary
Advertisement
- License:
- BSD License
- Publisher Name:
- Issac Kelly
- Publisher web site:
- http://kellycreativetech.com
django-improved-inlines Tags
django-improved-inlines Description
Inline object rendering for Django, based on django-basic-apps + filters + templates django-improved-inlines is a Django app that has two specific features: * filter="" instead of just ids= and id= * template="" instead of just inlines/< app >_< model >.htmlThat's it. Thanks to nathanborror for the initial code.UsageInstall in INSTALLED_APPS so the templates can be found"improved_inlines"Inlines is a template filter that can be used in conjunction with inline markup to insert content objects into other pieces of content. An example would be inserting a photo into a blog post body.Drop-in replacement for django-basic-inlines/inlinesAn example of the markup is:: < inline type="calendar.event" filter="date__gte=datetime.date.today()" template="calendar/event_inline.html" / >other attribute options are:: < inline type="app.model" id="< some pk >" class="some_class_passed_to_template"/> The type attribute is app_name.model_name and the id is the object id. Pretty simple.In your template you would say:: {% load inlines %} {{ post.body|render_inlines }} Requirements: · Python · Beautiful Soup · Django
django-improved-inlines Related Software