Skip to content

Conversation

danielrozenberg
Copy link
Contributor

This will change the following:

{{ form.field1|attr:'required' }}

From:

<input ... required="">

To:

<input ... required>

The former can still be generated by writing:

{{ form.field1|attr:'required:' }} 

This is the same exact change that I created in the pull request in bitbucket, which you asked me to create here in github instead. I also added test cases per your request, which I hope you will find satisfactory.

Cheers!

@danielrozenberg
Copy link
Contributor Author

I didn't realize this was automatically rejected by your build system until now 😮
Looks like this fails on versions prior to 1.8. What do you think is the best approach to this? It's a pretty useful feature but it relies on the backend to support non-value attributes. I can modify the test cases to just pass on Django versions < 1.8

@camilonova
Copy link
Member

@danielrozenberg If you are willing to consider this again, please make a new PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants