No project description provided
Project description
Dj Easy view CRUD mixins
Makes your CRUD's even more smaller and customizable with dj easy views .
Installation
pip install djeasyview
Usage
List and create
This mixin provides generic implementations for listing and creating resources.
Example:
from djeasyview import DjeasyListCreateView
from your_app.models import YourModel
from your_app.serializers import YourModelSerializer
from rest_framework.permissions import IsAuthenticated
class YourView(DjeasyListCreateView):
model = YourModel
list_serializer_class = YourModelSerializer
create_serializer_class = YourModelSerializer
serializer_class = YourModelSerializer
queryset = YourModel
permission_classes = [IsAuthenticated]
Retrive , Update , Delete
This mixin provides generic implementations for Retrive , updating and deleting resources.
from djeasyview import DjeasyRetrieveUpdateApiView
from your_app.models import YourModel
from your_app.serializers import YourModelSerializer
from rest_framework.permissions import IsAuthenticated
class YourView(DjeasyRetrieveUpdateApiView):
model = YourModel
list_serializer_class = YourModelSerializer
create_serializer_class = YourModelSerializer
serializer_class = YourModelSerializer
queryset = YourModel
permission_classes = [IsAuthenticated]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djeasyview-1.0.6.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for djeasyview-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98be3578af9460f878a287d76406b4b3e3c2b44fad4c8b79d71981d189525a3 |
|
MD5 | 78cf525712b9d9d93eca73bbc3a77706 |
|
BLAKE2b-256 | e243e7d992047f4918804393a71ef5f07107365372bf5002454eec0c062b128f |