Django use this `get_fiels` function to get all files, folders name list https://github.com/django/django/blob/master/django/contrib/staticfiles/utils.py#L21 So it does not have any knowledge about path.
On Monday, January 27, 2014 at 5:54:29 PM UTC-5, Eric Eldredge wrote: > > Hi all, > > I'm working on a project where I want to ignore certain files when running > collectstatic. > > I am having success only when i use 'basename' patterns, such as *.exe or > vendor, but not when trying to match file paths, such as vendor/*.exe. > > It seems the reason i'm not seeing the behavior i expect is because > django.contrib.staticfiles.utils.get_files > <https://github.com/django/django/blob/master/django/contrib/staticfiles/utils.py#L29-L32> > only > checks the ignore patterns on the base names (for both files and > directories), but does not check the full file path. > > Is this the correct behavior, or a bug? If it is the correct behavior, > what is the recommended approach for gaining more fine-grained control over > what is collected by collectstatic? > > Thanks in advance for any consideration. > -- 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 http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e5ff5ac3-4482-4b09-bb22-d0040f4840e2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
