flatpages doesnt like url="foo.html"
|Reported by:||Carl Karsten <carl@…>||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
I needed to convert a site of static .html pages into flatpages, but couldn't because I needed the URLs to end in .html, but the dot causes isAlphaNumericURL to reject it. I took it out, and all is well, except that I now have hacked code that I have to deal with.
url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True,
help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))
It might be better to tune the validation, but I am not sure it is worth the effort.
Change History (3)
Changed 7 years ago by Carl Karsten <carl@…>
comment:1 Changed 7 years ago by programmerq
- Needs documentation unset
- Needs tests unset
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Design decision needed