Questions tagged [fanstatic]

Fanstatic: Resource publishing for Pythonistas

From Fanstatic.org:

Fanstatic is a small but powerful framework for the automatic publication of resources on a web page. Think Javascript and CSS. It just serves static content, but it does it really well.

Can you use it in your project? If you use Python, yes: Fanstatic is web-framework agnostic, and will work with any web framework that supports WSGI. Fanstatic is issued under the BSD license.

Why would you need something like Fanstatic? Can’t you just add your static resources to some statically served directory and forget about them? For small projects this is certainly sufficient. But so much more is possible and useful in this modern Javascript-heavy world. Fanstatic is able to offer a lot of powerful features for projects both small and large.

10 questions
5
votes
2 answers

Order of css resources using Fanstatic

I'm trying to import multiple css resources in my own CKAN theme using Fanstatic like this: {% resource 'my_fanstatic_library/b.css' %} {% resource 'my_fanstatic_library/a.css' %} Unfortunately CKAN renders them in alphabetical order:
tschortsch
  • 118
  • 7
2
votes
0 answers

No matter what I do Chrome inspector won't recognise my sass source map

I have tried Inline, file, absolute and relative paths and Chrome is ignoring my source map. I am however using Fanstatic caching but I thought this wouldn't make any difference if I am using an inline source map with absolute paths. I have removed…
1
vote
2 answers

Pyramid - fanstatic application cannot find static resources under apache wsgi module

I have a Pyramid-Fanstatic application that I created using pcreate: pcreate -s starter -s pyramid_fanstatic All works ok if I use /bin/pserve-fanstatic to start the server. However when I use the Apache WSGI module to load the app, a link…
QLands
  • 2,424
  • 5
  • 30
  • 50
1
vote
2 answers

I'm unable to setup Pyramid and the deform_bootstrap?

I've just started working with Pyramid. I'm using PyCharm as an IDE and I've started with the "starter" scaffold. I'm trying to create some nice looking forms. I've installed deform and deform_bootstap. I've managed to get a form to display but it's…
EnergyGeek
  • 271
  • 1
  • 4
  • 14
1
vote
1 answer

How to load js file within IE check block

I am trying to load an external js file using fanstatic. This is how I call the file to be loaded: The problem is when I check the source file, the js file is added inside the tag, but not…
ericg
  • 103
  • 8
0
votes
1 answer

CKAN 2.9 ValueError: Registry initialized :: ckan basic-charts plugins

I am new to ckan. After successfully installing ckan when I went to use some ckan plugins as an example ckan-basiccharts i am getting ValueError. After some research, I understand it's related to web-assets. In basicchart folder, I change the…
0
votes
1 answer

[Ckan]. Can't make Javascript work in CKAN

I'm trying to follow the example reported here: Ckan theming - Javascript in order to understand how I can add some javascript to my pages. Unfortunately, I can't make the example work. I have a theme called theme, and I'd like to modify that one.…
Giulia
  • 1
  • 2
0
votes
1 answer

resource.config order and custom render error doesn't work as expected

I'm trying to use ckanext_reclineview to render the CSV data. I am using ckan2.5.2 running on Windows 7. I am facing the following JS errors while loading the viewer: Uncaught ReferenceError: Backbone is not defined (anonymous function) @…
0
votes
1 answer

Images with Fanstatic and Flask

I got Fanstatic working well with Flask for CSS and JS. The library will allow you to generate hashed file names with a hash. If the hash of click.js is a0sd2lfu12v18fhac4ias0o7if then you can render click-a0sd2lfu12v18fhac4ias0o7if.js in your flask…
Schneems
  • 14,918
  • 9
  • 57
  • 84
0
votes
1 answer

Integrating fanstatic with tornado web?

I'm attempting to integrate fanstatic.org with tornadoweb and was curious if anyone has any prior knowledge or any code that may reflect how this is done? I've been reading the documentation and i believe it can be done since tornado does provide a…
battlemidget
  • 249
  • 1
  • 4
  • 15