Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
ef093c16
Verified
Commit
ef093c16
authored
Dec 06, 2017
by
Sébastiaan Versteeg
Browse files
Use DRF's get_object_or_404 instead of the default in the pizzas viewset
parent
366e6ec8
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/pizzas/api/viewsets.py
View file @
ef093c16
from
django.shortcuts
import
get_object_or_404
from
django.db
import
IntegrityError
from
rest_framework
import
permissions
from
rest_framework.generics
import
get_object_or_404
from
rest_framework.viewsets
import
GenericViewSet
,
ModelViewSet
from
rest_framework.mixins
import
ListModelMixin
from
rest_framework.decorators
import
list_route
...
...
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