We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81f7c7e commit 019d273Copy full SHA for 019d273
scripts/app.py
@@ -20,7 +20,6 @@ def create_app():
20
os.makedirs(app_path, exist_ok=True)
21
22
# Create the app's directories
23
- init_dir(app_path, "admin")
24
init_dir(app_path, "factories")
25
init_dir(app_path, "filters")
26
init_dir(app_path, "migrations")
@@ -31,8 +30,19 @@ def create_app():
31
30
init_dir(app_path, "views")
32
init_dir(app_path, "serializers")
33
+ # create tests directory
34
+ TESTS_PATH = os.path.join(BASE_PATH, "tests")
35
+
36
+ if app_name in os.listdir(TESTS_PATH):
37
+ print(f"App '{app_name}' already exists in 'tests'.")
38
+ else:
39
+ path = os.path.join(TESTS_PATH, app_name)
40
+ os.makedirs(os.path.join(TESTS_PATH, app_name), exist_ok=True)
41
+ init_app_file(path, "__init__.py")
42
43
# Create the app's files
44
init_app_file(app_path, "__init__.py")
45
+ init_app_file(app_path, "admin.py")
46
47
config_content = f"""from django.apps import AppConfig
48
0 commit comments