create-app-savane 0.0.1__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.
- create_app_savane-0.0.1/PKG-INFO +121 -0
- create_app_savane-0.0.1/README.md +97 -0
- create_app_savane-0.0.1/create_app/__init__.py +0 -0
- create_app_savane-0.0.1/create_app/cli.py +52 -0
- create_app_savane-0.0.1/create_app_savane.egg-info/PKG-INFO +121 -0
- create_app_savane-0.0.1/create_app_savane.egg-info/SOURCES.txt +9 -0
- create_app_savane-0.0.1/create_app_savane.egg-info/dependency_links.txt +1 -0
- create_app_savane-0.0.1/create_app_savane.egg-info/entry_points.txt +2 -0
- create_app_savane-0.0.1/create_app_savane.egg-info/top_level.txt +1 -0
- create_app_savane-0.0.1/setup.cfg +4 -0
- create_app_savane-0.0.1/setup.py +34 -0
@@ -0,0 +1,121 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: create-app-savane
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: Générateur de structure d'app Django personnalisée
|
5
|
+
Author: SAVANE Mouhamed
|
6
|
+
Author-email: savanemouhamed05@gmail.com
|
7
|
+
License: MIT
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: Framework :: Django
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
11
|
+
Classifier: Operating System :: OS Independent
|
12
|
+
Classifier: Intended Audience :: Developers
|
13
|
+
Classifier: Topic :: Software Development :: Code Generators
|
14
|
+
Requires-Python: >=3.6
|
15
|
+
Description-Content-Type: text/markdown
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: author-email
|
18
|
+
Dynamic: classifier
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: license
|
22
|
+
Dynamic: requires-python
|
23
|
+
Dynamic: summary
|
24
|
+
|
25
|
+
# create-app-savane
|
26
|
+
|
27
|
+
**create-app-savane** est un générateur d’application Django personnalisée, conçu pour créer rapidement une structure claire, modulaire et professionnelle d’app Django, avec les bons dossiers et fichiers dès le départ.
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
## ✨ Fonctionnalités
|
32
|
+
|
33
|
+
- Génère une app Django prête à l’emploi
|
34
|
+
- Crée des dossiers `models/` et `views/` au lieu des fichiers `models.py` et `views.py`
|
35
|
+
- Crée automatiquement :
|
36
|
+
- `urls.py`
|
37
|
+
- `admin.py`
|
38
|
+
- `apps.py`
|
39
|
+
- `tests.py`
|
40
|
+
- le dossier `migrations/` avec son `__init__.py`
|
41
|
+
- Fonctionne avec n’importe quel projet Django
|
42
|
+
|
43
|
+
---
|
44
|
+
|
45
|
+
## 📦 Installation
|
46
|
+
|
47
|
+
Pour installer ce package depuis PyPI :
|
48
|
+
|
49
|
+
```bash
|
50
|
+
pip install create-app-savane
|
51
|
+
|
52
|
+
## Utilisation
|
53
|
+
|
54
|
+
Une fois installé, utilisez la commande suivante pour créer une nouvelle application Django :
|
55
|
+
|
56
|
+
create-app nom_de_mon_app
|
57
|
+
|
58
|
+
|
59
|
+
## Exemple
|
60
|
+
|
61
|
+
create-app blog
|
62
|
+
|
63
|
+
|
64
|
+
Cela va générer un dossier blog/ avec la structure suivante :
|
65
|
+
|
66
|
+
blog/
|
67
|
+
├── __init__.py
|
68
|
+
├── admin.py
|
69
|
+
├── apps.py
|
70
|
+
├── migrations/
|
71
|
+
│ └── __init__.py
|
72
|
+
├── models/
|
73
|
+
│ └── __init__.py
|
74
|
+
├── views/
|
75
|
+
│ └── __init__.py
|
76
|
+
├── urls.py
|
77
|
+
└── tests.py
|
78
|
+
|
79
|
+
|
80
|
+
## 🧠 Comment ça fonctionne ?
|
81
|
+
|
82
|
+
La commande create-app :
|
83
|
+
|
84
|
+
Crée un dossier portant le nom de l’application.
|
85
|
+
Génère les sous-dossiers models/, views/, migrations/ (avec leurs __init__.py respectifs).
|
86
|
+
Crée les fichiers essentiels à une app Django : admin.py, apps.py, tests.py, urls.py.
|
87
|
+
Prépare une app prête à être intégrée dans un projet Django existant.
|
88
|
+
|
89
|
+
|
90
|
+
## 🔧 Intégration dans un projet Django
|
91
|
+
|
92
|
+
Voici un exemple d'utilisation :
|
93
|
+
|
94
|
+
django-admin startproject monprojet
|
95
|
+
cd monprojet
|
96
|
+
create-app boutique
|
97
|
+
|
98
|
+
Puis, dans monprojet/settings.py, ajoute 'boutique' à la liste INSTALLED_APPS :
|
99
|
+
|
100
|
+
INSTALLED_APPS = [
|
101
|
+
...
|
102
|
+
'boutique',
|
103
|
+
]
|
104
|
+
|
105
|
+
|
106
|
+
## ✅ Avantages
|
107
|
+
|
108
|
+
Gagnez du temps à chaque création d'application Django
|
109
|
+
Structure claire et modulaire
|
110
|
+
Prêt pour des projets évolutifs ou en équipe
|
111
|
+
🧑💻 Auteur
|
112
|
+
|
113
|
+
SAVANE Mouhamed
|
114
|
+
📧 savanemouhamed05@gmail.com
|
115
|
+
🛠️ Licence : MIT
|
116
|
+
🌍 Côte d’Ivoire
|
117
|
+
|
118
|
+
📚 Exigences
|
119
|
+
|
120
|
+
Python ≥ 3.6
|
121
|
+
Django ≥ 3.2 recommandé
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# create-app-savane
|
2
|
+
|
3
|
+
**create-app-savane** est un générateur d’application Django personnalisée, conçu pour créer rapidement une structure claire, modulaire et professionnelle d’app Django, avec les bons dossiers et fichiers dès le départ.
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
## ✨ Fonctionnalités
|
8
|
+
|
9
|
+
- Génère une app Django prête à l’emploi
|
10
|
+
- Crée des dossiers `models/` et `views/` au lieu des fichiers `models.py` et `views.py`
|
11
|
+
- Crée automatiquement :
|
12
|
+
- `urls.py`
|
13
|
+
- `admin.py`
|
14
|
+
- `apps.py`
|
15
|
+
- `tests.py`
|
16
|
+
- le dossier `migrations/` avec son `__init__.py`
|
17
|
+
- Fonctionne avec n’importe quel projet Django
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
## 📦 Installation
|
22
|
+
|
23
|
+
Pour installer ce package depuis PyPI :
|
24
|
+
|
25
|
+
```bash
|
26
|
+
pip install create-app-savane
|
27
|
+
|
28
|
+
## Utilisation
|
29
|
+
|
30
|
+
Une fois installé, utilisez la commande suivante pour créer une nouvelle application Django :
|
31
|
+
|
32
|
+
create-app nom_de_mon_app
|
33
|
+
|
34
|
+
|
35
|
+
## Exemple
|
36
|
+
|
37
|
+
create-app blog
|
38
|
+
|
39
|
+
|
40
|
+
Cela va générer un dossier blog/ avec la structure suivante :
|
41
|
+
|
42
|
+
blog/
|
43
|
+
├── __init__.py
|
44
|
+
├── admin.py
|
45
|
+
├── apps.py
|
46
|
+
├── migrations/
|
47
|
+
│ └── __init__.py
|
48
|
+
├── models/
|
49
|
+
│ └── __init__.py
|
50
|
+
├── views/
|
51
|
+
│ └── __init__.py
|
52
|
+
├── urls.py
|
53
|
+
└── tests.py
|
54
|
+
|
55
|
+
|
56
|
+
## 🧠 Comment ça fonctionne ?
|
57
|
+
|
58
|
+
La commande create-app :
|
59
|
+
|
60
|
+
Crée un dossier portant le nom de l’application.
|
61
|
+
Génère les sous-dossiers models/, views/, migrations/ (avec leurs __init__.py respectifs).
|
62
|
+
Crée les fichiers essentiels à une app Django : admin.py, apps.py, tests.py, urls.py.
|
63
|
+
Prépare une app prête à être intégrée dans un projet Django existant.
|
64
|
+
|
65
|
+
|
66
|
+
## 🔧 Intégration dans un projet Django
|
67
|
+
|
68
|
+
Voici un exemple d'utilisation :
|
69
|
+
|
70
|
+
django-admin startproject monprojet
|
71
|
+
cd monprojet
|
72
|
+
create-app boutique
|
73
|
+
|
74
|
+
Puis, dans monprojet/settings.py, ajoute 'boutique' à la liste INSTALLED_APPS :
|
75
|
+
|
76
|
+
INSTALLED_APPS = [
|
77
|
+
...
|
78
|
+
'boutique',
|
79
|
+
]
|
80
|
+
|
81
|
+
|
82
|
+
## ✅ Avantages
|
83
|
+
|
84
|
+
Gagnez du temps à chaque création d'application Django
|
85
|
+
Structure claire et modulaire
|
86
|
+
Prêt pour des projets évolutifs ou en équipe
|
87
|
+
🧑💻 Auteur
|
88
|
+
|
89
|
+
SAVANE Mouhamed
|
90
|
+
📧 savanemouhamed05@gmail.com
|
91
|
+
🛠️ Licence : MIT
|
92
|
+
🌍 Côte d’Ivoire
|
93
|
+
|
94
|
+
📚 Exigences
|
95
|
+
|
96
|
+
Python ≥ 3.6
|
97
|
+
Django ≥ 3.2 recommandé
|
File without changes
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import os
|
2
|
+
import sys
|
3
|
+
|
4
|
+
def create_app(app_name):
|
5
|
+
os.makedirs(app_name, exist_ok=True)
|
6
|
+
os.makedirs(f"{app_name}/models", exist_ok=True)
|
7
|
+
os.makedirs(f"{app_name}/views", exist_ok=True)
|
8
|
+
os.makedirs(f"{app_name}/migrations", exist_ok=True)
|
9
|
+
|
10
|
+
# Fichiers de base
|
11
|
+
with open(f"{app_name}/migrations/__init__.py", "w"): pass
|
12
|
+
with open(f"{app_name}/__init__.py", "w"): pass
|
13
|
+
|
14
|
+
with open(f"{app_name}/models/__init__.py", "w") as f:
|
15
|
+
f.write("# models here\n")
|
16
|
+
|
17
|
+
with open(f"{app_name}/views/__init__.py", "w") as f:
|
18
|
+
f.write("# views here\n")
|
19
|
+
|
20
|
+
with open(f"{app_name}/urls.py", "w") as f:
|
21
|
+
f.write(
|
22
|
+
"from django.urls import path\n\n"
|
23
|
+
"urlpatterns = [\n"
|
24
|
+
" # path('', views.index, name='index'),\n"
|
25
|
+
"]\n"
|
26
|
+
)
|
27
|
+
|
28
|
+
with open(f"{app_name}/admin.py", "w") as f:
|
29
|
+
f.write("from django.contrib import admin\n\n# Register your models here.\n")
|
30
|
+
|
31
|
+
with open(f"{app_name}/apps.py", "w") as f:
|
32
|
+
class_name = ''.join(word.capitalize() for word in app_name.split('_')) + "Config"
|
33
|
+
f.write(
|
34
|
+
"from django.apps import AppConfig\n\n"
|
35
|
+
f"class {class_name}(AppConfig):\n"
|
36
|
+
f" default_auto_field = 'django.db.models.BigAutoField'\n"
|
37
|
+
f" name = '{app_name}'\n"
|
38
|
+
)
|
39
|
+
|
40
|
+
with open(f"{app_name}/tests.py", "w") as f:
|
41
|
+
f.write(
|
42
|
+
"from django.test import TestCase\n\n"
|
43
|
+
"# Create your tests here.\n"
|
44
|
+
)
|
45
|
+
|
46
|
+
print(f"App Django '{app_name}' créée avec succès !")
|
47
|
+
|
48
|
+
def main():
|
49
|
+
if len(sys.argv) < 2:
|
50
|
+
print("Usage : create-app <nom_app>")
|
51
|
+
else:
|
52
|
+
create_app(sys.argv[1])
|
@@ -0,0 +1,121 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: create-app-savane
|
3
|
+
Version: 0.0.1
|
4
|
+
Summary: Générateur de structure d'app Django personnalisée
|
5
|
+
Author: SAVANE Mouhamed
|
6
|
+
Author-email: savanemouhamed05@gmail.com
|
7
|
+
License: MIT
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: Framework :: Django
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
11
|
+
Classifier: Operating System :: OS Independent
|
12
|
+
Classifier: Intended Audience :: Developers
|
13
|
+
Classifier: Topic :: Software Development :: Code Generators
|
14
|
+
Requires-Python: >=3.6
|
15
|
+
Description-Content-Type: text/markdown
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: author-email
|
18
|
+
Dynamic: classifier
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: license
|
22
|
+
Dynamic: requires-python
|
23
|
+
Dynamic: summary
|
24
|
+
|
25
|
+
# create-app-savane
|
26
|
+
|
27
|
+
**create-app-savane** est un générateur d’application Django personnalisée, conçu pour créer rapidement une structure claire, modulaire et professionnelle d’app Django, avec les bons dossiers et fichiers dès le départ.
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
## ✨ Fonctionnalités
|
32
|
+
|
33
|
+
- Génère une app Django prête à l’emploi
|
34
|
+
- Crée des dossiers `models/` et `views/` au lieu des fichiers `models.py` et `views.py`
|
35
|
+
- Crée automatiquement :
|
36
|
+
- `urls.py`
|
37
|
+
- `admin.py`
|
38
|
+
- `apps.py`
|
39
|
+
- `tests.py`
|
40
|
+
- le dossier `migrations/` avec son `__init__.py`
|
41
|
+
- Fonctionne avec n’importe quel projet Django
|
42
|
+
|
43
|
+
---
|
44
|
+
|
45
|
+
## 📦 Installation
|
46
|
+
|
47
|
+
Pour installer ce package depuis PyPI :
|
48
|
+
|
49
|
+
```bash
|
50
|
+
pip install create-app-savane
|
51
|
+
|
52
|
+
## Utilisation
|
53
|
+
|
54
|
+
Une fois installé, utilisez la commande suivante pour créer une nouvelle application Django :
|
55
|
+
|
56
|
+
create-app nom_de_mon_app
|
57
|
+
|
58
|
+
|
59
|
+
## Exemple
|
60
|
+
|
61
|
+
create-app blog
|
62
|
+
|
63
|
+
|
64
|
+
Cela va générer un dossier blog/ avec la structure suivante :
|
65
|
+
|
66
|
+
blog/
|
67
|
+
├── __init__.py
|
68
|
+
├── admin.py
|
69
|
+
├── apps.py
|
70
|
+
├── migrations/
|
71
|
+
│ └── __init__.py
|
72
|
+
├── models/
|
73
|
+
│ └── __init__.py
|
74
|
+
├── views/
|
75
|
+
│ └── __init__.py
|
76
|
+
├── urls.py
|
77
|
+
└── tests.py
|
78
|
+
|
79
|
+
|
80
|
+
## 🧠 Comment ça fonctionne ?
|
81
|
+
|
82
|
+
La commande create-app :
|
83
|
+
|
84
|
+
Crée un dossier portant le nom de l’application.
|
85
|
+
Génère les sous-dossiers models/, views/, migrations/ (avec leurs __init__.py respectifs).
|
86
|
+
Crée les fichiers essentiels à une app Django : admin.py, apps.py, tests.py, urls.py.
|
87
|
+
Prépare une app prête à être intégrée dans un projet Django existant.
|
88
|
+
|
89
|
+
|
90
|
+
## 🔧 Intégration dans un projet Django
|
91
|
+
|
92
|
+
Voici un exemple d'utilisation :
|
93
|
+
|
94
|
+
django-admin startproject monprojet
|
95
|
+
cd monprojet
|
96
|
+
create-app boutique
|
97
|
+
|
98
|
+
Puis, dans monprojet/settings.py, ajoute 'boutique' à la liste INSTALLED_APPS :
|
99
|
+
|
100
|
+
INSTALLED_APPS = [
|
101
|
+
...
|
102
|
+
'boutique',
|
103
|
+
]
|
104
|
+
|
105
|
+
|
106
|
+
## ✅ Avantages
|
107
|
+
|
108
|
+
Gagnez du temps à chaque création d'application Django
|
109
|
+
Structure claire et modulaire
|
110
|
+
Prêt pour des projets évolutifs ou en équipe
|
111
|
+
🧑💻 Auteur
|
112
|
+
|
113
|
+
SAVANE Mouhamed
|
114
|
+
📧 savanemouhamed05@gmail.com
|
115
|
+
🛠️ Licence : MIT
|
116
|
+
🌍 Côte d’Ivoire
|
117
|
+
|
118
|
+
📚 Exigences
|
119
|
+
|
120
|
+
Python ≥ 3.6
|
121
|
+
Django ≥ 3.2 recommandé
|
@@ -0,0 +1,9 @@
|
|
1
|
+
README.md
|
2
|
+
setup.py
|
3
|
+
create_app/__init__.py
|
4
|
+
create_app/cli.py
|
5
|
+
create_app_savane.egg-info/PKG-INFO
|
6
|
+
create_app_savane.egg-info/SOURCES.txt
|
7
|
+
create_app_savane.egg-info/dependency_links.txt
|
8
|
+
create_app_savane.egg-info/entry_points.txt
|
9
|
+
create_app_savane.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
create_app
|
@@ -0,0 +1,34 @@
|
|
1
|
+
from setuptools import setup, find_packages
|
2
|
+
from pathlib import Path
|
3
|
+
|
4
|
+
# Lire le contenu du README.md
|
5
|
+
this_directory = Path(__file__).parent
|
6
|
+
long_description = (this_directory / "README.md").read_text(encoding="utf-8")
|
7
|
+
|
8
|
+
setup(
|
9
|
+
name='create-app-savane',
|
10
|
+
version='0.0.1',
|
11
|
+
packages=find_packages(),
|
12
|
+
include_package_data=True,
|
13
|
+
license='MIT',
|
14
|
+
description="Générateur de structure d'app Django personnalisée",
|
15
|
+
long_description=long_description,
|
16
|
+
long_description_content_type='text/markdown',
|
17
|
+
author='SAVANE Mouhamed',
|
18
|
+
author_email='savanemouhamed05@gmail.com',
|
19
|
+
entry_points={
|
20
|
+
'console_scripts': [
|
21
|
+
'create-app = create_app.cli:main',
|
22
|
+
],
|
23
|
+
},
|
24
|
+
classifiers=[
|
25
|
+
'Programming Language :: Python :: 3',
|
26
|
+
'Framework :: Django',
|
27
|
+
'License :: OSI Approved :: MIT License',
|
28
|
+
'Operating System :: OS Independent',
|
29
|
+
'Intended Audience :: Developers',
|
30
|
+
'Topic :: Software Development :: Code Generators',
|
31
|
+
],
|
32
|
+
python_requires='>=3.6',
|
33
|
+
install_requires=[],
|
34
|
+
)
|