import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'branch_system.settings')
django.setup()

from django.test import Client

client = Client()
try:
    response = client.get('/login/')
    print(f"Status: {response.status_code}")
    if response.status_code == 500:
        print("Error occurred")
except Exception as e:
    print(f"Exception: {e}")
    import traceback
    traceback.print_exc()
