Peter Sanchez avatar Peter Sanchez committed 0d5e3a6

Cleaned up bad imports. Version bump

Comments (0)

Files changed (5)

twittersync/__init__.py

-__version__ = '0.2'
+__version__ = '0.3'

twittersync/admin.py

 from django.conf import settings
 from django.contrib import admin
-from models import TwitterAccount, TwitterStatus
+from twittersync.models import TwitterAccount, TwitterStatus
 
 
 class TwitterAccountAdmin(admin.ModelAdmin):

twittersync/helpers.py

 import urllib2
 import datetime
+import twittersync
 from django.conf import settings
 from django.http import QueryDict
 from dateutil.parser import parse
-from models import TwitterAccount, TwitterStatus
+from twittersync.models import TwitterAccount, TwitterStatus
 
 # Switch to AnyJson?
 try:
         from django.utils import simplejson as json
 
 
+version = twittersync.__version__
+
 class TwitterSyncHelper(object):
     def __init__(self, account):
         self.account = account
     def send_request(self, latest=None):
         qdict = QueryDict('', mutable=True)
         opener = urllib2.build_opener()
-        opener.addheaders = [('User-agent', 'django-twittersync/0.1')]
+        opener.addheaders = [('User-agent', 'django-twittersync/%s' % version)]
         qdict['screen_name'] = self.account.screen_name
         qdict['trim_user'] = 'true'
      

twittersync/models.py

 from django.conf import settings
 from django.db import models
 from django.utils.translation import ugettext_lazy as _
-from managers import TwitterAccountManager, TwitterStatusManager
+from twittersync.managers import TwitterAccountManager, TwitterStatusManager
 
 
 class TwitterAccount(models.Model):

twittersync/tests.py

 from django.utils import unittest
 from django.test.client import Client
 
-from helpers import TwitterSyncHelper
-from models import TwitterAccount, TwitterStatus
+from twittersync.helpers import TwitterSyncHelper
+from twittersync.models import TwitterAccount, TwitterStatus
 
 
 class MockResponse(object):
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.