Reputation: 758
Django supports adding static files at both the application and project level. Where you add them sort of depends on how tied to your specific assembly of apps they are. That is, are they reusable for anyone using your app, or are they specific to your particular deployment?
My question is do you simply create a static directory at project directory in the case of a project level, and how do you create static directories for specific vs general deployment?
Upvotes: 1
Views: 2523
Reputation: 2153
Quoting django documentation:
Your project will probably also have static assets that aren’t tied to a particular app. In addition to using a static/ directory inside your apps, you can define a list of directories (STATICFILES_DIRS) in your settings file where Django will also look for static files. For example:
STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), '/var/www/static/', ]
Upvotes: 2