Skip to content

Commit d6423fa

Browse files
committed
Perform manual admin registration, as django-polymorphic 1.4+ requires.
This new registrarion system worked as of django-polymorphic 1.0, and this deprecated feature was recently removed because it caused subtle bugs.
1 parent 3ed5ae4 commit d6423fa

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Diff for: fluent_faq/pagetypes/faqpage/admin.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from django.contrib import admin
2+
from fluent_pages.adminui import HtmlPageAdmin
3+
4+
from .models import FaqPage
5+
6+
7+
@admin.register(FaqPage)
8+
class FaqPageAdmin(HtmlPageAdmin):
9+
pass
10+

Diff for: fluent_faq/pagetypes/faqpage/page_type_plugins.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from fluent_pages.adminui import HtmlPageAdmin
21
from fluent_pages.extensions import page_type_pool, PageTypePlugin
2+
from .admin import FaqPageAdmin
33
from .models import FaqPage
44

55

@@ -9,5 +9,5 @@ class FaqPagePlugin(PageTypePlugin):
99
Plugin binding the FaqPage model as pagetype.
1010
"""
1111
model = FaqPage
12-
model_admin = HtmlPageAdmin
12+
model_admin = FaqPageAdmin
1313
urls = 'fluent_faq.urls'

0 commit comments

Comments
 (0)