23 lines
568 B
Python
23 lines
568 B
Python
|
|
import os
|
|
import django
|
|
from django.conf import settings
|
|
from django.urls import reverse, resolve
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
|
django.setup()
|
|
|
|
try:
|
|
print("Attempting to reverse 'inventory'...")
|
|
url = reverse('inventory')
|
|
print(f"Success: 'inventory' -> {url}")
|
|
except Exception as e:
|
|
print(f"Error reversing 'inventory': {e}")
|
|
|
|
try:
|
|
print("Attempting to reverse 'index'...")
|
|
url = reverse('index')
|
|
print(f"Success: 'index' -> {url}")
|
|
except Exception as e:
|
|
print(f"Error reversing 'index': {e}")
|