django-improved-inlines icon indicating copy to clipboard operation
django-improved-inlines copied to clipboard

Inline object rendering for django, based on django-basic-apps + filters + templates

======================= Django Improved Inlines

Django improved inlines is a version of the inlines app from django-basic-apps_ that has a few specific features that I needed:

  • filter="" instead of just ids= and id=
  • template="" instead of just inlines/_.html
  • Support for non- tags by prefixing "data-inline-" to type, ids, id, filter

Thanks to nathanborror for the initial code.

Dependancies

  • BeautifulSoup_ is required to use the inlines app.

Usage

Install 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/inlines

An example of the markup is::

other attribute options are::

examples with other tags::

    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 }}

    .. _django-basic-apps: http://github.com/nathanborror/django-basic-apps/ .. _BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/