Simple viewset for models CRUD operations
Project description
Simple viewset for models CRUD operations.
# myapp/models.py
from django.db import models
class MyModel(models.Model):
...
class Meta:
...
default_permissions = ('add', 'change', 'delete', 'read')
# myapp/views.py
from viewset import ModelViewSet
from .models import MyModel
class MyModelViewSet(ModelViewSet):
model = MyModel
# myapp/urls.py
from django.conf.urls import include
from myapp.views import MyModelViewSet
urlpatterns = [
url(r'', include(MyModelViewSet().urls())),
]
# settings.py
INSTALLED_APPS = [
'simple_viewset',
]
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
File details
Details for the file django-simple-viewset-0.1.11.tar.gz.
File metadata
- Download URL: django-simple-viewset-0.1.11.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ec9ac1bdc3b112d7e4f0e7cd93b478f8f9af844e592766dcb19fd244ddef6d
|
|
| MD5 |
0e6dafd0414a771c014202615ce30b7d
|
|
| BLAKE2b-256 |
5240f874020810e8948107c11ee53f8add930f5bdd349b62d5cd27b5948699be
|