Jump to content

Django for Designers: Difference between revisions

→‎Static files: Add a note that I think we should 'move' not 'copy' the files
imported>Paulproteus
(→‎Static files: Improved indenting)
imported>Paulproteus
(→‎Static files: Add a note that I think we should 'move' not 'copy' the files)
Line 574:
$ cp -r static/ myproject/bookmarks/static/
</source>
 
<pre>
TODO/FIXME: Asheesh notes:
Wouldn't it be better to move them, to avoid confusion?
(that way, people see there's no magic to the original provided paths)
Downsides of move are that you have to tell people to 'git mv'
(but I think that's okay)
(and can make that change)
Also the way you have it, you make a static/static/ which will be ugly.
I'd also suggest providing the files not in static/ but in sample-static-files/ or something else that seems more "made by humans for humans" and less close to "made by humans for the framework to serve"
</pre>
 
Django automatically looks for a folder named 'static' inside any of your Django apps. You can also put static files in other places, such as inside /myproject/ directly. To do that, you would need to add the absolute path of the folder to STATICFILES_DIRS in settings.py.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.