Permalink
Browse files

require Django.

  • Loading branch information...
1 parent f684bd8 commit 8cf9102e6a9c97959c99bd1768e9a690d7f1b0a0 @fwenzel fwenzel committed May 31, 2010
Showing with 5 additions and 1 deletion.
  1. +4 −1 product_details/__init__.py
  2. +1 −0 setup.py
@@ -20,7 +20,10 @@
def settings_fallback(key):
"""Grab user-defined settings, or fall back to default."""
- return getattr(settings, key, getattr(settings_defaults, key))
+ try:
+ return getattr(settings, key)
+ except (AttributeError, ImportError):
+ return getattr(settings_defaults, key)
json_dir = settings_fallback('PROD_DETAILS_DIR')
View
@@ -15,6 +15,7 @@
packages=['product_details'],
include_package_data=True,
zip_safe=False,
+ install_requires=['Django>=1.1'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',

0 comments on commit 8cf9102

Please sign in to comment.