This commit is contained in:
David Avsajanishvili 2013-04-10 16:43:10 -07:00
commit d0d450edf3
2 changed files with 18 additions and 15 deletions

View file

@ -1,11 +1,10 @@
#!/usr/bin/python
import sys, os
from setuptools import setup
from setuptools import find_packages
__author__ = 'Ryan McGrath <ryan@venodesigns.net>'
__version__ = '1.4.5'
__version__ = '1.4.6'
setup(
# Basic package information.
@ -17,7 +16,11 @@ setup(
include_package_data = True,
# Package dependencies.
install_requires = ['simplejson', 'oauth2', 'httplib2', 'twython', 'django'],
install_requires = ['simplejson',
'oauth2',
'httplib2',
'twython>=2.7.2',
'django'],
provides = ['twython_django_oauth'],
# Metadata for PyPI.

View file

@ -1,8 +1,7 @@
from django.contrib.auth import authenticate, login, logout as django_logout
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseRedirect
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.core.urlresolvers import reverse
@ -12,6 +11,7 @@ from twython import Twython
# about adapting this to your own setup.
from twython_django_oauth.models import TwitterProfile
def logout(request, redirect_url=settings.LOGOUT_REDIRECT_URL):
"""
Nothing hilariously hidden here, logs a user out. Strip this out if your
@ -59,7 +59,7 @@ def thanks(request, redirect_url=settings.LOGIN_REDIRECT_URL):
)
# Retrieve the tokens we want...
authorized_tokens = twitter.get_authorized_tokens()
authorized_tokens = twitter.get_authorized_tokens(request.GET['oauth_verifier'])
# If they already exist, grab them, login and redirect to a page displaying stuff.
try: