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

force lowercase (on domain) when saving urls #13

Open
heysamtexas opened this issue Feb 4, 2020 · 2 comments
Open

force lowercase (on domain) when saving urls #13

heysamtexas opened this issue Feb 4, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@heysamtexas
Copy link
Member

override the save() method on the model to force lowercase

then perhaps for the sake of learning make a custom migration which does the same

@heysamtexas heysamtexas added the enhancement New feature or request label Feb 4, 2020
@heysamtexas
Copy link
Member Author

this is incorrect. only the domain should be lowercase.

in any case (no pun intended), the uniqueness should only be on an index based on the lowercase-ness of everthing. I know postgres can do it, but I am not sure if the djano orm can handle that.

@heysamtexas heysamtexas changed the title force lowercase when saving urls force lowercase (on domain) when saving urls Feb 7, 2020
@heysamtexas
Copy link
Member Author

Use postgres model field type CIText and call it done

@heysamtexas heysamtexas added the good first issue Good for newcomers label Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant