3 ms·
A tiny little piece of Django design that I'm pleased to have participated in is this: emails = request.POST.getlist("email") Django doesn't mix lists and
by simonw 3y ago
A tiny little piece of Django design that I'm pleased to have participated in is this:
emails = request.POST.getlist("email")
Django doesn't mix lists and single string values, because I'd been burned by that problem in PHP.
- EGreg 3y agowait, what do you mean by in PHP?
- stephenr 3y agoIn php it would be trivial (and expected) to have a `string` type on a parameter that's expected to be a string - thus negating this issue. But then using the email address from the request rather than the already verified address in the DB seems like a weird design decision to me anyway.