oncall-engine/engine/common/api_helpers
Hamed Karbasi 9b70b79c78
use CustomURLValidator in custom_button (#1398)
# What this PR does
This PR, overrides Django URLValidator with a CustomURLValidator. It
just removes tld_re part from the regex, and the other behaviour remains
the same.
The CustomURLValidator is defined in common.api_helpers.utils.py file
and is utilized in custom_button.py.
Please inform me if it needs to be defined somewhere else or be
implemented with some other methods.

## Which issue(s) this PR fixes
Currently, URLValidator raises exception for URLs that don't have TLD.
This leads to not being able to use containers URL for outgoing webhooks
as they usually don't have TLD.

## Checklist

- [x] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-03-23 12:21:17 +00:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
custom_fields.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
custom_rate_scoped_throttler.py Add ratelimit for phone number verification (#1354) 2023-02-21 16:47:52 +08:00
exceptions.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
filters.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
mixins.py Teams redesign (#1528) 2023-03-22 00:57:20 +08:00
optional_slash_router.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
paginators.py Use create_engine_url to add prefix to previous/next links (#553) 2022-09-23 10:45:28 +01:00
utils.py use CustomURLValidator in custom_button (#1398) 2023-03-23 12:21:17 +00:00