0

My template zone1map.htmlhas the dependency of matrix.js I am getting Error:[02/Feb/2016 13:09:07] "GET /v3app/zone1 HTTP/1.1" 200 10513 Not Found: /v3app/matrix.js . However matrix.js is located in V3/v3app, templates folder is in V3, My view code is:

def zone1(request):
    temp=controller.workDB()
    array=[]
    while temp:
        string = temp.pop()
        string1 = string.to_JSON()
        array.append(string1)
     fileDes=""
     return render_to_response('zone1map.html', {"JSON": json.dumps(array), "fileDes":fileDes})

call inside zone1map.html <script src="matrix.js"></script>

1

1 Answer 1

2

You should serve the js as a static file from a separate folder. Django manages these files in a special way. This is documented here. An advantage of doing it this way, is it allows a 'dumb' webserver to serve these files on deployment.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.