Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 17, 2010 14:59:23

Robert S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

JavaScript src files not found.


Hey coders, Where would stuff like .js src files go in a Django powered
Website?
ERROR --> 09:20:08.016: Network: GEThttp://localhost:8000/users/PBUi/mouse.js
ERROR --> 09:20:07.823: Network: GEThttp://localhost:8000/users/sylvester.js

There is many of these files to include for a entire program included in my
home page.
This is in the mySite/templates/users directory in the index.html file.
What is my fundamental design flaw?
--
*Bringing game to younix*
Bust0ut Entertainment ---
PureBreedDefense.com --> TheLinuxGame.com --> PBDefence.com
"Finding the exit without looking"

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 17, 2010 15:08:20

Vovk D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

JavaScript src files not found.


2010/12/17 Robert Steckroth <robertsteckr...@gmail.com>

> Hey coders, Where would stuff like .js src files go in a Django powered
> Website?
> ERROR --> 09:20:08.016: Network: GET
>http://localhost:8000/users/PBUi/mouse.js
> ERROR --> 09:20:07.823: Network: GET
>http://localhost:8000/users/sylvester.js
>
> There is many of these files to include for a entire program included in my
> home page.
> This is in the mySite/templates/users directory in the index.html file.
> What is my fundamental design flaw?
>

if i understand you correctly:
in settings.py theres is a lines
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = /absolute/path
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com";
MEDIA_URL = "/media/"
**so in a template you need specify path to media like this:
{{MEDIA_URL}}path/to/my/cript.js
But keep in mind that this variable must be passed into template via context
processor ("django.core.context_processors.media", ) or directly from view.
As for regular design flow read django manual. There is to much to say in
one letter.
*
Vovk Donets*
python developer

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 18, 2010 15:00:10

Bjørn H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

JavaScript src files not found.


They should be put in your "static" path.

Regards

Bjørn

On 17 Dec., 15:53, Robert Steckroth <robertsteckr...@gmail.com> wrote:
> Hey coders, Where would stuff like .js src files go in a Django powered
> Website?
> ERROR -->  09:20:08.016: Network:
> GEThttp://localhost:8000/users/PBUi/mouse.js
> ERROR --> 09:20:07.823: Network:
> GEThttp://localhost:8000/users/sylvester.js
>
> There is many of these files to include for a entire program included in my
> home page.
> This is in the mySite/templates/users directory in the index.html file.
> What is my fundamental design flaw?
> --
> *Bringing game to younix*
> Bust0ut Entertainment  ---
> PureBreedDefense.com --> TheLinuxGame.com --> PBDefence.com
> "Finding the exit without looking"

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 24th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support