Skip to content
Browse files

Merge pull request #10 from tswicegood/work-with-1.4

Adjust the settings reset to work with Django 1.4
  • Loading branch information...
2 parents c5cfd77 + ad346d7 commit faec695dd26ed646c48dd655e25bb44d44635572 @tswicegood tswicegood committed Mar 23, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 armstrong/dev/virtualdjango/base.py
View
12 armstrong/dev/virtualdjango/base.py
@@ -1,3 +1,4 @@
+import django
import os, sys
DEFAULT_SETTINGS = {
@@ -25,8 +26,17 @@ def configure_settings(self, customizations, reset=True):
settings = self.settings
if reset:
- settings._wrapped = None
+ self.reset_settings(settings)
settings.configure(**custom_settings)
+
+ def reset_settings(self, settings):
+ if django.VERSION[:2] == (1, 3):
+ settings._wrapped = None
+ return
+
+ # This is the way to reset settings going forward
+ from django.utils.functional import empty
+ settings._wrapped = empty
@property
def settings(self):

0 comments on commit faec695

Please sign in to comment.
Something went wrong with that request. Please try again.