python - Django override template static file location -
If I override templates for an installed app, then I Html file to Will I put them in Ex application is given the notification name: The following are two architectures that can be used: A which you have described above: / template - Store all templates of the project with the folder ap_name to store application specific templates / static - Application specific templates Store all statics of the project with the folder ap_name to store It is fully in use that you will know where All of the are your project's templates and static files. This is also easy to manage and the low potential name contradictory. B. Store templates and statics in specific applications: Template - Store Only Project Level Samples eg Base.html, 404.html etc APP_NAME & gt; / Templates - Store all templates related to that specific app. Still - Store only project level statuses Favicon.ico etc. app_name / static - Store all the statics related to that specific app. If you want Create a standalone app , which can be used independently < Li> But in this case there are more possibilities of name conflicts , so you have to follow some naming conventions like the prefix 'APP_NAM_' some other before template names. (& Lt ; App_name & gt; / templates) STATICFILES_DIRS = (& lt; app_name & gt; / static) And you should run ./bin/answer.py collectstatic To work in the production mode for your situation (i.e. DEBUG = False) / templates / appname / / code>. I'm wondering where is the appropriate place to store static files for those override templates?
/ common_static / appname ? Or is there a better place or way to override better templates at once?
A "???" ??? A generalist One ???? One ???? Line Notifications "One" CSS One ???? One ???? One ???? Line Styles.css A "One" ???? Line Line Js one ???? One ???? Line Line anim.js a ???? One ???? Line Templates one ???? One ???? One ???? Line Base.htmlA "A" ??? Line Notifications "A" file1.html A "A" ??? Line There are several ways to store templates and statics in Django: file2.html
Comments
Post a Comment