Re: relative links to css, images, javascript -> problem

2010-03-08 Thread Dylan Evans
I use a STATIC variable in templates which i set in settings.py which points to the appropriate server or path. So the link is and STATIC is something like STATIC="192.168.1.5:8001" Of course i use lighttpd for static files On Mon, Mar 8, 2010 at 10:05 PM, Martin N. wrote: > I encountered probl

Re: relative links to css, images, javascript -> problem

2010-03-08 Thread Carlos Ricardo Santos
I Just add a "site_media" path to urls.py *site_media = os.path.join( os.path.dirname(__file__), 'site_media' )* *(r'^site_media/(?P.*)$', 'django.views.static.serve', { 'document_root': site_media }),* Add to settings.py: *MEDIA_URL = '/site_media/'* and then: ** * * * * On 8 March 2010 12:0

relative links to css, images, javascript -> problem

2010-03-08 Thread Martin N.
I encountered problems when I try to adopt HTML page layouts into django templates. These HTML files often reference their CSS files like or because they expect these files (and images, javascript, ...) in a location relative to the current HTML document. Can I use such HTML and CSS in django w

strange javascript problem at IE

2009-09-18 Thread Oguz Yarimtepe
Hi all, I am having problems on executing the javascripts. At my django app, i added this simple script to my base.html. alert("ok"); I added these lines just after the body part by expecting to see an "ok" alert message at the load of the first page of the application. The code is worki

strange javascript problem at IE

2009-09-18 Thread Oguz Yarimtepe
Hi all, I am having problems on executing the javascripts. At my django app, i added this simple script to my base.html. alert("ok"); I added these lines just after the body part by expecting to see an "ok" alert message at the load of the first page of the application. The code is worki

Re: javascript problem

2009-09-18 Thread David De La Harpe Golden
Oguz Yarimtepe wrote: > not django: I think,you are using the "Prototype" javascript framework? IIRC you _really_ should be using Event.observe(window,'load', function () { ... }); to do stuff the "prototype way". http://www.prototypejs.org/api/event/observe Dunno if that's the actual issue (I

javascript problem

2009-09-17 Thread Oguz Yarimtepe
Hi, At my application i have ben working quiete fine but when i tested my app, i saw that there is a problem about the function i am onlloading at the body part. So i have something as below: This function is adding an onchange event to a form element (a select indeed). When i select some

Re: i18n javascript problem

2009-08-18 Thread Antoni Aloy
2009/8/18 caiobos : > > Hello! > My project is alredy working with i18n, but the i18n js doesnt work. > I have created my dir locale at the root of the project, have run > makemessages and it create the djangojs.po correcty. With compile > messages I get the djangojs.mo ok. > The problem is how i

i18n javascript problem

2009-08-18 Thread caiobos
Hello! My project is alredy working with i18n, but the i18n js doesnt work. I have created my dir locale at the root of the project, have run makemessages and it create the djangojs.po correcty. With compile messages I get the djangojs.mo ok. The problem is how i confgure it in URLconf, if i make:

Re: Javascript problem

2009-02-14 Thread arbi
Ok I found it! I used href="..." instead of "src=...". I am very sorry Thx all anyway, it taught me some other things;) On 14 fév, 17:58, arbi wrote: > I still can't find the pb. > My js file looks like that : > > function hello() > { >         alert('hello'); > > } > > do I need to add a : {% b

Re: Javascript problem

2009-02-14 Thread arbi
I still can't find the pb. My js file looks like that : function hello() { alert('hello'); } do I need to add a : {% block reference %} {%endblock %} in this js file, and the same in my html file? What I can't understand, is that my paths are right and my css works... On 14 fév, 01:1

Re: Javascript problem

2009-02-13 Thread felix
actually if you've got firebug on it won't cache at all. it will check if for "not modified" headers and reuse if the server says its not modified. the worst thing is that firefox is very slow with all the gadgets turned on. I use safari + firefox at the same time. just safari for speed. so arbi

Re: Javascript problem

2009-02-13 Thread Briel
Firefox is known to cashe things a lot, this might be the reason why it doesn't load all the stuff. Also you should look at the page source to see if the missing js file is listet. On 13 Feb., 21:14, arbi wrote: > Ok I tryed it, and they say : "test.js is not loaded" in firebug. > I don't see wh

Re: Javascript problem

2009-02-13 Thread arbi
Ok I tryed it, and they say : "test.js is not loaded" in firebug. I don't see what to do next. What is strange also is that my background-body images are loaded on safari (no pb) and not on firefox... Any solution? thx On 13 fév, 18:19, felix wrote: > use Firefox with Firebug installed if you ar

Re: Javascript problem

2009-02-13 Thread felix
use Firefox with Firebug installed if you aren't already. you can then see if you get any 404s and if any of the included files failed with syntax errors or if something happened during javascript runtime to kill it also, I like django-compress quite a bit for css and js felix :crucial-

Re: Javascript problem

2009-02-13 Thread arbi
Thx, but I did this already. In fact i have no problem for a css doc, but problems for a js doc. I don't know why! My css is in "/media/css/css_file.css" and my js is in "/media/js/ test.js". A simple "alert" in my test.js file doesn't work. I don't understand. Any help? Thx! Arbi On 12 fév, 23:2

Re: Javascript problem

2009-02-12 Thread Alex Gaynor
On Thu, Feb 12, 2009 at 5:28 PM, arbi wrote: > > Hi all, > > I am trying to execute a javascript doc to display a google map. The > javascript doc to refer to is "google-map.js". How do I write it in > here ? : > TEMPLATE : > > . > > I tryed many things and it did not work! I read many things, b

Javascript problem

2009-02-12 Thread arbi
Hi all, I am trying to execute a javascript doc to display a google map. The javascript doc to refer to is "google-map.js". How do I write it in here ? : TEMPLATE : . I tryed many things and it did not work! I read many things, but I can't figure out how to solve this pb. Is there an easy solut