Unverified Kaydet (Commit) 8e19dafa authored tarafından Uğur Özyılmazel's avatar Uğur Özyılmazel

Now using: @admin.register({model_name}) in admin registration

üst 545114e0
![Django](https://img.shields.io/badge/django-2.0.5-green.svg)
![Version](https://img.shields.io/badge/version-0.2.0-yellow.svg)
![Version](https://img.shields.io/badge/version-0.2.1-yellow.svg)
# Django Project Starter Template
......@@ -1509,6 +1509,10 @@ This project is licensed under MIT
## Change Log
**2018-05-07**
- Automatic Django Admin registration changed to: `@admin.register({model_name})` style.
**2018-05-02**
- Django 2.0.5 and related changes.
......
......@@ -10,13 +10,11 @@ __all__ = [
]
@admin.register({model_name})
class {model_name}Admin(BaseAdmin):
# sticky_list_filter = None
pass
admin.site.register({model_name}, {model_name}Admin)
"""
......
......@@ -8,12 +8,10 @@ __all__ = [
]
@admin.register({model_name})
class {model_name}Admin(admin.ModelAdmin):
pass
admin.site.register({model_name}, {model_name}Admin)
"""
......
......@@ -10,14 +10,12 @@ __all__ = [
]
@admin.register({model_name})
class {model_name}Admin(BaseAdminWithSoftDelete):
# sticky_list_filter = None
# hide_deleted_at = False
pass
admin.site.register({model_name}, {model_name}Admin)
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment