简体   繁体   English

允许最终用户添加到 Model、表单和模板 Django

[英]Allow End User To Add To Model, Form, and Template Django

Is there anything that someone could point me towards (a package, an example, a strategy, etc) of how I could implement the ability for an end user of my app to create a new field in a model, then add that model field to a model form and template?有没有人可以指出我如何实现我的应用程序的最终用户在 model 中创建新字段的能力(package,示例,策略等),然后将 Z20F35E630DAF49DFA4C 字段添加到model 表格和模板? I'm thinking of the way that Salesforce allows users to add Custom fields.我在想 Salesforce 允许用户添加自定义字段的方式。

I don't really have any start point here I am only looking to learn if/how this might be possible in Django.我在这里没有任何起点,我只是想了解在 Django 中是否/如何可能。

Thanks!谢谢!

I'm also looking for same type of solution.我也在寻找相同类型的解决方案。 But with some research, I came to know that we have this using ContentTypes framework.但是通过一些研究,我知道我们使用ContentTypes框架。

How to do it?怎么做? We can utilize ContentType's GenericForeignKeys and GenericRelations .我们可以利用 ContentType 的GenericForeignKeysGenericRelations

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM