screenshots icon indicating copy to clipboard operation
screenshots copied to clipboard

force lowercase (on domain) when saving urls

Open heysamtexas opened this issue 6 years ago • 2 comments

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 avatar Feb 04 '20 11:02 heysamtexas

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 avatar Feb 07 '20 12:02 heysamtexas

Use postgres model field type CIText and call it done

heysamtexas avatar Sep 10 '22 22:09 heysamtexas