Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/andela/ah-backend-invictus
Browse files Browse the repository at this point in the history
… into ch-setup-travis-165273464
  • Loading branch information
engjames committed Apr 23, 2019
2 parents a72600b + 2100c25 commit 0c2a27e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var/
.installed.cfg
*.egg
.idea/
.vscode/*

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
16 changes: 16 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"addons": [

],
"buildpacks": [

],
"env": {
},
"formation": {
},
"name": "ah-backend-invictus",
"scripts": {
},
"stack": "heroku-18"
}
8 changes: 4 additions & 4 deletions authors/apps/authentication/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from django.conf.urls import url
from django.urls import path

from .views import (
LoginAPIView, RegistrationAPIView, UserRetrieveUpdateAPIView
)

urlpatterns = [
url(r'^user/?$', UserRetrieveUpdateAPIView.as_view()),
url(r'^users/?$', RegistrationAPIView.as_view()),
url(r'^users/login/?$', LoginAPIView.as_view()),
path('user/', UserRetrieveUpdateAPIView.as_view()),
path('users/', RegistrationAPIView.as_view()),
path('users/login/', LoginAPIView.as_view()),
]
4 changes: 0 additions & 4 deletions authors/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,4 @@
REST_FRAMEWORK = {
'EXCEPTION_HANDLER': 'authors.apps.core.exceptions.core_exception_handler',
'NON_FIELD_ERRORS_KEY': 'error',

'DEFAULT_AUTHENTICATION_CLASSES': (
'authors.apps.authentication.backends.JWTAuthentication',
),
}
18 changes: 8 additions & 10 deletions authors/urls.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
"""authors URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.urls import include, path
from django.contrib import admin

urlpatterns = [
url(r'^admin/', admin.site.urls),

url(r'^api/', include('authors.apps.authentication.urls', namespace='authentication')),
path('admin/', admin.site.urls),
path('api/', include('authors.apps.authentication.urls')),
]

2 changes: 1 addition & 1 deletion authors/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""

import os
Expand Down

0 comments on commit 0c2a27e

Please sign in to comment.