Permalink
Browse files

Added editor config and fixed django 1.6 compat troubles

  • Loading branch information...
1 parent 9fbd824 commit 05b2b89792f4221485af3b066962d6a48d4599ad @sametmax committed Nov 8, 2013
Showing with 22 additions and 1 deletion.
  1. +17 −0 .editorconfig
  2. +5 −1 django_quicky/utils.py
View
@@ -0,0 +1,17 @@
+# EditorConfig is awesome: http://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+[*]
+indent_style = space
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.py]
+indent_size = 4
+
+[*.{html,js,rb,scss,xml,less,css}]
+indent_size = 2
@@ -8,7 +8,11 @@
import sys
from django.http import HttpResponse
-from django.core.management import setup_environ
+try:
+ from django.core.management import setup_environ
+except ImportError:
+ from django.conf import settings
+ setup_environ = lambda module: settings.configure(**module.__dict__)
__all__ = ['HttpResponseException', 'setting', 'get_client_ip', 'load_config']

0 comments on commit 05b2b89

Please sign in to comment.