11 lines
196 B
Python
11 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
|