# django-readedit-switch-admin
Read item detail first, and click the Edit switch button to turn to edit view.
## Install
```shell
pip install django-readedit-switch-admin
```
## Usage
**pro/settings.py**
```python
INSTALLED_APPS = [
...
'django_readedit_switch_admin',
...
]
```
**app/admin.py**
```python
from django.contrib import admin
from .models import Category
from .models import Book
from django_readedit_switch_admin.admin import DjangoReadEditSwitchAdmin
class BookInline(admin.TabularInline):
model = Book
class CategoryAdmin(DjangoReadEditSwitchAdmin, admin.ModelAdmin):
list_display = ["pk", "name"]
list_editable = ["name"]
inlines = [
BookInline
]
admin.site.register(Category, CategoryAdmin)
```
## Releases
### v0.1.0
- First release.
### v0.1.1
- Fix add/change/delete permission problem in changelist view. Changelist view should obey the real permission.
### v0.1.2
- Don't check is_edit_view in getting add and delete permissions.
### v0.2.0
- App rename to django_readedit_switch_admin.
### v0.3.0
- Fix django_readedit_switch_admin.apps' verbose_name.
- Rename DjangoReadEditSwitchAdminMixin to DjangoReadEditSwitchAdmin. It's NOT good to add mixin suffix.
### v0.4.0
- Rename django_readedit_switch_admin.html to change_form.html, so that it can be override by other applications.
### v0.4.1
- Fix problem for all NONE DjangoReadeditSwitchAdmins.
### v0.4.2
- Fix block.super spell mistake.
### v0.4.3
- Use jquery.js shipped with django, and control js loading order.
### v0.4.4
- Fix edit problem with _changelist_filters.
### v0.4.5
- Fix has_add_permission problem.
- Test in Django 3.2.
### v0.4.6
- Doc update.
### v0.4.7
- Fix js error in latest django versions.
Raw data
{
"_id": null,
"home_page": "",
"name": "django-readedit-switch-admin",
"maintainer": "Huang ChuanZhe",
"docs_url": null,
"requires_python": "",
"maintainer_email": "huangchuanzhe@zencore.cn",
"keywords": "django admin extentions,django readedit switch admin",
"author": "Huang ChuanZhe",
"author_email": "huangchuanzhe@zencore.cn",
"download_url": "https://files.pythonhosted.org/packages/5b/2b/1fce5cef24343a62ee9d1214e000685c701e25dde4042c294d02838d87ba/django-readedit-switch-admin-0.4.7.tar.gz",
"platform": null,
"description": "# django-readedit-switch-admin\n\nRead item detail first, and click the Edit switch button to turn to edit view.\n\n\n## Install\n\n```shell\npip install django-readedit-switch-admin\n```\n\n## Usage\n\n**pro/settings.py**\n\n```python\n\nINSTALLED_APPS = [\n ...\n 'django_readedit_switch_admin',\n ...\n]\n```\n\n**app/admin.py**\n\n```python\nfrom django.contrib import admin\nfrom .models import Category\nfrom .models import Book\n\nfrom django_readedit_switch_admin.admin import DjangoReadEditSwitchAdmin\n\n\nclass BookInline(admin.TabularInline):\n model = Book\n\nclass CategoryAdmin(DjangoReadEditSwitchAdmin, admin.ModelAdmin):\n list_display = [\"pk\", \"name\"]\n list_editable = [\"name\"]\n inlines = [\n BookInline\n ]\n\nadmin.site.register(Category, CategoryAdmin)\n\n```\n\n## Releases\n\n### v0.1.0\n\n- First release.\n\n### v0.1.1\n\n- Fix add/change/delete permission problem in changelist view. Changelist view should obey the real permission.\n\n### v0.1.2\n\n- Don't check is_edit_view in getting add and delete permissions.\n\n### v0.2.0\n\n- App rename to django_readedit_switch_admin.\n\n### v0.3.0\n\n- Fix django_readedit_switch_admin.apps' verbose_name.\n- Rename DjangoReadEditSwitchAdminMixin to DjangoReadEditSwitchAdmin. It's NOT good to add mixin suffix.\n\n### v0.4.0\n\n- Rename django_readedit_switch_admin.html to change_form.html, so that it can be override by other applications.\n\n### v0.4.1\n\n- Fix problem for all NONE DjangoReadeditSwitchAdmins.\n\n### v0.4.2\n\n- Fix block.super spell mistake.\n\n### v0.4.3\n\n- Use jquery.js shipped with django, and control js loading order.\n\n### v0.4.4\n\n- Fix edit problem with _changelist_filters.\n\n### v0.4.5\n\n- Fix has_add_permission problem.\n- Test in Django 3.2.\n\n### v0.4.6\n\n- Doc update.\n\n### v0.4.7\n\n- Fix js error in latest django versions.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Read item detail first, and click the Edit switch button to turn to edit view.",
"version": "0.4.7",
"project_urls": null,
"split_keywords": [
"django admin extentions",
"django readedit switch admin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "72e18af40f5131373565b3129d0064cf7a9beb1864c2759c2338ea464abb21be",
"md5": "585151bddc3988e5662110ceab5d00ba",
"sha256": "bbf60a416ac433e72e5f40b14a92914f85bc200cc5a07034810a9601d4cc4cee"
},
"downloads": -1,
"filename": "django_readedit_switch_admin-0.4.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "585151bddc3988e5662110ceab5d00ba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7704,
"upload_time": "2023-10-18T08:32:55",
"upload_time_iso_8601": "2023-10-18T08:32:55.389099Z",
"url": "https://files.pythonhosted.org/packages/72/e1/8af40f5131373565b3129d0064cf7a9beb1864c2759c2338ea464abb21be/django_readedit_switch_admin-0.4.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5b2b1fce5cef24343a62ee9d1214e000685c701e25dde4042c294d02838d87ba",
"md5": "11d9ecf5dbb44a61196325bef0ec6a38",
"sha256": "2cfe42aa90c7137018607721f9c511cf7149779d6dac9d984c729c4d8b710b3d"
},
"downloads": -1,
"filename": "django-readedit-switch-admin-0.4.7.tar.gz",
"has_sig": false,
"md5_digest": "11d9ecf5dbb44a61196325bef0ec6a38",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7092,
"upload_time": "2023-10-18T08:32:57",
"upload_time_iso_8601": "2023-10-18T08:32:57.017454Z",
"url": "https://files.pythonhosted.org/packages/5b/2b/1fce5cef24343a62ee9d1214e000685c701e25dde4042c294d02838d87ba/django-readedit-switch-admin-0.4.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-18 08:32:57",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "django-readedit-switch-admin"
}