Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Смирнов Дмитрий Сергеевич
507172_ikis2023
Commits
ae1cb16f
Commit
ae1cb16f
authored
1 year ago
by
Смирнов Дмитрий Сергеевич
Browse files
Options
Download
Email Patches
Plain Diff
fix prev commit
parent
af89ec24
Pipeline
#49
failed with stages
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+7
-5
README.md
backend/api/__pycache__/views.cpython-36.pyc
+0
-0
backend/api/__pycache__/views.cpython-36.pyc
backend/api/views.py
+30
-1
backend/api/views.py
backend/backend/__pycache__/settings.cpython-36.pyc
+0
-0
backend/backend/__pycache__/settings.cpython-36.pyc
with
37 additions
and
6 deletions
+37
-6
README.md
View file @
ae1cb16f
...
...
@@ -21,13 +21,15 @@ django-admin startproject backend
python backend
\m
anage.py startapp api
```
#### Create
react
project
#### Create
vue
project
```
bash
npm create-react-app fronted
npm i bootstrap
su
npm
install
-g
@vue/cli
vue create frontend
cd
frontend
npm i axios
npm react-router-dom
npm react-bootstrap
vue add vuetify
vue add router
```
#### Create migration
...
...
This diff is collapsed.
Click to expand it.
backend/api/__pycache__/views.cpython-36.pyc
View file @
ae1cb16f
No preview for this file type
This diff is collapsed.
Click to expand it.
backend/api/views.py
View file @
ae1cb16f
...
...
@@ -2,8 +2,13 @@ from django.shortcuts import render
from
rest_framework
import
generics
from
.models
import
user
from
.serializers
import
*
from
rest_framework.permissions
import
IsAuthenticated
from
rest_framework.views
import
APIView
from
rest_framework.response
import
Response
# Create your views here.
class
UserApiView
(
generics
.
ListAPIView
):
queryset
=
user
.
objects
.
all
()
serializer_class
=
UserSerializer
...
...
@@ -13,14 +18,38 @@ class LessonApiView(generics.ListAPIView):
queryset
=
lesson
.
objects
.
all
()
serializer_class
=
LessonSerializer
class
UserGroupApiView
(
generics
.
ListAPIView
):
queryset
=
user_group
.
objects
.
all
()
serializer_class
=
UserGroupSerializer
class
CabinetApiView
(
generics
.
ListAPIView
):
queryset
=
cabinet
.
objects
.
all
()
serializer_class
=
CabinitSerializer
class
SheduleApiView
(
generics
.
ListAPIView
):
queryset
=
shedule
.
objects
.
all
()
serializer_class
=
SheduleSerializer
\ No newline at end of file
serializer_class
=
SheduleSerializer
class
LogoutView
(
APIView
):
permission_classes
=
(
IsAuthenticated
)
def
post
(
self
,
request
):
try
:
refresh_token
=
request
.
date
[
'refresh_token'
]
token
=
RefreshToken
(
refresh_token
)
token
.
blacklist
()
return
Response
(
status
=
status
.
HTTP_205_RESET_CONTENT
)
except
Exception
as
e
:
return
Response
(
status
=
status
.
HTTP_400_BAD_REQUEST
)
class
GetSheduleApiView
(
APIView
):
permission_classes
=
(
IsAuthenticated
)
def
get
(
self
,
request
):
content
=
{
'message'
:
1
}
return
Response
(
content
)
This diff is collapsed.
Click to expand it.
backend/backend/__pycache__/settings.cpython-36.pyc
View file @
ae1cb16f
No preview for this file type
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help