Skip to main content

Django additions for JSON

Project description


JSON library for working with django + json



To install you can use pip:

pip install django-jsonify

Then add jsonify to django settings.INSTALLED_APPS


If you want to convert varianble in django template, you can use jsonify filter:

{% load jsonify %}

{% block content %} <script type="text/javascript">
    <![CDATA[ var items = {{ items|jsonify }}; ]]></script>
{% endblock %}

If you want to return JSON data from view, you can use @ajax_request decorator

from jsonify.decorators import ajax_request

def my_view(request):
    news = News.objects.all()
    news_titles = [entry.title for entry in news]
    return {'news_titles': news_titles}

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-jsonify, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size django-jsonify-0.3.0.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page