From 3c6736c98cfca5e7a449731518f354ebe6aa39b1 Mon Sep 17 00:00:00 2001 From: s460930 Date: Wed, 9 Dec 2020 19:24:41 +0100 Subject: [PATCH] SMART-42 registered retreive user profile endpoint --- rest-app/smartpicasso/app/user/views.py | 4 ++++ rest-app/smartpicasso/app/user_profile/urls.py | 11 +++++++++++ rest-app/smartpicasso/app/user_profile/views.py | 4 ++++ rest-app/smartpicasso/urls.py | 1 + 4 files changed, 20 insertions(+) create mode 100644 rest-app/smartpicasso/app/user_profile/urls.py diff --git a/rest-app/smartpicasso/app/user/views.py b/rest-app/smartpicasso/app/user/views.py index ecb0a57..1a5bfcf 100644 --- a/rest-app/smartpicasso/app/user/views.py +++ b/rest-app/smartpicasso/app/user/views.py @@ -1,3 +1,7 @@ +""" +@author: p.dolata +""" + from rest_framework import status from rest_framework.generics import RetrieveAPIView, CreateAPIView from rest_framework.permissions import AllowAny diff --git a/rest-app/smartpicasso/app/user_profile/urls.py b/rest-app/smartpicasso/app/user_profile/urls.py new file mode 100644 index 0000000..61d89f6 --- /dev/null +++ b/rest-app/smartpicasso/app/user_profile/urls.py @@ -0,0 +1,11 @@ +""" +@author: p.dolata +""" + +from django.conf.urls import url + +from smartpicasso.app.user_profile.views import UserProfileView + +urlpatterns = [ + url(r'^profile', UserProfileView.as_view(), name='profile') +] diff --git a/rest-app/smartpicasso/app/user_profile/views.py b/rest-app/smartpicasso/app/user_profile/views.py index 9835f6c..8cec569 100644 --- a/rest-app/smartpicasso/app/user_profile/views.py +++ b/rest-app/smartpicasso/app/user_profile/views.py @@ -1,3 +1,7 @@ +""" +@author: p.dolata +""" + from rest_framework import status from rest_framework.generics import RetrieveAPIView from rest_framework.permissions import IsAuthenticated diff --git a/rest-app/smartpicasso/urls.py b/rest-app/smartpicasso/urls.py index de1970c..bd27833 100644 --- a/rest-app/smartpicasso/urls.py +++ b/rest-app/smartpicasso/urls.py @@ -18,5 +18,6 @@ from django.urls import path, include urlpatterns = [ path('api/', include('smartpicasso.app.user.urls')), + path('api/', include('smartpicasso.app.user_profile.urls')), path('admin/', admin.site.urls), ]