Spaces:
Runtime error
Runtime error
Update urls.py
Browse files
urls.py
CHANGED
|
@@ -15,4 +15,12 @@ urlpatterns = [
|
|
| 15 |
path('api/receipts/', include('receipts.urls')),
|
| 16 |
path('api/inventory/', include('inventory.urls')),
|
| 17 |
path('api/reports/', include('reports.urls')),
|
| 18 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
path('api/receipts/', include('receipts.urls')),
|
| 16 |
path('api/inventory/', include('inventory.urls')),
|
| 17 |
path('api/reports/', include('reports.urls')),
|
| 18 |
+
]
|
| 19 |
+
from django.contrib.auth import get_user_model
|
| 20 |
+
User = get_user_model()
|
| 21 |
+
try:
|
| 22 |
+
if not User.objects.filter(email='joshuaolega193@gmail.com').exists():
|
| 23 |
+
User.objects.create_superuser('joshuaolega193@gmail.com', 'YourSecurePassword123!')
|
| 24 |
+
print("Superuser created successfully!")
|
| 25 |
+
except Exception as e:
|
| 26 |
+
print(f"Superuser creation error: {e}")
|