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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:29:37+00:00 2026-06-01T20:29:37+00:00

Previously I used to do like this in a template <html> … <script> {%

  • 0

Previously I used to do like this in a template

<html>
...
<script>
 {% include "myapp/includes/jquery-1.7.1.min.js" %}
{% include "myapp/includes/myscript.js" %}
</script>
...

But this causes all the js code to be shown on the page source.

I am not using any Form in my template, so can I use Media class for adding js?

Should I just use <script src=".." or link ref=”..” for adding javascript files? Which is the better way?

  • 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-01T20:29:39+00:00Added an answer on June 1, 2026 at 8:29 pm

    Use <script src="yourscript.js"></script> as usual, without the include template tag.

    Django include template tag is not meant to load JavaScript source. It is used to include a sub template whose markup can access the template context of the including template. Read here.

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

Sidebar

Related Questions

I used this code previously in netbeans 6.9.1 but it does not seem to
Previously I used to write my object interfaces like this: // VERSION 1.0 @interface
I have done something like this. <html> <head> <script type=text/javascript> <!-- function toggleTB(what){ if(what.checked){document.theForm.theTB.disabled=1}
Previously I used IEnumerable<T> type, if I passed collection as parameter of method. But
I don't understand why I'm getting this error. I used the same code previously
I've previously used a CookieContainer with HttpWebRequest and HttpWebResponse sessions, but now, I want
Previously I have only used the Scala templates, but now am I using Java
In a branch of my code, I previously used this NSMutableArray *array1 = [[NSMutableArray
I'm looking into development standards fro JavaScript. I had previously used Doulgas Crockfords Javascript
Previously,I used the window.showModalDialog() function to popup a window: window.showModalDialog(myHtml) In myHtml,there are some

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.