fabiocaccamo / django-colorfield

:art: color field for django models with a nice color-picker in the admin.
MIT License
632 stars 95 forks source link

Default color not reflecting #17

Closed snig-b closed 7 years ago

snig-b commented 8 years ago

I have given a default hex value ('#FFC107') in the model field. But the widget still gets initialized with #FFFFFF . Any clue as to why this is happening?

fabiocaccamo commented 8 years ago

With which Django version did you issue the problem?

snig-b commented 8 years ago

Hey, I am Django 1.6.5

snig-b commented 8 years ago

Any updates on this? I debugged it and seems the value context variable for colorfield widget is being set None, shouldn't it receive the color I gave as default. I went in deeper in django libraries and failed to find out what the problem is... since it is None, jscolor.js changes it to #FFFFFF .

fabiocaccamo commented 8 years ago

Sorry, I had not yet the time to investigate it.

I can tell you that I'm using django-colorfield as dependency of the django-admin-interface app and default value works correctly.

Could you try to test it on a more recent django version?

gtnx commented 7 years ago

Same for me. It works fine. Please provide more info

snig-b commented 7 years ago

Seemed to work on a newer version. If I face the problem again I'll request a reopen then. You can close the issue. Thanks