Read item detail first, and click the Edit switch button to turn to edit view.
Project description
django-readedit-switch-admin
Read item detail first, and click the Edit switch button to turn to edit view.
Install
pip install django-readedit-switch-admin
Usage
pro/settings.py
INSTALLED_APPS = [
...
'django_readedit_switch_admin',
...
]
app/admin.py
from django.contrib import admin
from .models import Category
from .models import Book
from django_readedit_switch_admin.admin import DjangoReadEditSwitchAdminMixin
class BookInline(admin.TabularInline):
model = Book
class CategoryAdmin(DjangoReadEditSwitchAdminMixin, admin.ModelAdmin):
list_display = ["pk", "name"]
list_editable = ["name"]
inlines = [
BookInline
]
admin.site.register(Category, CategoryAdmin)
Releases
v0.2.0 2020.02.26
- App rename to django_readedit_switch_admin.
v0.1.2 2020.02.24
- Don't check is_edit_view in getting add and delete permissions.
v0.1.1 2020.02.20
- Fix add/change/delete permission problem in changelist view. Changelist view should obey the real permission.
v0.1.0 2020.02.04
- First release.
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
Close
Hashes for django-readedit-switch-admin-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c63f746b02b427a9737fb02a51efe398e70f44771fa8f1afe5e9072d95d9eb |
|
MD5 | 82d12c7d4711f9739814e3958bb4dc42 |
|
BLAKE2b-256 | 455dcfc7dac25cbf1705eaf40aae84fb76db4ebac8251045b0cb8e5254f9cc39 |