Coder Social home page Coder Social logo

widget attrs about django-colorfield HOT 7 CLOSED

fabiocaccamo avatar fabiocaccamo commented on June 19, 2024
widget attrs

from django-colorfield.

Comments (7)

fabiocaccamo avatar fabiocaccamo commented on June 19, 2024 3

@N1K1TAS95 thank you for the PR, you can upgrade to 0.7.1 version.

from django-colorfield.

fabiocaccamo avatar fabiocaccamo commented on June 19, 2024 1

@N1K1TAS95 thank you for reporting this, if in the meantime you fix it, feel free to submit a PR.

from django-colorfield.

polrodoreda avatar polrodoreda commented on June 19, 2024

Same problem here. It will be a great update.

from django-colorfield.

fabiocaccamo avatar fabiocaccamo commented on June 19, 2024

I just released 0.2.0 version, could you check it please?

from django-colorfield.

N1K1TAS95 avatar N1K1TAS95 commented on June 19, 2024

Hi!
I stil have this issue.
My form is:

from colorfield.widgets import ColorWidget

class CategoryForm(forms.ModelForm):
    class Meta:
        model = Category
        fields = ['name', 'fontawesome_icon', 'color']
        widgets = {'color': ColorWidget(attrs={'class': 'input'})}

and when rendered the resulting input classes are form-control colorfield_field jscolor.

I have colorfield versione 0.7.0 and Django 4.0.4

Thanks 😉.

from django-colorfield.

N1K1TAS95 avatar N1K1TAS95 commented on June 19, 2024

@fabiocaccamo I've added a PR.
I found that template color.html did not included {{ class }} from context while rendering.

from django-colorfield.

N1K1TAS95 avatar N1K1TAS95 commented on June 19, 2024

@fabiocaccamo
I also think that form-control is for Bootstrap only. Maybe it's the case to remove this defalut class and let user decide it. But it maybe break someones code...

from django-colorfield.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.