Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

put conf.py hack back in place for RTD

  • Loading branch information...
commit 1c1d742867bfb893cfb9825878693220d697c95c 1 parent 73c1142
@wraithan wraithan authored
Showing with 21 additions and 1 deletion.
  1. +21 −1 docs/conf.py
View
22 docs/conf.py
@@ -224,4 +224,24 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webpay.settings')
+class Mock(object):
+ def __init__(self, *args, **kwargs):
+ pass
+
+ def __call__(self, *args, **kwargs):
+ return Mock()
+
+ @classmethod
+ def __getattr__(cls, name):
+ if name in ('__file__', '__path__'):
+ return '/dev/null'
+ elif name[0] == name[0].upper():
+ mockType = type(name, (), {})
+ mockType.__module__ = __name__
+ return mockType
+ else:
+ return Mock()
+
+MOCK_MODULES = ['django.conf']
+for mod_name in MOCK_MODULES:
+ sys.modules[mod_name] = Mock()
Please sign in to comment.
Something went wrong with that request. Please try again.