Created
February 5, 2012 20:59
-
-
Save stefanfoulis/1747913 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Just a quick hack to collect all "media" directories in INSTALLED_APPS instead | |
| of only the "static" directories. | |
| add this to your settings: | |
| STATICFILES_FINDERS = ( | |
| "django.contrib.staticfiles.finders.FileSystemFinder", | |
| "django.contrib.staticfiles.finders.AppDirectoriesFinder", | |
| "myproject.media_staticfiles_finder.AppDirectoriesFinderAsMedia", | |
| ) | |
| """ | |
| from django.contrib.staticfiles.finders import AppDirectoriesFinder | |
| from django.contrib.staticfiles.storage import AppStaticStorage | |
| class AppStaticStorageMedia(AppStaticStorage): | |
| source_dir = 'media' | |
| class AppDirectoriesFinderAsMedia(AppDirectoriesFinder): | |
| storage_class = AppStaticStorageMedia |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment