Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple fields customizable #123

Closed
wants to merge 2 commits into from
Closed

Conversation

adamchainz
Copy link
Owner

Resolves #122 .

Todo:

  • Make them customizable
  • Test fully
  • Docs

@adamchainz
Copy link
Owner Author

Could also just support the delimiter argument like https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/forms/ - although it's a little less flexible and requires the default error messages to change to be more generic.

@adamchainz adamchainz force-pushed the simple_fields_customizable branch from 11e416e to a6e69bd Compare June 26, 2015 13:29
@adamchainz
Copy link
Owner Author

I'm not entirely sold on this. django.contrib.postgres's SimpleArrayField is more customizable but this is mostly because the delimiter is not part of the database backend. In most cases I think it's probably better for the user to copy/paste the class and rewrite the validation logic because it's a bit tangled - realistically this pull request will only allow the customization of the delimiter and maybe the addition of simple things like .strip() on the input, which I don't think is really worth it.

@adamchainz
Copy link
Owner Author

Abandoning after re-reasoning the above.

@adamchainz adamchainz closed this Jul 9, 2015
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.

Make SimpleListField and SimpleSetField easier to customize
1 participant