Skip to main content

A Django app for handling github users and repos.

Project description

https://api.travis-ci.org/Celc/django-octocat.png?branch=master https://coveralls.io/repos/Celc/django-octocat/badge.png?branch=master https://pypip.in/v/django-octocat/badge.png https://pypip.in/d/django-octocat/badge.png

A Django app for handling github users and repos.

Installation

To get the latest stable release from PyPi

pip install django-octocat

To get the latest commit from GitHub

pip install -e git+git://github.com/Celc/django-octocat.git#egg=github

Add github to your INSTALLED_APPS

INSTALLED_APPS = (
    ...,
    'github',
)

Add the github URLs to your urls.py

urlpatterns = patterns('',
    ...
    url(r'^github/', include('github.urls', namespace='github')),
)

Add github.middlewares.GithubAuthorizationMiddleware to your MIDDLEWARE_CLASSES

MIDDLEWARE_CLASSES = (
    ...
    'github.middlewares.GithubAuthorizationMiddleware',
)

Add github.backends.GithubBackend to your AUTHENTICATION_BACKENDS

AUTHENTICATION_BACKENDS = (
    ...
    'github.backends.GithubBackend',
)

Don’t forget to migrate your database

./manage.py migrate github

If you are planning on cloning the repos set the target directory in settings.py

import tempfile
GITHUB_ROOT = tempfile.gettempdir()

Finally add the Github settings under /admin.

Usage

To authenticate users send them to {% url 'github:authorize' pk=1 %} where pk is the id of the Github app.

Contribute

mkvirtualenv django-octocat
make develop

Add code, write test, send pull request.

Octocat

Octocat is a trademark owned by GitHub Inc and is used with permission. The library is in no way affiliated, maintained or sponsored by GitHub Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-octocat-0.2.0.tar.gz (12.0 kB view details)

Uploaded Source

File details

Details for the file django-octocat-0.2.0.tar.gz.

File metadata

File hashes

Hashes for django-octocat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 22ddeb386d983a3f38fbec9d3ecf17a72810609b5f73a3f43bb984348672df5d
MD5 a67eb0c7a1a56134834b9c3935e26466
BLAKE2b-256 0b444217b7c85e32e667b892b4a2252bfe62df610bf2701e33df0b171ef56eda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page