Giter VIP home page Giter VIP logo

django-rest-apis's Introduction

sample-django-app

Sample Django App for Twitter using OAuth

REQUIREMENTS

To run this sample code, you'll need to install the following libraries:

GETTING STARTED

  • Create a Twitter App (https://apps.twitter.com/)

  • Specify your Twitter App tokens in app/settings.py under the following section:

    SOCIAL_AUTH_TWITTER_KEY = 'YOUR_TWITTER_API_KEY' SOCIAL_AUTH_TWITTER_SECRET = 'YOUR_TWITTER_API_SECRET'

    TWITTER_ACCESS_TOKEN = 'YOUR_TWITTER_ACCESS_TOKEN' TWITTER_ACCESS_TOKEN_SECRET = 'YOUR_TWITTER_ACCESS_TOKEN_SECRET'

  • To initialize your database, run the from the sample-djang-app directory:

    python manage.py syncdb

  • To start the server, run the following from the sample-djang-app directory:

    fab start

  • Open a browser and go to http://localhost:9000

NOTES

If you receive a 401 at login/twitter it is most likely caused by a datetime discrepancy between the server making the requst and the Twitter server.

Use NTP to sync time on your server to compensate for the dift.

If you are getting this error on OSX, toggle the "set time zone" checkbox off and back on in Date & Time system preferences for a manual and temporary fix. It has been reported that OSX 10.9 Mavericks has an issue with time drift.

django-rest-apis's People

Contributors

ryankicks avatar jcipriano avatar

Watchers

James Cloos avatar Sandeep Earayil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.