I currently have all my web based files (.html .css. js) in one directory ('templates/static/'). My apps are obviously in their own directory. I would l开发者_开发百科ike to have .html file specific to forms in their respective apps directories for continuities sake (otherwise I'm constantly traversing two directory structures while working on only one model. Doesn't make sense to me!). Can I do this? Would MEDIA_ROOT take a list?
Have a look at django.contrib.staticfiles
(which is new in Django 1.3). This is exactly the use case this app is made for. If you can't use Django 1.3, django-staticfiles is essentially the same code as django.contrib.staticfiles
, usable as a 3rd party app.
精彩评论