Peter Sanchez avatar Peter Sanchez committed bde489d

Moved Config class to config.py due to import dependencies

Comments (0)

Files changed (3)

djpubsubhubbub/__init__.py

-from django.contrib.sites.models import Site
-from easyconfig import EasyConfig
-
-
 __version__ = '0.3'
-
-
-class Config(object):
-    ''' Base config class to easily pass headers, etc.
-    '''
-    config = EasyConfig('djpubsubhubbub.Config', 'PUBSUBHUBBUB_CONFIG')
-    
-    def get_extra_hub_headers(self, feed_url, hub_url):
-        return self.config.get_object(
-            'get_extra_hub_headers',
-            {},
-            *(feed_url, hub_url)
-        )
-
-    def get_default_callback_host(self, feed_url, hub_url):
-        return self.config.get_objects(
-            'get_default_callback_host',
-            str(Site.objects.get_current()),
-            *(feed_url, hub_url)
-        )

djpubsubhubbub/config.py

+from django.contrib.sites.models import Site
+from easyconfig import EasyConfig
+
+
+class Config(object):
+    ''' Base config class to easily pass headers, etc.
+    '''
+    config = EasyConfig('djpubsubhubbub.Config', 'PUBSUBHUBBUB_CONFIG')
+    
+    def get_extra_hub_headers(self, feed_url, hub_url):
+        return self.config.get_object(
+            'get_extra_hub_headers',
+            {},
+            *(feed_url, hub_url)
+        )
+
+    def get_default_callback_host(self, feed_url, hub_url):
+        return self.config.get_objects(
+            'get_default_callback_host',
+            str(Site.objects.get_current()),
+            *(feed_url, hub_url)
+        )

djpubsubhubbub/models.py

 from django.utils.hashcompat import sha_constructor
 from django.core.urlresolvers import reverse, NoReverseMatch
 
-from djpubsubhubbub import Config, signals
+from djpubsubhubbub import signals
+from djpubsubhubbub.config import Config
 
 DEFAULT_LEASE_SECONDS = 2592000 # 30 days in seconds
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.