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

  • SEARCH
  • Home
  • 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 8969817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:38:48+00:00 2026-06-15T17:38:48+00:00

I am using django on the server side and obviously javascript on the client

  • 0

I am using django on the server side and obviously javascript on the client side. Now i want to use the plate template engine on the client.

What’s the best way so serve django templates to the client? We taught of some ways doing that.

  1. Create a view that serves the raw templates.
    • probably not the best method
  2. Copy the needed templates to the static folder.
    • this could be done with a custom static files finder
    • the broser is able to cache the templates
  3. Provide the templates using a template tag which puts the raw template into a javascript variables.
    • templates received this way can not be cached seperatly

is a django app out there that makes this easyer?

The reason i need the templates on the client is, that i want to use the same clients on the server and the client side. When the page is first loaded, the full template is rendered on the server, when navigating trough the application only the needed data gets loaded and the page change is done using push state.

  • 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-15T17:38:49+00:00Added an answer on June 15, 2026 at 5:38 pm

    If you need to be able to have A) dynamically generated plate templates, or B) dynamically created plate templates (e.g., entered into the DB via the admin, etc.), You’ll want to go with 1 (not a bad thing – django is made for serving text content, so as long as you need to have it in a dynamic manner, there’s no problem doing it). 3 is a bad choice, because it means that a browser can’t cache the static resource (if it’s output into each page)… unless you need different plate templates for each page of course.

    If you don’t need A or B from above, I’d just stick the templates in your static dir, as you mentioned (e.g., collectstatic or simply add them to your repo, if they’re a part of your app).

    Regarding an app that makes this easy – you could look at Django Chunks (output a static chunk into a place in the page, like `{% chunk “header-snippet” %}), but I don’t think you need that.

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

Sidebar

Related Questions

I'm deploying my Django app to another host/server using mod_wsgi and MySQLdb. Right now,
I'm using server side processing as per the Django example in DataTables . I
I want to check the useragent using Django inside my template. I know this
I am writing a website using Python / Django, and am currently doing server-side
I'm using Google App Engine, Jquery and Django. I want POST data to be
I'm using jquery form plugin http://jquery.malsup.com/form/#getting-started to upload images to django server side. There
I am working on a Silverlight project that uses Django on the server using
Using django, which is the way to check if data is present? I know
I'm trying to AJAX-ify the Django contact_form app using Django (1.4.2). I want to
I'm trying to write a simple search server, using Django with AJAX. The server

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.