Django
The web framework for perfectionists with deadlines.
Overview
Download
Documentation
News
Community
Code
Issues
About
♥ Donate
Issues
GitHub Login
DjangoProject Login
Preferences
API
View Tickets
Reports
Timeline
Wiki
Search
Context Navigation
Back to Ticket #17419
Ticket #17419
: json.py
File json.py,
222 bytes
(added by
Lau Bech Lauritzen
,
10 years ago
)
JSON template tag
Line
1
from
django
import
template
2
from
django.utils
import
simplejson
3
from
django.utils.safestring
import
mark_safe
4
5
register
=
template
.
Library
()
6
7
@register
.
filter
8
def
json
(
value
):
9
return
mark_safe
(
simplejson
.
dumps
(
value
))
Download in other formats:
Original Format
Back to Top