django-app-Parfaite 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/PKG-INFO +2 -3
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/README.md +1 -2
- django_app_parfaite-0.3.0/appcreation_Parfaite/admin.py +3 -0
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0/appcreation_Parfaite}/app_creator/cli.py +13 -8
- django_app_parfaite-0.3.0/appcreation_Parfaite/apps.py +6 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/__init__.py +0 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/admin.py +3 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/apps.py +5 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/migrations/__init__.py +0 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/models/__init__.py +1 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/tests.py +3 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/urls.py +5 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/parfaite/views/__init__.py +1 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/tests.py +3 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/urls.py +0 -0
- django_app_parfaite-0.3.0/appcreation_Parfaite/views/__init__.py +0 -0
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/django_app_Parfaite.egg-info/PKG-INFO +2 -3
- django_app_parfaite-0.3.0/django_app_Parfaite.egg-info/SOURCES.txt +25 -0
- django_app_parfaite-0.3.0/django_app_Parfaite.egg-info/top_level.txt +1 -0
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/setup.py +1 -1
- django_app_parfaite-0.1.0/django_app_Parfaite.egg-info/SOURCES.txt +0 -12
- django_app_parfaite-0.1.0/django_app_Parfaite.egg-info/top_level.txt +0 -4
- {django_app_parfaite-0.1.0/app_creator → django_app_parfaite-0.3.0/appcreation_Parfaite}/__init__.py +0 -0
- {django_app_parfaite-0.1.0/migrations → django_app_parfaite-0.3.0/appcreation_Parfaite/app_creator}/__init__.py +0 -0
- {django_app_parfaite-0.1.0/models → django_app_parfaite-0.3.0/appcreation_Parfaite/migrations}/__init__.py +0 -0
- {django_app_parfaite-0.1.0/views → django_app_parfaite-0.3.0/appcreation_Parfaite/models}/__init__.py +0 -0
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/django_app_Parfaite.egg-info/dependency_links.txt +0 -0
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/django_app_Parfaite.egg-info/entry_points.txt +0 -0
- {django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: django-app-Parfaite
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: Générateur de structure d'app Django personnalisée
|
5
5
|
Author: ParfaiteSekongo
|
6
6
|
Author-email: p88971582@gmail.com
|
@@ -19,8 +19,7 @@ Dynamic: summary
|
|
19
19
|
|
20
20
|
# django-app-creator
|
21
21
|
|
22
|
-
`django-app-creator
|
23
|
-
|
22
|
+
`django-app-creator est un outil en ligne de commande qui permet de générer rapidement la structure d’un projet Django avec une organisation de fichiers personnalisée.
|
24
23
|
## Fonctionnalités
|
25
24
|
|
26
25
|
- Crée automatiquement une application Django avec la structure suivante :
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# django-app-creator
|
2
2
|
|
3
|
-
`django-app-creator
|
4
|
-
|
3
|
+
`django-app-creator est un outil en ligne de commande qui permet de générer rapidement la structure d’un projet Django avec une organisation de fichiers personnalisée.
|
5
4
|
## Fonctionnalités
|
6
5
|
|
7
6
|
- Crée automatiquement une application Django avec la structure suivante :
|
{django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0/appcreation_Parfaite}/app_creator/cli.py
RENAMED
@@ -1,5 +1,12 @@
|
|
1
1
|
import os
|
2
2
|
import sys
|
3
|
+
import re
|
4
|
+
|
5
|
+
def to_camel_case(value):
|
6
|
+
# Remplace tous les séparateurs non alphanumériques par un espace
|
7
|
+
value = re.sub(r'[^a-zA-Z0-9]', ' ', value)
|
8
|
+
# Découpe par espace et capitalise chaque mot
|
9
|
+
return ''.join(word.capitalize() for word in value.split())
|
3
10
|
|
4
11
|
def create_app(app_name):
|
5
12
|
os.makedirs(app_name, exist_ok=True)
|
@@ -7,9 +14,7 @@ def create_app(app_name):
|
|
7
14
|
os.makedirs(f"{app_name}/views", exist_ok=True)
|
8
15
|
os.makedirs(f"{app_name}/migrations", exist_ok=True)
|
9
16
|
|
10
|
-
# Fichiers de base
|
11
17
|
with open(f"{app_name}/__init__.py", "w"): pass
|
12
|
-
|
13
18
|
with open(f"{app_name}/models/__init__.py", "w") as f:
|
14
19
|
f.write("# models here\n")
|
15
20
|
|
@@ -17,7 +22,7 @@ def create_app(app_name):
|
|
17
22
|
f.write("# views here\n")
|
18
23
|
|
19
24
|
with open(f"{app_name}/migrations/__init__.py", "w") as f:
|
20
|
-
pass
|
25
|
+
pass
|
21
26
|
|
22
27
|
with open(f"{app_name}/urls.py", "w") as f:
|
23
28
|
f.write(
|
@@ -31,7 +36,7 @@ def create_app(app_name):
|
|
31
36
|
f.write("from django.contrib import admin\n\n# Register your models here.\n")
|
32
37
|
|
33
38
|
with open(f"{app_name}/apps.py", "w") as f:
|
34
|
-
class_name = app_name
|
39
|
+
class_name = to_camel_case(app_name) + "Config"
|
35
40
|
f.write(
|
36
41
|
"from django.apps import AppConfig\n\n"
|
37
42
|
f"class {class_name}(AppConfig):\n"
|
@@ -40,10 +45,7 @@ def create_app(app_name):
|
|
40
45
|
)
|
41
46
|
|
42
47
|
with open(f"{app_name}/tests.py", "w") as f:
|
43
|
-
f.write(
|
44
|
-
"from django.test import TestCase\n\n"
|
45
|
-
"# Create your tests here.\n"
|
46
|
-
)
|
48
|
+
f.write("from django.test import TestCase\n\n# Create your tests here.\n")
|
47
49
|
|
48
50
|
print(f"App Django '{app_name}' créée avec succès !")
|
49
51
|
|
@@ -52,3 +54,6 @@ def main():
|
|
52
54
|
print("Usage : django-create-app <nom_app>")
|
53
55
|
else:
|
54
56
|
create_app(sys.argv[1])
|
57
|
+
|
58
|
+
if __name__ == "__main__":
|
59
|
+
main()
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
# models here
|
@@ -0,0 +1 @@
|
|
1
|
+
# views here
|
File without changes
|
File without changes
|
{django_app_parfaite-0.1.0 → django_app_parfaite-0.3.0}/django_app_Parfaite.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: django-app-Parfaite
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: Générateur de structure d'app Django personnalisée
|
5
5
|
Author: ParfaiteSekongo
|
6
6
|
Author-email: p88971582@gmail.com
|
@@ -19,8 +19,7 @@ Dynamic: summary
|
|
19
19
|
|
20
20
|
# django-app-creator
|
21
21
|
|
22
|
-
`django-app-creator
|
23
|
-
|
22
|
+
`django-app-creator est un outil en ligne de commande qui permet de générer rapidement la structure d’un projet Django avec une organisation de fichiers personnalisée.
|
24
23
|
## Fonctionnalités
|
25
24
|
|
26
25
|
- Crée automatiquement une application Django avec la structure suivante :
|
@@ -0,0 +1,25 @@
|
|
1
|
+
README.md
|
2
|
+
setup.py
|
3
|
+
appcreation_Parfaite/__init__.py
|
4
|
+
appcreation_Parfaite/admin.py
|
5
|
+
appcreation_Parfaite/apps.py
|
6
|
+
appcreation_Parfaite/tests.py
|
7
|
+
appcreation_Parfaite/urls.py
|
8
|
+
appcreation_Parfaite/app_creator/__init__.py
|
9
|
+
appcreation_Parfaite/app_creator/cli.py
|
10
|
+
appcreation_Parfaite/migrations/__init__.py
|
11
|
+
appcreation_Parfaite/models/__init__.py
|
12
|
+
appcreation_Parfaite/parfaite/__init__.py
|
13
|
+
appcreation_Parfaite/parfaite/admin.py
|
14
|
+
appcreation_Parfaite/parfaite/apps.py
|
15
|
+
appcreation_Parfaite/parfaite/tests.py
|
16
|
+
appcreation_Parfaite/parfaite/urls.py
|
17
|
+
appcreation_Parfaite/parfaite/migrations/__init__.py
|
18
|
+
appcreation_Parfaite/parfaite/models/__init__.py
|
19
|
+
appcreation_Parfaite/parfaite/views/__init__.py
|
20
|
+
appcreation_Parfaite/views/__init__.py
|
21
|
+
django_app_Parfaite.egg-info/PKG-INFO
|
22
|
+
django_app_Parfaite.egg-info/SOURCES.txt
|
23
|
+
django_app_Parfaite.egg-info/dependency_links.txt
|
24
|
+
django_app_Parfaite.egg-info/entry_points.txt
|
25
|
+
django_app_Parfaite.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
appcreation_Parfaite
|
@@ -1,12 +0,0 @@
|
|
1
|
-
README.md
|
2
|
-
setup.py
|
3
|
-
app_creator/__init__.py
|
4
|
-
app_creator/cli.py
|
5
|
-
django_app_Parfaite.egg-info/PKG-INFO
|
6
|
-
django_app_Parfaite.egg-info/SOURCES.txt
|
7
|
-
django_app_Parfaite.egg-info/dependency_links.txt
|
8
|
-
django_app_Parfaite.egg-info/entry_points.txt
|
9
|
-
django_app_Parfaite.egg-info/top_level.txt
|
10
|
-
migrations/__init__.py
|
11
|
-
models/__init__.py
|
12
|
-
views/__init__.py
|
{django_app_parfaite-0.1.0/app_creator → django_app_parfaite-0.3.0/appcreation_Parfaite}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|