File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ class PageAdmin(admin.ModelAdmin):
103
103
copy_form = CopyPageForm
104
104
move_form = MovePageForm
105
105
inlines = PERMISSION_ADMIN_INLINES
106
+ title_frontend_editable_fields = ['title' , 'menu_title' , 'page_title' ]
106
107
107
108
def has_add_permission (self , request ):
108
109
return False
Original file line number Diff line number Diff line change 26
26
URL_CMS_PAGE_PUBLISHED ,
27
27
CMSTestCase ,
28
28
)
29
- from cms .utils .compat import DJANGO_2_2
29
+ from cms .utils .compat import DJANGO_2_2 , DJANGO_4_2
30
30
from cms .utils .conf import get_cms_setting
31
31
from cms .utils .i18n import get_language_list
32
32
from cms .utils .urlutils import admin_reverse
@@ -461,6 +461,15 @@ def test_too_many_plugins_type(self):
461
461
response = self .client .post (url , data )
462
462
self .assertEqual (response .status_code , HttpResponseBadRequest .status_code )
463
463
464
+ def test_page_edit_field_endpoint (self ):
465
+ endpoint = admin_reverse ("cms_page_edit_title_fields" , args = (self .page .pk , "en" )) + "?language=en&edit_fields=page_title"
466
+ with self .login_user_context (self .get_superuser ()):
467
+ response = self .client .get (endpoint )
468
+ if DJANGO_4_2 :
469
+ self .assertContains (response , '<input type="text" name="page_title" maxlength="255" id="id_page_title">' )
470
+ else :
471
+ self .assertContains (response , '<input type="text" name="page_title" maxlength="255" aria-describedby="id_page_title_helptext" id="id_page_title">' )
472
+
464
473
465
474
class NoDBAdminTests (CMSTestCase ):
466
475
@property
You can’t perform that action at this time.
0 commit comments