Commits

offline  committed 4fd7e6a

Automated commit message

  • Participants
  • Parent commits b858b41

Comments (0)

Files changed (1)

     * get_config function - get settings from django.conf if exists, return default value otherwise.
     * AutoOneToOne field - creates related object on first call if it doesnt exists yet.
     * HttpResponseReload - reload and stay on same page from where request was made.
-
+    * StaticServer middleware - instead of configuring urls.py, just add this middleware and it will serve you static files
 
 === Installation instruction ===
 
 
 ADMIN_EMAIL = get_config('ADMIN_EMAIL', 'default@email.com')
 
-}}}
+}}}
+
+
+=== StaticServer middleware ===
+
+Add this middleware as first item in MIDDLEWARE_CLASSES
+
+example:
+{{{
+#!python
+
+MIDDLEWARE_CLASSES = (
+    'annoying.middlewares.StaticServe',
+    'django.middleware.common.CommonMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',              
+    'django.middleware.doc.XViewMiddleware',               
+    'django.contrib.auth.middleware.AuthenticationMiddleware',                    
+)                  
+
+}}}
+
+It will serve static files in debug mode. Also it helps when you debug one of you middlewares by responding to static requests before they get to debuged middleware and will save you from typing 100 times "continue".