一个处理github用户和回购的django应用程序。

django-octocat的Python项目详细描述


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

一个处理github用户和回购的django应用程序。

安装

从pypi获得最新的稳定版本

pip install django-octocat

从github获取最新提交

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

github添加到INSTALLED_APPS

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

githuburl添加到urls.py

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

github.middlewares.GithubAuthorizationMiddleware添加到 MIDDLEWARE_CLASSES

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

github.backends.GithubBackend添加到AUTHENTICATION_BACKENDS

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

不要忘记迁移数据库

./manage.py migrate github

如果计划克隆repos,请将目标目录设置为 settings.py

importtempfileGITHUB_ROOT=tempfile.gettempdir()

最后在/admin下添加github设置。

用法

要验证用户身份,请将其发送到{% url 'github:authorize' pk=1 %},其中 pk是github应用程序的id。

贡献

mkvirtualenv django-octocat
make develop

添加代码,编写测试,发送拉取请求。

章鱼

octocat是github公司拥有的商标,经许可使用。这个 图书馆不属于Github公司,也不由Github公司维护或赞助。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java语义理解递归反向字符串返回语句   java toString()方法打印空值   java大型IN子句   如何使用JavaSpring在JavaScriptjQuery中设置post路径   java ByteArrayOutputStream已上载到服务器   java为什么轮询在SocketIO上获取数据“无法加载请求的项”?   java源代码应该以UTF8格式保存   Java数据库轮询器?   在Java中将double转换为float   java AccessDeniedException:C:\Windows\System32\drivers\etc\hosts