#9713 closed (wontfix)
No verification of URL validity on django.db.models.fields.URLField
Reported by: | Masklinn | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation for URLField states, for the verify_exists
kwarg, If True (the default), the URL given will be checked for existence (i.e., the URL actually loads and doesn't give a 404 response).
But this validation doesn't seem to happen and, indeed, nothing in the URLField code performs any verification of the URL's validity.
The forms URLField on the other hand does perform URL verification and validation on verify_exists
.
I'm not sure whether it's a case of overreaching documentation or of something that wasill be checked for existence (i.e., the URL actually loads and doesn't give a 404 response).
But this validation doesn't seem to happen and, indeed, nothing in the URLField code performs any verification of the URL's validity.
The forms URLField on the other hand does perform URL verification and validation on verify_exists as documented.
I'm not sure whether it's a case of overreaching documentation or of something that was supposed to be included in t supposed to be included in the code but wasn't or was removed, so I marked this as a doc bug.
Change History (4)
comment:1 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I have no problem with that, but the documentation is still wrong as it clearly implies that the model itself will perform the validation, without saying that one has to use an intermediate form.
comment:3 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Noting every place where a constraint is only handled at the form level would create too many spurious documentation changes for no good reason, especially since model-level validation is slated for inclusion in the Django 1.1 release.
Model fields don't currently perform any sort of validation; form fields generated from them do. Hence, a form generated from your model will include the validation for the
URLField
.