Commits

Jitendra Chauhan committed 72b9158

integrated mediagenerator

Comments (0)

Files changed (3)

 - url: /media/admin
   static_dir: django/contrib/admin/media
   expiration: '0'
-
+  
+- url: /media
+  static_dir: _generated_media/
+  expiration: '365d'
+  
 - url: /.*
   script: djangoappengine/main/main.py
     'django.contrib.auth',
     'django.contrib.sessions',
     'djangotoolbox',
-
+    'gallery',
+    'mediagenerator', # still testing
     # djangoappengine should come last, so it can override a few manage.py commands
     'djangoappengine',
 )
 
 MIDDLEWARE_CLASSES = (
+    'mediagenerator.middleware.MediaMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.core.context_processors.media',
 )
 
+#----------  mediagenerator ----------------#
+
+
+MEDIA_BUNDLES = (
+    ('main.css',
+        'gallery/css/reset.css',
+        'gallery/css/style.css',
+        'gallery/css/icons/icon.css',
+    ),
+)
+
+# Get project root folder
+_project_root = os.path.dirname(__file__)
+
+# Set global media search paths
+GLOBAL_MEDIA_DIRS = (
+    os.path.join(_project_root, 'static'),
+)
+
+# Set media URL (important: don't forget the trailing slash!).
+# PRODUCTION_MEDIA_URL is used when running manage.py generatemedia
+MEDIA_DEV_MODE = DEBUG
+DEV_MEDIA_URL = '/devmedia/'
+PRODUCTION_MEDIA_URL = '/media/'
+MEDIA_ROOT = os.path.join(_project_root, 'media')
+
+# Configure yuicompressor if available
+YUICOMPRESSOR_PATH = os.path.join(
+    os.path.dirname(_project_root), 'yuicompressor.jar')
+if os.path.exists(YUICOMPRESSOR_PATH):
+    ROOT_MEDIA_FILTERS = {
+        'js': 'mediagenerator.filters.yuicompressor.YUICompressor',
+        'css': 'mediagenerator.filters.yuicompressor.YUICompressor',
+    }
+
+#----------  mediagenerator ----------------#
+
+
 # This test runner captures stdout and associates tracebacks with their
 # corresponding output. Helps a lot with print-debugging.
 TEST_RUNNER = 'djangotoolbox.test.CapturingTestSuiteRunner'
     ('^_ah/warmup$', 'djangoappengine.views.warmup'),
     ('^$', 'django.views.generic.simple.direct_to_template',
      {'template': 'home.html'}),
+    (r'^gallery/', include('gallery.urls')), 
 )