librelist archives

« back to archive

[flask] Jquery, static files, and views?

[flask] Jquery, static files, and views?

From:
Delilah Parks
Date:
2012-05-17 @ 15:33
What is the best way to manage external files or files that are not in the
"static" folder? I would like for my app to reference a series of jquery
files... or something along the lines of "static/jquery/" type folder
structure. However, I can't get the files to work properly when I reference
them while they are located in the jquery folder (located in the static
directory). What is the best practice for this? How would I link to the
files in my template/Jinja? Overall, I am trying to avoid having too many
files in my static folder.

Re: [flask] Jquery, static files, and views?

From:
Pronoy Chopra
Date:
2012-05-17 @ 15:40
url_for('static', filename='jquery/jquery.js')

Delilah Parks wrote:
>
> What is the best way to manage external files or files that are not in
> the "static" folder? I would like for my app to reference a series of
> jquery files... or something along the lines of "static/jquery/" type
> folder structure. However, I can't get the files to work properly when
> I reference them while they are located in the jquery folder (located
> in the static directory). What is the best practice for this? How
> would I link to the files in my template/Jinja? Overall, I am trying
> to avoid having too many files in my static folder.

Re: [flask] Jquery, static files, and views?

From:
Delilah Parks
Date:
2012-05-17 @ 15:44
thx

On Thu, May 17, 2012 at 11:40 AM, Pronoy Chopra <pronoyc@gmail.com> wrote:

> url_for('static', filename='jquery/jquery.js')
>
> Delilah Parks wrote:
>
>
> What is the best way to manage external files or files that are not in
> the "static" folder? I would like for my app to reference a series of
> jquery files... or something along the lines of "static/jquery/" type
> folder structure. However, I can't get the files to work properly when
> I reference them while they are located in the jquery folder (located
> in the static directory). What is the best practice for this? How
> would I link to the files in my template/Jinja? Overall, I am trying
> to avoid having too many files in my static folder.
>
>