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 7772095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:48:32+00:00 2026-06-01T16:48:32+00:00

I have a query set whose objects I’d like to use to populate a

  • 0

I have a query set whose objects I’d like to use to populate a template. One view I have ends with

return render_to_response('entry.json', {'entry_list':r}, mimetype="application/json; charset=utf-8")

However I’d like to be able to serialise to json with a template like this without having to return a HTTPResponse. In pseudocode, this might be:

render('entry.json', {'entry_list':r}) #returns a string with the template entry.json

Is this possible? If so, how?

  • 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-06-01T16:48:33+00:00Added an answer on June 1, 2026 at 4:48 pm

    Django provides a built in shortcut for this.

    https://docs.djangoproject.com/en/dev/ref/templates/api/#the-render-to-string-shortcut

    I don’t quite understand what you are trying to accomplish, But you can just return JSON as your HTTPResponse. You can serialize objects to jason and return it without the use of any template.

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

Sidebar

Related Questions

I need to have MySQL query like this one: UPDATE table_name SET 1 =
I have a query that returns a result set similar to the one below:
Looking to have a database query set all the instance variables in a class:
I have a Query that the datasources it is set to can change dynamically.
I have such a query: UPDATE `user` SET mail='abc@abc' WHERE id = IF((SELECT admin
I have this query which returns a result set with Date(column) as nvarchar datatype.
I have a query sortable collection of images, ie. the items is set to
I have this SQL update query: UPDATE table1 SET table1.field1 = 1 WHERE table1.id
I have the following query: DECLARE @Region VARCHAR(MAX) SET @Region = '' SELECT @Region
I have an index whose documents have two fields (actually more like 800 fields

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.