Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 916337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:02:10+00:00 2026-05-15T18:02:10+00:00

from django.utils.simplejson import dumps, loads # -*- coding: utf-8 -*- def index(request): return render_to_response(‘test2/index.html’)

  • 0
  from django.utils.simplejson import dumps, loads
  # -*- coding: utf-8 -*-


 def index(request):
   return render_to_response('test2/index.html')

 def add_lang(request):
   logging.debug("Got request")
   a = request.POST
    logging.debug(a["lang"])
   lang=dumps(a["lang"])
   l = Language(code=lang)
   l.save()
lang=loads(lang)

logging.debug(loads(l.code))
return render_to_response('test2/test21.html', context_instance=RequestContext(request,{'test2': l.code}))

My question is there any way to load the variable back to its original format in the template file.i.e, i want a function similar to loads in template.I do not want to do it in views since there will be a lot of code changes

test21.html

    {{ test2 }}  
     //The above prints"\u0905\u0902\u0917\u094d\u0930\u0947\u091c\u093c\u0940, \u0939\u093f\u0902\u0926" 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:02:11+00:00Added an answer on May 15, 2026 at 6:02 pm

    Not without writing a custom filter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model project_phase : from django.db import models from django.utils import simplejson
Assuming that I have function get_a_color in a Django views.py: from django.utils import simplejson
When using from django.utils import simplejson on objects of types that derive from db.Model
views.py from django.core.context_processors import csrf context.update(csrf(request)) {'csrf_token': <django.utils.functional.__proxy__ object at 0xae0f4ec>} I am trying
I get this error when I use simplejson from django.utils in google app engine
A lot of our modules start with: try: import json except ImportError: from django.utils
I have a Model and ModelForm like: from django.utils.translation import ugettext_lazy as _ class
from django.utils.safestring import * print SafeString('\u3042') print '\u3042' \u3042 \u3042 who can give me
In models.py : from django.db import models from django.utils.translation import ugettext as _ #
from django.contrib.auth.models import User u = User.objects.get(username='test') user.password u'sha1$c6755$66fc32b05c2be8acc9f75eac3d87d3a88f513802 Is reversing this password encryption

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.