Fix OAuth page
This commit is contained in:
@@ -45,6 +45,8 @@ INSTALLED_APPS = [
|
||||
'planner',
|
||||
'food.apps.FoodConfig',
|
||||
'recipes',
|
||||
'stress',
|
||||
'dreams',
|
||||
]
|
||||
|
||||
# Published recipes owned by this account may appear in the optional matching demo.
|
||||
@@ -72,6 +74,8 @@ OAUTH2_PROVIDER = {
|
||||
'food:write': 'Create, change, and delete food diary entries and images',
|
||||
'inventory:read': 'Read your kitchen inventory',
|
||||
'inventory:write': 'Create, change, and remove kitchen inventory items',
|
||||
'journal:read': 'Read your private stress and dream journals',
|
||||
'journal:write': 'Create, change, and delete stress and dream entries',
|
||||
},
|
||||
'ACCESS_TOKEN_GENERATOR': 'food.oauth_pat.oauth_access_token',
|
||||
'ACCESS_TOKEN_EXPIRE_SECONDS': 3600,
|
||||
|
||||
@@ -17,13 +17,17 @@ Including another URLconf
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from oauth2_provider.urls import metadata_urlpatterns
|
||||
from food.oauth_authorize import JournalAuthorizationView
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(metadata_urlpatterns)),
|
||||
path('o/authorize/', JournalAuthorizationView.as_view()),
|
||||
path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||
path('api/v1/', include('food.api_urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('food/', include('food.urls', namespace='food')),
|
||||
path('recipes/', include('recipes.urls', namespace='recipes')),
|
||||
path('stress/', include('stress.urls', namespace='stress')),
|
||||
path('dreams/', include('dreams.urls', namespace='dreams')),
|
||||
path('', include('planner.urls')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user