一个django应用程序,它集成了jquery colorpicker和django管理员。
django-paintstore的Python项目详细描述
django-paintstore是一个django应用程序,它集成了jQuery ColorPicker和django管理员
快速启动
使用首选的python打包实用程序安装应用程序,例如:
pip install django-paintstore
将应用程序添加到设置中的INSTALLED_APPS。py:
INSTALLED_APPS = ( # ... 'paintstore', )
将ColorPickerField添加到您的模型:
# ... from paintstore.fields import ColorPickerField class ColorfulModel(models.Model): title = models.CharField(max_length=25) color = ColorPickerField()
可选:在模型的更改列表管理中直接编辑颜色:
class ColorfulModelAdmin(admin.ModelAdmin): list_display = ["title", "color",] list_editable = ["color",]
待办事项
- 用选定颜色的样本替换显示颜色十六进制代码的文本输入
- 文档(准备添加以阅读文档)
- 测试