Hi, I'm surprised if the search behavior is nondeterministic rather than 
searching STATICFILES_DIRS in order. If that's really the case, it seems 
like a bug. Can you point to the code that causes the nondeterminism?

On Friday, March 10, 2017 at 7:35:25 AM UTC-5, Radosław Orłowski wrote:
>
> 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/86d68df8-38e0-4dad-ab93-6d12e1d2eeba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to