File: compat.py

package info (click to toggle)
python-django-contrib-comments 2.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,780 kB
  • sloc: python: 2,392; makefile: 142; xml: 15; sh: 6
file content (8 lines) | stat: -rw-r--r-- 289 bytes parent folder | download
1
2
3
4
5
6
7
8
"""
Module to store compatiblity imports to prevent Django deprecation warnings.
"""
try:
    # Introduced in Django 3.0.
    from django.utils.http import url_has_allowed_host_and_scheme
except ImportError:
    from django.utils.http import is_safe_url as url_has_allowed_host_and_scheme