Inline object rendering for django, based on django-basic-apps + filters + templates
Project description
Django improved inlines is a version of the inlines app from [django-basic-apps](http://github.com/nathanborror/django-basic-apps/) that has two specific features that I needed:
filter=”” instead of just ids and template=”” instead of just inlines/<app>_<model>.html
That’s it. Thanks to nathanborror for the initial code.
Dependancies
BeautifulSoup [http://www.crummy.com/software/BeautifulSoup/]([http://www.crummy.com/software/BeautifulSoup/]) is required to use the inlines app.
Usage
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/inlines
- An 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”/> <inline type=”app.model” ids=”<some pk>,<some other pk>” />
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 }}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-improved-inlines-0.1.0a.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c104d22ee53bd210f3b16c7e5e170c754086eed1d0697e4a58b13072f2d5df9c |
|
MD5 | a7ba5b295fc17d822c65fe489d9138a2 |
|
BLAKE2b-256 | af40040c91cc1965933a8e1c47116a68c6c21a49223fcca60576a698f155eac9 |