jezdez / django-staticfiles

[Unmaintained] A Django app that provides helpers for serving static files, used in Django and Pinax.

Home Page:http://django-staticfiles.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix ImportError on Django 1.5.5

streeter opened this issue · 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.

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 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 yeah, that seems reasonable to me.

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 - #17

@jezdez is there any way to solved my problem ?