A
A
Alexander Vinogradov2018-12-27 13:53:06
Django
Alexander Vinogradov, 2018-12-27 13:53:06

How to make a color select box in django?

How to make a field for choosing a color in django so that there would be a palette widget in the admin panel?
There is a recipe on the site , but I do not like it.
Is there a correct option?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Tikhonov, 2018-12-28
@ruchej

Use widget from HTML5:
forms.TextInput(attrs={'type': 'color'})

V
Vadim Shatalov, 2018-12-27
@netpastor

https://github.com/jaredly/django-colorfield try

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question