This email from Beorn:

Beorn wrote:

Ruby's more extensive skeleton isn't all bad: Ruby generates a lot of
empty directories that actually "sell" the notion that this is a
framework that can grow with you and has best practices for testing,
documentation, using AJAX, logging, staging, where to put
vendor-specific stuff, etc.

... encouraged me to humbly propose one tiny improvement that may be considered as such best practice.

- In my project tree I have a directory called 'static' with two subdirectories 'js' and 'css'. They, obviously, contain javascript and CSS files for the project. - Being with all other code in one project directory they are very conviniently stored in svn repository.
- This, as Beorn mentioned, would simply tell "put all your js and css here"
- Web server serving static files is pointed to this 'static' directory which could be documented with an example. - I have a custom setting in my project called STATIC_URL which holds URL pointing to this directory and a custom template tag {% static_ url %} which I use like <style href="{% static_url %}css/main.css" .../>. Such thing (pretty common I beleive) would be nice to have in default tags.

One concern that my project is single-app and I didn't think too much about how it would scale with many apps. My first thought is too make it similar to templates and keep it in main project tree like this:

static/
   app_name/
       css/
       js/

Thoughts?

Reply via email to