django-staticfiles icon indicating copy to clipboard operation
django-staticfiles copied to clipboard

Fix ImportError on Django 1.5.5

Open streeter opened this issue 10 years ago • 4 comments

In Django 1.5.5, WSGIServerException was removed. Because that was removed, the runserver command can no longer import the Exception.

I'm not sure what you think the best way to fix this would be, as the django-staticfiles runserver command tries to pretty-print the exception, but I'm happy to create the pull request if you've got a preference.

streeter avatar Oct 29 '13 04:10 streeter

So I found out why we were using django-staticfiles on Django 1.5. We wanted the staticfiles features in 1.4, so we needed the backport of the Django 1.5 version (which this is). In addition, we were using STATICFILES_IGNORE_PATTERNS for a couple files. I've since removed those files from the repo and migrated to using the contrib app. But It'd be great to have support for STATICFILES_IGNORE_PATTERNS in contrib.

streeter avatar Oct 29 '13 23:10 streeter

@streeter The contrib app contains a --ignore management command option, which should be enough. Introducing any kind of setting is seen as a step backwards for Django.

jezdez avatar Nov 03 '13 20:11 jezdez

@jezdez yeah, that seems reasonable to me.

streeter avatar Nov 04 '13 05:11 streeter

I am using Django 1.6.1, STATICFILES_IGNORE_PATTERNS is not also working here.

@jezdez you said --ignore is enough, but based on my app, I would like to set some directory dynamically while run collectstatci. for an example -

static / 
         x/
               css/
               js/
               img/
         y/
              css / 
              js/ 
              img/
         z/
              css/
              js/
             img /

Where x, y, z is my specific website. Like this way I have 100 more directory.

When I run the collectstatic command, its getting error which is mentioned is here - https://github.com/jezdez/django-staticfiles/pull/17

@jezdez is there any way to solved my problem ?

raianul avatar Feb 28 '14 18:02 raianul