Right now I'm working with Django 1.8.17 and What I'm trying to acomplish
is simple override of static files.
STATICFILES_DIRS = (
str(os.path.abspath(os.path.join(SITE_ROOT, 'static_new'))),
str(os.path.abspath(os.path.join(SITE_ROOT, 'static'))),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
my thinking:
I have to sites that need different logo file.
Both directories static and static_new have images/logo.png, but this file
is different.
I need to add logo from static_new and load rest of content from static
(js, css. etc)
This would allow me to create folders with statics -- per site without
changing urls and templates, just collect static would take images from
another dir, other changes are made with
django.contrib.sites.models.get_current_site
Collect static works with *first found* but I have no way to define 'seach
here first behavior'. Also development static and collectstatic don't seem
to search for those files with same order (also I find them both unstable
as once in a while logo is loaded from static_new and mostly from static)
Expected behavior:
when adding new folder to STATICFILES_FINDERS, I can somehow define order
of folders static file finder will go through searching for this item
either as alphabetic order or by explicit order.
('static',2),('static_new',1)
second behavior is similar to list_display and fieldsets in admin views, I
would love to introduce here something like that.
Discussion open.
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/b5fa5a9a-7b1f-4339-96de-5b9e4b1771af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.