Code Monkey home page Code Monkey logo

crispy-forms-gds's People

Contributors

ahernp avatar andyhd avatar chris48s avatar dependabot[bot] avatar dracos avatar jamesoutterside avatar kevincarrogan avatar radiac avatar stuartmackay avatar tllew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

crispy-forms-gds's Issues

Radios incorrectly setting initial when value is in another in the choices

When using RadioSelect and get_initial if your initial value is "in" another value it will set it to the last seen value it is "in"

example:

    RECOMMENDATION_CHOICES = [
        ("VERY_DISSATISFIED", "Very dissatisfied"),
        ("DISSATISFIED", "Dissatisfied"),
        ("NEUTRAL", "Neutral"),
        ("SATISFIED", "Satisfied"),
        ("VERY_SATISFIED", "Very satisfied"),
    ]

...view.py

def get_initial(self):
    initial = super().get_initial()
    initial["recommendation"] = "VERY_DISSATISFIED"
    return initial

In this care recommendation will always be set to "satisfied" due to the following logic in radio_item.html:

{% if choice.0 in field.value or choice.0|stringformat:"s" in field.value or choice.0|stringformat:"s" == field.value|stringformat:"s" %}
      checked="checked"
    {% endif %}

Where is version 0.3.1?

I was just looking at updating to 0.3.1 when I noticed I couldn't see any references to the following versions in the commit history or codebase.
I just want to confirm where this code is as it seems PyPI is ahead of GitHub at the moment.

I can see that you have commits that line up with the release history, so I assume that you've just not committed and pushed the version changes when publishing.

Just thought I would raise this as it rang some alarm bells ๐Ÿ˜ƒ

Invalid date in DateInputField causes crash

If a user enters an invalid date (e.g. 30 02 2021) in a DateInputField and submits the form then the code raises a ValueError in the compress function for that field. This is not trapped.

Fix is to check for the ValueError and raise a ValidationError instead See PR 59.

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.