Good afternoon,

I’m currently using Django 1.5.1 and Python 3.3

I have what seems to be an odd error that up until now I’ve been ignoring 
as it hasn’t appeared to harm any functionality of my deployed application.

However - a couple of days ago I wanted to look into adding 
compression/minification of my javascript and css files and looked into 
adding django-pipeline using cssmin and jsmin compression which as I 
understand hooks into staticfiles management when collectstatic is run.

Currently when I run collectstatic when deploying to my test server I get a 
‘TypeError: issubclass() arg 1 must be a class’ error. Yet, when I run my 
application the staticfiles have been collected and put into the correct 
folder (hence why I have been ignoring the error).

Well… pipeline doesn’t appear to be compressing any files and I’m wondering 
what I’ve done. Have I not implemented pipeline properly? Is collectstatic 
working properly or is it shutting down after the error and subsequently 
failing to run pipeline?

Any help would be appreciated - Googling this problem hasn't really helped.

Thanks for your time.

Nesh

ps. My settings.py file is set up as follows:


    # Django settings for UI project.
    import os

    DEBUG = False
    TEMPLATE_DEBUG = DEBUG

    SESSION_LIVES_UNTIL_BROWSER_CLOSED = False

    PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))

    SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'

    CACHES = {
        'default': {
            'BACKEND': 
'django.core.cache.backends.memcached.MemcachedCache',
            'LOCATION': '127.0.0.1:11211',
        }
    }

    #--------------------------------------

    ADMINS = (
    )

    DATABASES = {}
    ALLOWED_HOSTS = ['*']

    TIME_ZONE = 'Europe/London'
    LANGUAGE_CODE = 'en-gb'

    SITE_ID = 1

    # If you set this to False, Django will make some optimizations so as 
not
    # to load the internationalization machinery.
    USE_I18N = True

    # If you set this to False, Django will not format dates, numbers and
    # calendars according to the current locale.
    USE_L10N = True

    # If you set this to False, Django will not use timezone-aware 
datetimes.
    USE_TZ = True

    # Absolute filesystem path to the directory that will hold 
user-uploaded files.
    # Example: "/var/www/example.com/media/"
    MEDIA_ROOT = ''

    # URL that handles the media served from MEDIA_ROOT. Make sure to use a
    # trailing slash.
    # Examples: "http://example.com/media/";, "http://media.example.com/";
    MEDIA_URL = ''

    STATIC_ROOT = '/opt/MyCollectedStaticFiles'
    STATIC_URL = '/static/'

    # Additional locations of static files
    STATICFILES_DIRS = (
        PROJECT_PATH + '/static/',
    )

    STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'

    # List of finder classes that know how to find static files in
    # various locations.
    STATICFILES_FINDERS = (
        'django.contrib.staticfiles.finders.FileSystemFinder',
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
        'django.core.context_processors.static',
    )

    # List of callables that know how to import templates from various 
sources.
    TEMPLATE_LOADERS = (
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
    )

    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'UI.MyMiddleware.MySession',
        'UI.MyMiddleware.MyAuth',
    )

    ROOT_URLCONF = 'UI.urls'

    # Python dotted path to the WSGI application used by Django's runserver.
    WSGI_APPLICATION = 'UI.wsgi.application'

    TEMPLATE_DIRS = (
        # Put strings here, like "/home/html/django_templates" or 
"C:/www/django/templates".
        # Always use forward slashes, even on Windows.
        # Don't forget to use absolute paths, not relative paths.
        PROJECT_PATH + '/Templates/',
        PROJECT_PATH + '/Views/',
    )

    INSTALLED_APPS = (
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
        'pipeline',
    )

    PIPELINE = True
    PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.cssmin.CSSMinCompressor'
    PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor'

    PIPELINE_CSS = {
        'base': {
            'source_filenames': (
              'css/Base/base.css',
              'Themes/base/jquery-ui.css',
              'Themes/base/jquery.ui.all.css'
            ),
            'output_filename': 'css/basecollected.css',
        },
    }

    LOGGING = {
        'version': 1,
        'disable_existing_loggers': False,
        'filters': {
            'require_debug_false': {
                '()': 'django.utils.log.RequireDebugFalse'
            }
        },
        'handlers': {
            'mail_admins': {
                'level': 'ERROR',
                'filters': ['require_debug_false'],
                'class': 'django.utils.log.AdminEmailHandler'
            }
        },
        'loggers': {
            'django.request': {
                'handlers': ['mail_admins'],
                'level': 'ERROR',
                'propagate': True,
            },
        }
    }




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to