Add custom field to page settings in Django CMS - Stack Overflow

I have a PageExtension with a custom field in my Django CMS app.How do I make this custom field editab

I have a PageExtension with a custom field in my Django CMS app.

How do I make this custom field editable in the Page's Settings or Advanced Settings?

I followed the tutorial on docs.django-cms but nothing appears in my admin interface.

I have a PageExtension with a custom field in my Django CMS app.

How do I make this custom field editable in the Page's Settings or Advanced Settings?

I followed the tutorial on docs.django-cms. but nothing appears in my admin interface.

Share Improve this question edited Mar 3 at 3:27 Stefan asked Mar 2 at 8:46 StefanStefan 233 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Open the admin.py file in your app folder and add the following lines.

from django.contrib import admin
from .models import MyModelName

class MyModelNameAdmin(admin.ModelAdmin):
    list_display = ('field1', 'field2' )


admin.site.register(MyModelName, MyModelNameAdmin)

You can look up more about modeladmin in the django docs

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745127314a4612768.html

相关推荐

  • Add custom field to page settings in Django CMS - Stack Overflow

    I have a PageExtension with a custom field in my Django CMS app.How do I make this custom field editab

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信