Skip to content

外键嵌入修改异常 #727

Open
Open

Description

@ouyangqr

image
wom我们修改这里面的字段保存的时候发现数据没有保存到数据库里面.choise字段也不能获取对应的选项

Activity

  1. ouyangqr commented on Dec 3, 2020

    @ouyangqr
    Author

    class ContentXXXXImageInfo:
    model = ContentXXXXImage
    extra = 0

    def get_readonly_fields(self):
        """  重新定义此函数,限制普通用户所能修改的字段  """
        return self.readonly_fields
    
    readonly_fields = ('image_id',)
    

    class ContentXXXXadmin:
    model = ContentXXXX
    extra = 0
    list_display = ("xxx",)

    inlines = [ContentXXXXImageInfo, ]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions