Skip to content

Commit b583786

Browse files
committed
twitter API
1 parent d700dbc commit b583786

22 files changed

Lines changed: 128 additions & 0 deletions
121 Bytes
Binary file not shown.
88 Bytes
Binary file not shown.

blog/settings.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
'rest_framework',
4646
'api',
4747
'googleApp',
48+
'githubApp',
49+
'twitterApp',
4850
'allauth',
4951
'allauth.account',
5052
'allauth.socialaccount',
@@ -152,6 +154,15 @@
152154
},
153155
]
154156

157+
SOCIALACCOUNT_PROVIDERS = {
158+
'github': {
159+
'SCOPE': [
160+
'user',
161+
'repo',
162+
'read:org',
163+
],
164+
}
165+
}
155166

156167
# Internationalization
157168
# https://docs.djangoproject.com/en/1.11/topics/i18n/

blog/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
url(r'^comments/', include('django_comments.urls')),
1212
url(r'^api/', include('api.urls', namespace='api')),
1313
url(r'^googleApp/', include('googleApp.urls', namespace='googleApp')),
14+
url(r'^githubApp/', include('githubApp.urls')),
15+
url(r'^twitterApp/', include('twitterApp.urls')),
1416
url(r'^accounts/', include('allauth.urls')),
1517
]
1618
if settings.DEBUG:

db.sqlite3

4 KB
Binary file not shown.

githubApp/__init__.py

Whitespace-only changes.

githubApp/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

githubApp/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class GithubappConfig(AppConfig):
5+
name = 'githubApp'

githubApp/migrations/__init__.py

Whitespace-only changes.

githubApp/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

0 commit comments

Comments
 (0)