Commits

Anonymous committed c50f754

minor bug fixes

  • Participants
  • Parent commits 56b14ff

Comments (0)

Files changed (2)

django_flext/loaders.py

     is_usable = True
 
     def __init__(self, *args, **kwargs):
-        super(FlexibleLoader).__init__(*args, **kwargs)
+        super(FlexibleLoader, self).__init__(*args, **kwargs)
         self.reset()
 
     def load_template_source(self, template_name, template_dirs=None):

django_flext/middleware.py

 import django_flext
 import re
 
-MOBILE_DOMAIN_RE = getattr(settings, 'MOBILE_DOMAIN_MATCH')
+from django_flext.loaders import FlexibleLoader
+
+
+MOBILE_DOMAIN_RE = getattr(settings, 'MOBILE_DOMAIN_MATCH', False)
+
 if not MOBILE_DOMAIN_RE:
     MOBILE_DOMAIN_RE = re.compile(r'^(m|mobile)\.')
 if isinstance(MOBILE_DOMAIN_RE, basestring):
         if not host:
             return
         if MOBILE_DOMAIN_RE.search(host):
-            django_flext.add_dirs(MOBILE_TEMPLATE_DIRS)
+            django_flext.add_dirs(self, MOBILE_TEMPLATE_DIRS)