Permalink
Browse files

Merge pull request #7 from FactorAG/master

Make South dependency optional
  • Loading branch information...
2 parents 71b7ecc + 0313296 commit ac36861e8f46576f90f3f645c3c5e7fadd43c702 @dbanck dbanck committed Apr 12, 2012
Showing with 14 additions and 16 deletions.
  1. +0 −6 setup.py
  2. +14 −10 updown/fields.py
View
@@ -39,10 +39,4 @@
'Framework :: Django',
],
test_suite='runtests.runtests',
- dependency_links=[
- 'http://pypi.python.org/pypi/South/',
- ],
- install_requires=[
- 'South',
- ],
)
View
@@ -243,13 +243,17 @@ def __init__(self, *args, **kwargs):
super(AnonymousRatingField, self).__init__(*args, **kwargs)
-from south.modelsinspector import add_introspection_rules
-add_introspection_rules([
- (
- [RatingField], # Class(es) these apply to
- [], # Positional arguments (not used)
- { # Keyword argument
- "delimiter": ["delimiter", {"default": "|"}],
- },
- ),
-], ["^updown\.fields\.RatingField"])
+try:
+ from south.modelsinspector import add_introspection_rules
+except ImportError:
+ pass
+else:
+ add_introspection_rules([
+ (
+ [RatingField], # Class(es) these apply to
+ [], # Positional arguments (not used)
+ { # Keyword argument
+ "delimiter": ["delimiter", {"default": "|"}],
+ },
+ ),
+ ], ["^updown\.fields\.RatingField"])

0 comments on commit ac36861

Please sign in to comment.