gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s

This commit is contained in:
2026-04-15 08:59:36 +02:00
commit ab73d05ecc
359 changed files with 14415 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
"""
Create a new app in django project command
"""
import os
from django.conf import settings
from django.core.management import base
class Command(base.BaseCommand):
help = "Generate new app"
def add_arguments(self, parser):
parser.add_argument("name")
def handle(self, *args, **options):
name = options.get("name")
if os.path.exists(
os.path.join(settings.BASE_DIR, f"core/apps/{name}")
):
self.stdout.write(self.style.ERROR(f"App {name} already"))
return
try:
os.system(
f"cd ./core/apps && python3 ./../../manage.py startapp {name}"
)
self.stdout.write(self.style.SUCCESS(f"Make app {name} created"))
except Exception as e:
self.stdout.write(self.style.ERROR(f"Error: {e}"))