{ "info": { "author": "Bruno Renie", "author_email": "bruno@renie.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python" ], "description": "django-le-twitter\n=================\n\nTwitter authentication that sucks.\n\nDjango-le-twitter provides almost nothing to let your users sign in with\ntwitter: two class-based views.\n\nDjango-le-twitter is based on Django >= 1.3 and `Tweepy`_.\n\n.. _Tweepy: http://joshthecoder.github.com/tweepy/docs/index.html\n\nThe concept is simple: when a user successfully logs in using twitter (i.e.\nyou get a valid OAuth token), django-le-twitter executes a method that **you**\ndefine. There is no model instance created, no login using contrib.auth, no\nnothing. You decide.\n\nInstallation\n------------\n\n::\n\n pip install django-le-twitter\n\nThere's nothing to add to your INSTALLED_APPS. It just needs to be in your\npython path. You need to add your Twitter app credentials to your Django\nsettings:\n\n::\n\n CONSUMER_KEY = 'your key'\n CONSUMER_SECRET = 'your secret'\n\nUsage\n-----\n\nSubclass the two views provided by django-le-twitter in one of your apps'\nviews. Actually, one of them doesn't strictly need to be subclassed.\n\n::\n\n # app/views.py\n from django.http import HttpResponse\n\n from le_twitter import views\n\n authorize = views.Authorize.as_view()\n\n class Return(views.Return):\n\n def handle_error(self, error_msg, exception=None):\n return HttpResponse(error_msg)\n\n def handle_success(self, auth):\n # Now it's up to you!\n return HttpResponse('It worked!')\n return_ = Return.as_view()\n\n``handle_success()`` gives you a ``tweepy.OAuth`` object containing your user's\nOAuth credentials. At this point you can:\n\n* Fetch information using the tweepy API\n* Create an auth.User instance and link it to a custom twitter profile\n\n``handle_success()`` just needs to return an ``HttpResponse``.\n\nAfter that, just hook your custom views in your app urlconf::\n\n # app/urls.py\n from django.conf.urls.defaults import patterns, url\n\n from app.views import authorize, return_\n\n urlpatterns = patterns(''\n url(r'^oauth/authorize/$', authorize, name='oauth_authorize'),\n url(r'^oauth/return/$', return_, name='oauth_return'),\n )", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brutasse/django-le-twitter", "keywords": null, "license": "BSD licence, see LICENCE file", "maintainer": null, "maintainer_email": null, "name": "django-le-twitter", "package_url": "https://pypi.org/project/django-le-twitter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-le-twitter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/brutasse/django-le-twitter" }, "release_url": "https://pypi.org/project/django-le-twitter/0.2/", "requires_dist": null, "requires_python": null, "summary": "Twitter authentication that sucks", "version": "0.2" }, "last_serial": 637704, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "585a0a3958753c19366e23342dbee44f", "sha256": "86a732c786ec920a46073050088a1628efffbcbfd082f8e828038b0774b8afc0" }, "downloads": -1, "filename": "django-le-twitter-0.1.tar.gz", "has_sig": false, "md5_digest": "585a0a3958753c19366e23342dbee44f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3921, "upload_time": "2011-03-23T22:48:01", "url": "https://files.pythonhosted.org/packages/c9/0b/ac030a203e503ab7b7ee640294b36a48e628acc787e6e2fdea12f5a9068d/django-le-twitter-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "97bbfcf2c5ef45e897b943bbfbb609a9", "sha256": "225e15202604984babcdc94bdf5f0abd445fd493641b83293c45092c7cfe47b2" }, "downloads": -1, "filename": "django-le-twitter-0.2.tar.gz", "has_sig": false, "md5_digest": "97bbfcf2c5ef45e897b943bbfbb609a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3930, "upload_time": "2011-04-03T11:04:39", "url": "https://files.pythonhosted.org/packages/7d/4b/6ce4bd1f736b6c86c0354e648eee91ecfdb7c00d22bac1d75f4442f5eec7/django-le-twitter-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97bbfcf2c5ef45e897b943bbfbb609a9", "sha256": "225e15202604984babcdc94bdf5f0abd445fd493641b83293c45092c7cfe47b2" }, "downloads": -1, "filename": "django-le-twitter-0.2.tar.gz", "has_sig": false, "md5_digest": "97bbfcf2c5ef45e897b943bbfbb609a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3930, "upload_time": "2011-04-03T11:04:39", "url": "https://files.pythonhosted.org/packages/7d/4b/6ce4bd1f736b6c86c0354e648eee91ecfdb7c00d22bac1d75f4442f5eec7/django-le-twitter-0.2.tar.gz" } ] }