django-app-Parfaite 0.1.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.
@@ -0,0 +1,3 @@
1
+ from django.contrib import admin
2
+
3
+ # Register your models here.
@@ -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 # 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
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.capitalize() + "Config"
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()
@@ -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'
File without changes
@@ -0,0 +1,3 @@
1
+ from django.contrib import admin
2
+
3
+ # Register your models here.
@@ -0,0 +1,5 @@
1
+ from django.apps import AppConfig
2
+
3
+ class ParfaiteConfig(AppConfig):
4
+ default_auto_field = 'django.db.models.BigAutoField'
5
+ name = 'parfaite'
File without changes
@@ -0,0 +1 @@
1
+ # models here
@@ -0,0 +1,3 @@
1
+ from django.test import TestCase
2
+
3
+ # Create your tests here.
@@ -0,0 +1,5 @@
1
+ from django.urls import path
2
+
3
+ urlpatterns = [
4
+ # path('', views.index, name='index'),
5
+ ]
@@ -0,0 +1 @@
1
+ # views 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.1.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` est un outil en ligne de commande qui permet de générer rapidement la structure d'une application Django avec une organisation de fichiers personnalisée.
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,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,10 +0,0 @@
1
- app_creator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- app_creator/cli.py,sha256=whvGKPq_SaMIwjULfwgOSe9SRwFKr2dV0Y-vEuDksxg,1742
3
- migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- django_app_parfaite-0.1.0.dist-info/METADATA,sha256=UmRYyivvVBAEHAv03LZ888oDfang4qOD1X_CVWfiTyU,1290
7
- django_app_parfaite-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- django_app_parfaite-0.1.0.dist-info/entry_points.txt,sha256=-jAIpobaRuBFWCeOJweNVHeiodad73Ry9EJ-TkEp8Pg,51
9
- django_app_parfaite-0.1.0.dist-info/top_level.txt,sha256=Esau6K05IvL6ZobjzqOFl-L3wW08Qy_WdJ-E4UrCiQE,36
10
- django_app_parfaite-0.1.0.dist-info/RECORD,,
@@ -1,4 +0,0 @@
1
- app_creator
2
- migrations
3
- models
4
- views
File without changes
File without changes
File without changes