Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

I created this sample installation because I needed to create django REST service with piston on mongodb and oauth authentication.  I found it there were a number of bugs in piston, issues with django-nonrel, and few good examples of oauth authentication.  I spent a couple of days figuring this out.  Hopefully this will save you the time!

This an example installation of fully functional django-nonrel piston installation with oauth authentication and GET and POST examples for a basic Poll application.

* Note: This is still using an oath 1.0 client implementation, along with a piston oauth 1.0 service.

These are the installation instructions to get your django-piston-nonrel-oauth2 server up and running.

1.  Clone repository at 

2.  virtualenv piston-env

3.  source ./piston-env/bin/activate

4.  pip install -r requirements.txt

5.  cd frameworks ; Update your to point to your mongodb settings

6.  Run ./ syncdb and create your superuser account

7.  Run ./ runserver

8.  Go to localhost:8000/admin and login. Create a Consumer with the following settings:

Consumer Key: testkey
Consumer Secret: testsecret

The name and description can be anything you choose.  Attach the Consumer to your superuser or another use if you have created on.

9.  From a command line prompt run python

10.  Follow the instructions for

11.  For a two-legged test, run two-legged

12.  To run the general test, do:  ./ test oauth_tests

Hope this helps!

Recent activity

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
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.