django-app-Parfaite 0.2.0__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.
Files changed (25) hide show
  1. {app_creator → appcreation_Parfaite/app_creator}/cli.py +15 -9
  2. appcreation_Parfaite/apps.py +6 -0
  3. appcreation_Parfaite/parfaite/admin.py +3 -0
  4. appcreation_Parfaite/tests.py +3 -0
  5. appcreation_Parfaite/urls.py +0 -0
  6. appcreation_Parfaite/views/__init__.py +0 -0
  7. {django_app_parfaite-0.2.0.dist-info → django_app_parfaite-0.3.0.dist-info}/METADATA +2 -2
  8. django_app_parfaite-0.3.0.dist-info/RECORD +23 -0
  9. django_app_parfaite-0.3.0.dist-info/top_level.txt +1 -0
  10. django_app_parfaite-0.2.0.dist-info/RECORD +0 -18
  11. django_app_parfaite-0.2.0.dist-info/top_level.txt +0 -5
  12. {app_creator → appcreation_Parfaite}/__init__.py +0 -0
  13. {parfaite → appcreation_Parfaite}/admin.py +0 -0
  14. {migrations → appcreation_Parfaite/app_creator}/__init__.py +0 -0
  15. {models → appcreation_Parfaite/migrations}/__init__.py +0 -0
  16. {parfaite → appcreation_Parfaite/models}/__init__.py +0 -0
  17. {parfaite/migrations → appcreation_Parfaite/parfaite}/__init__.py +0 -0
  18. {parfaite → appcreation_Parfaite/parfaite}/apps.py +0 -0
  19. {views → appcreation_Parfaite/parfaite/migrations}/__init__.py +0 -0
  20. {parfaite → appcreation_Parfaite/parfaite}/models/__init__.py +0 -0
  21. {parfaite → appcreation_Parfaite/parfaite}/tests.py +0 -0
  22. {parfaite → appcreation_Parfaite/parfaite}/urls.py +0 -0
  23. {parfaite → appcreation_Parfaite/parfaite}/views/__init__.py +0 -0
  24. {django_app_parfaite-0.2.0.dist-info → django_app_parfaite-0.3.0.dist-info}/WHEEL +0 -0
  25. {django_app_parfaite-0.2.0.dist-info → django_app_parfaite-0.3.0.dist-info}/entry_points.txt +0 -0
@@ -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,10 +22,11 @@ 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 # Fichier vide requis pour marquer le dossier comme un package Python
25
+ pass
21
26
 
22
27
  with open(f"{app_name}/urls.py", "w") as f:
