Commits

Peter Sanchez committed 0d5e3a6

Cleaned up bad imports. Version bump

  • Participants
  • Parent commits 447e75d

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):