Complete rewrite by OpenCode
This commit is contained in:
28
test_fresh_django.py
Normal file
28
test_fresh_django.py
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Change to project directory
|
||||
os.chdir('/home/adebaumann/development/vgui-cicd')
|
||||
|
||||
# Clear Python cache
|
||||
subprocess.run(['find', '.', '-name', '*.pyc', '-delete'], capture_output=True)
|
||||
subprocess.run(['find', '.', '-name', '__pycache__', '-type', 'd', '-exec', 'rm', '-rf', '{}', '+'], capture_output=True)
|
||||
|
||||
# Set environment variable
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'VorgabenUI.settings'
|
||||
|
||||
# Test Django import
|
||||
import django
|
||||
from django.conf import settings
|
||||
|
||||
try:
|
||||
django.setup()
|
||||
print('✓ Django setup successful')
|
||||
print('DATABASES:', settings.DATABASES)
|
||||
print('BASE_DIR:', getattr(settings, 'BASE_DIR', 'NOT SET'))
|
||||
except Exception as e:
|
||||
print('✗ Django setup failed:', e)
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
Reference in New Issue
Block a user