wildfish / crispy-forms-gds Goto Github PK
View Code? Open in Web Editor NEWDjango Crispy Forms template pack for the Gov.UK Design System
License: BSD 3-Clause "New" or "Revised" License
Django Crispy Forms template pack for the Gov.UK Design System
License: BSD 3-Clause "New" or "Revised" License
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 %}
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 ๐
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.
There's a bug at https://github.com/wildfish/crispy-forms-gds/blob/1a5729c/src/crispy_forms_gds/fields.py#L108 currently where an empty list is passed to .compress
, which then errors as it tries to unpack multiple values.
They've changed the size modifier to be --{modifier} rather than just {modifier}, is it possible to get these updated?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.