Ian Wilson wrote: >Well okay I am just winging it still but what version of Turbogears do you >have? > >Have you altered your sicer-start.py project file at all? > >I am running TurboGears-1.0b1. > >You could try manually putting that string in there like this(I don't >do this tho): > >static_filter.dir = "/path/to/project/static" > >An example from one of my projects would be something like this: >static_filter.dir = "/home/ian/workspace/busysignal/busysignal/static" > > > Yes, now it works. Thank you Ian. :-)
I' m using also TurboGears-1.0b1 I wonder where to define the top_level_dir variable. I suppose tg guess it using... pwd + autoreload.package I don't like this constant definition of static_filter.dir. :-\ anyway... j >-Ian > >On 10/31/06, jose <[EMAIL PROTECTED]> wrote: > > >>Traceback (most recent call last): >> File "./sicer-start.py", line 21, in ? >> cherrypy.config.update(file="dev.cfg") >> File >>"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/config.py", >>line 77, in update >> updateMap.update(dict_from_config_file(file)) >> File >>"/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/config.py", >>line 252, in dict_from_config_file >> value = configParser.get(section, option, raw, vars) >> File "/usr/lib/python2.4/ConfigParser.py", line 525, in get >> return self._interpolate(section, option, value, d) >> File "/usr/lib/python2.4/ConfigParser.py", line 570, in _interpolate >> raise InterpolationMissingOptionError( >>ConfigParser.InterpolationMissingOptionError: Bad value substitution: >> section: [/static] >> option : static_filter.dir >> key : top_level_dir >> rawval : "%(top_level_dir)s/static" >> >>Ian Wilson wrote: >> >> >> >>>You don't need to fill in the variable since TurboGears will fill it >>>for you. This is exactly what I have in mine: >>> >>>static_filter.dir = "%(top_level_dir)s/static" >>> >>>Try putting that in and tell me what happens. >>> >>>-Ian >>> >>>On 10/31/06, jose <[EMAIL PROTECTED]> wrote: >>> >>> >>> >>> >>>>I suppose it is a problem with the path. >>>>I copied the javascript file into a system forlder like this: >>>> <script type="text/javascript" src= >>>>"/tg_widgets/turbogears.widgets/calendar/help.js"></script> >>>>and it works perfectly, but <script type="text/javascript" >>>>src="/static/javascript/help.js"></script> >>>> >>>>may be I have to define it into dev.cfg like: >>>> >>>>[/static] >>>> >>>>static_filter.on = True >>>>static_filter.dir = "%(top_level_dir)s/static" >>>> >>>>what top_level_dir variable should contain? >>>> >>>>jo >>>> >>>> >>>>Ian Wilson wrote: >>>> >>>> >>>> >>>> >>>> >>>>>What do you mean by doesn't work? The file isn't being included or >>>>>the function has errors? >>>>> >>>>>I"ll just guess the file isn't being included. What happens when you >>>>>go directly to the file in the browser? >>>>> >>>>>For example if you are running your server at localhost:8080 then try >>>>>going to >>>>>http://localhost:8080/static/javascript/help.js >>>>> >>>>>The file should show up. If it does not then the file isn't being >>>>>found and maybe you should check that the name and permissions of the >>>>>file are correct. >>>>> >>>>>Also I think you should have this in either your app.cfg(mine is >>>>>located in /project/config/app.cfg or your dev.cfg/prod.cfg located in >>>>>your project's root directory. >>>>> >>>>>[/static] >>>>>static_filter.on = True >>>>>static_filter.dir = "%(top_level_dir)s/static" >>>>> >>>>>Good luck. >>>>> >>>>>-Ian >>>>> >>>>>On 10/30/06, Jose Soares <[EMAIL PROTECTED]> wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>Hi all, >>>>>> >>>>>>May someone help me calling javascript functions? >>>>>> >>>>>>In my edit.kid I would like to insert a javascript function like this: >>>>>><script> >>>>>>function help(){ >>>>>> alert ('Ciao') >>>>>>} >>>>>></script> >>>>>> >>>>>>This one works, but if I move the function to a file into >>>>>>myproject/static/javascript/help.js >>>>>>it doesn't work anymore. >>>>>> >>>>>>This is my definition in my edit.kid: >>>>>><head> >>>>>><script type="text/javascript" src="/static/javascript/help.js"></script> >>>>>></head> >>>>>> >>>>>>What's wrong with it? >>>>>> >>>>>>jo >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >> > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

