8000 Register Placeholder model with admin by Aiky30 · Pull Request #6458 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

Register Placeholder model with admin #6458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 26, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Registered the placeholder model with the admin
  • Loading branch information
Andrew Aikman committed Jul 25, 2018
commit 058c4864048810dc19f3eb64b28c9a6046fc24d7
9 changes: 9 additions & 0 deletions cms/admin/placeholderadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import warnings

from django.conf.urls import url
from django.contrib import admin
from django.contrib.admin.helpers import AdminForm
from django.contrib.admin.utils import get_deleted_objects
from django.core.exceptions import PermissionDenied
Expand Down Expand Up @@ -1167,3 +1168,11 @@ def clear_placeholder(self, request, placeholder_id):
}
request.current_app = self.admin_site.name
return TemplateResponse(request, "admin/cms/page/plugin/delete_confirmation.html", context)


class PlaceholderAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
list_filter = []
list_display = ['id', 'slot', 'default_width',]


admin.site.register(Placeholder, PlaceholderAdmin)
0