Skip to content

Commit

Permalink
Merge branch 'dev' into dependabot/pip/dev/sentry-sdk-2.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNyl authored Oct 1, 2024
2 parents 6d5682b + 019d273 commit bba5a65
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def create_app():
os.makedirs(app_path, exist_ok=True)

# Create the app's directories
init_dir(app_path, "admin")
init_dir(app_path, "factories")
init_dir(app_path, "filters")
init_dir(app_path, "migrations")
Expand All @@ -31,8 +30,19 @@ def create_app():
init_dir(app_path, "views")
init_dir(app_path, "serializers")

# create tests directory
TESTS_PATH = os.path.join(BASE_PATH, "tests")

if app_name in os.listdir(TESTS_PATH):
print(f"App '{app_name}' already exists in 'tests'.")
else:
path = os.path.join(TESTS_PATH, app_name)
os.makedirs(os.path.join(TESTS_PATH, app_name), exist_ok=True)
init_app_file(path, "__init__.py")

# Create the app's files
init_app_file(app_path, "__init__.py")
init_app_file(app_path, "admin.py")

config_content = f"""from django.apps import AppConfig
Expand Down

0 comments on commit bba5a65

Please sign in to comment.