23
- jango.urls import path\n\n"
28
+ f.write(
29
+ "from django.urls import path\n\n"
24
30
  "urlpatterns = [\n"
25
31
  " # path('', views.index, name='index'),\n"
26
32
  "]\n"
@@ -30,7 +36,7 @@ jango.urls import path\n\n"
30
36
  f.write("from django.contrib import admin\n\n# Register your models here.\n")
31
37
 
32
38
  with open(f"{app_name}/apps.py", "w") as f:
33
- class_name = app_name.capitalize() + "Config"
39
+ class_name = to_camel_case(app_name) + "Config"
34
40
  f.write(
35
41
  "from django.apps import AppConfig\n\n"
36
42
  f"class {class_name}(AppConfig):\n"
@@ -39,10 +45,7 @@ jango.urls import path\n\n"
39
45
  )
40
46
 
41
47
  with open(f"{app_name}/tests.py", "w") as f:
42
- f.write(
43
- "from django.test import TestCase\n\n"
44
- "# Create your tests here.\n"
45
- )
48
+ f.write("from django.test import TestCase\n\n# Create your tests here.\n")
46
49
 
47
50
  print(f"App Django '{app_name}' créée avec succès !")
48
51
 
@@ -51,3 +54,6 @@ def main():
51
54
  print("Usage : django-create-app <nom_app>")
52
55
  else:
53
56
  create_app(sys.argv[1])
57
+
58
+ if __name__ == "__main__":
59
+ main()
@@ -0,0 +1,6 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class AppcreationparfaiteConfig(AppConfig):
5
+ default_auto_field = 'django.db.models.BigAutoField'
6
+ name = 'appcreation_parfaite'
@@ -0,0 +1,3 @@
1
+ from django.contrib import admin
2
+
3
+ # Register your models here.
@@ -0,0 +1,3 @@
1
+ from django.test import TestCase
2
+
3
+ # Create your tests here.
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-app-Parfaite
3
- Version: 0.2.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,7 +19,7 @@ Dynamic: summary
19
19
 
20
20
  # django-app-creator
21
21
 
22
- `django-app-creator` C’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.
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.
23
23
  ## Fonctionnalités
24
24
 
25
25
  - Crée automatiquement une application Django avec la structure suivante :
@@ -0,0 +1,23 @@
1
+ appcreation_Parfaite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ appcreation_Parfaite/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
3
+ appcreation_Parfaite/apps.py,sha256=PKM_4T1W2pOwex4nVCTFFsajgfIWkx_5T8MnEv7b4wY,171
4
+ appcreation_Parfaite/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
5
+ appcreation_Parfaite/urls.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ appcreation_Parfaite/app_creator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ appcreation_Parfaite/app_creator/cli.py,sha256=Fuu6OCMEhq3MqbZbIAg-u1mggDX50uxk4mpErKYOvGs,1922
8
+ appcreation_Parfaite/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ appcreation_Parfaite/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ appcreation_Parfaite/parfaite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ appcreation_Parfaite/parfaite/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
12
+ appcreation_Parfaite/parfaite/apps.py,sha256=GSW-CyPntzjy9_mSwO3TdQWEeOHcF17l9MFRVlJTA5A,147
13
+ appcreation_Parfaite/parfaite/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
14
+ appcreation_Parfaite/parfaite/urls.py,sha256=-3_l2Z6oNkP1iaZf5exoCSDxlOh3BAlBoAg9wSLELW8,91
15
+ appcreation_Parfaite/parfaite/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ appcreation_Parfaite/parfaite/models/__init__.py,sha256=0rPVvb48SPpEsn5t9bT3ziS2jeZ31VZ8jhM9I2vI5ws,14
17
+ appcreation_Parfaite/parfaite/views/__init__.py,sha256=3IylRHwsJ1fBLYV0JXkaa8Ai4nAyRGfsFPFBodaHxes,13
18
+ appcreation_Parfaite/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ django_app_parfaite-0.3.0.dist-info/METADATA,sha256=UEOC-YOGFuuymQLEKtIs8ABPVLlUb-vqi6VLlkxSUzM,1284
20
+ django_app_parfaite-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ django_app_parfaite-0.3.0.dist-info/entry_points.txt,sha256=-jAIpobaRuBFWCeOJweNVHeiodad73Ry9EJ-TkEp8Pg,51
22
+ django_app_parfaite-0.3.0.dist-info/top_level.txt,sha256=gON6wuuCuMi55YDN9qDtGOyGifWObcNRlfOcmDpfdso,21
23
+ django_app_parfaite-0.3.0.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ appcreation_Parfaite
@@ -1,18 +0,0 @@
1
- app_creator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- app_creator/cli.py,sha256=5pKGxU5JhYsDFjogFqYHOVEKXYXVKdmNaBOwDqpelj0,1706
3
- migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- parfaite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- parfaite/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
7
- parfaite/apps.py,sha256=GSW-CyPntzjy9_mSwO3TdQWEeOHcF17l9MFRVlJTA5A,147
8
- parfaite/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
9
- parfaite/urls.py,sha256=-3_l2Z6oNkP1iaZf5exoCSDxlOh3BAlBoAg9wSLELW8,91
10
- parfaite/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- parfaite/models/__init__.py,sha256=0rPVvb48SPpEsn5t9bT3ziS2jeZ31VZ8jhM9I2vI5ws,14
12
- parfaite/views/__init__.py,sha256=3IylRHwsJ1fBLYV0JXkaa8Ai4nAyRGfsFPFBodaHxes,13
13
- views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- django_app_parfaite-0.2.0.dist-info/METADATA,sha256=2d5mWst_S9BJe95iTtdXPit9zAWexkQWYUZ7eBUTtIw,1289
15
- django_app_parfaite-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- django_app_parfaite-0.2.0.dist-info/entry_points.txt,sha256=-jAIpobaRuBFWCeOJweNVHeiodad73Ry9EJ-TkEp8Pg,51
17
- django_app_parfaite-0.2.0.dist-info/top_level.txt,sha256=aa3_dy_AaRixnHSLGIPbnlnZ7xGzihS9k-GdkDENKUw,45
18
- django_app_parfaite-0.2.0.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- app_creator
2
- migrations
3
- models
4
- parfaite
5
- views
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes