khaganat-web/utils.py
Rodolphe Breard b0b8f30580 Migrate to Bulma
Bulma is simple and free full-CSS framework. Unlike Bootstrap, it fits
within a single small CSS file. It is also well integrated in Django.
https://bulma.io/
2018-06-03 22:16:40 +02:00

10 lines
196 B
Python

from django.urls.exceptions import Resolver404
from django.urls import resolve
def is_link_legit(url):
try:
resolve(url)
except Resolver404:
return False
return True