0

Hello,

I have been working on a website at my college (not coursework) that uses Pylons and Genshi. To avoid Genshi parsing the JavaScript code in a template I moved the JavaScript to a separate file. The problem is I tried putting the .js file in the templates directory (where the HTML it came from is located) and linking it in with the code below, but it did not work.

<head_info>
        <script type="text/javascript" src="javascript_utilities.js">
        </script>
</head_info>

So what I need to know is, where do I place the JavaScript file so that it will properly link in on a website managed by Pylons.

Thanks

Note: I'f you haven't guessed, I am very new at web development.

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by Taywin
0

I don't know Genshi, but normally a library file should be put in a specific folder of the frame work. It is not in the same location where HTML files are. Look for a folder in your frame work where other script are located. If you see a bunch of stylesheet (CSS) files in a folder, the parent of that folder may also contain another folder which is where other javascript files would be located.

0

Some clarification: First, Pylons is the framework, Genshi (A template language) was only the reason for moving the JavaScript. Second, this site is small and the JavaScript that I moved was the only in the whole site and there does not seem to be any separate CSS files.

0

I just got it resolved. I had to put the .js file in the public folder and give the site name and then the name of the file when referencing it.

0

Hmm... So Pylons is the one you need to look at then... Does the frame work has its public folder somewhere? That's where all images, javascript, css files should be located. Is there a folder in Pylons called "static"?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.