keith-django-app-creator 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.
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/PKG-INFO +5 -5
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/README.md +2 -2
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/app_creator/cli.py +9 -8
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/apps.py +2 -2
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/keith_django_app_creator.egg-info/PKG-INFO +5 -5
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/keith_django_app_creator.egg-info/SOURCES.txt +8 -8
- keith_django_app_creator-0.3.0/keith_django_app_creator.egg-info/entry_points.txt +2 -0
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/keith_django_app_creator.egg-info/top_level.txt +1 -1
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/setup.py +4 -4
- keith_django_app_creator-0.1.0/keith_django_app_creator.egg-info/entry_points.txt +0 -2
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/app_creator/__init__.py +0 -0
- {keith_django_app_creator-0.1.0/migrations → keith_django_app_creator-0.3.0/keita}/__init__.py +0 -0
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/admin.py +0 -0
- {keith_django_app_creator-0.1.0/models → keith_django_app_creator-0.3.0/keita/migrations}/__init__.py +0 -0
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/models/__init__.py +0 -0
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/tests.py +0 -0
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/urls.py +0 -0
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/views/__init__.py +0 -0
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/keith_django_app_creator.egg-info/dependency_links.txt +0 -0
- {keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/migrations}/__init__.py +0 -0
- {keith_django_app_creator-0.1.0/parfaite/migrations → keith_django_app_creator-0.3.0/models}/__init__.py +0 -0
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/setup.cfg +0 -0
- {keith_django_app_creator-0.1.0 → keith_django_app_creator-0.3.0}/views/__init__.py +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: keith-django-app-creator
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: Générateur de structure d'app Django personnalisée
|
5
|
-
Author:
|
6
|
-
Author-email:
|
5
|
+
Author: Keith44
|
6
|
+
Author-email: keitamohamed1432@gmail.com
|
7
7
|
License: MIT
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Framework :: Django
|
@@ -35,7 +35,7 @@ Dynamic: summary
|
|
35
35
|
Assurez-vous d’avoir Python 3 et `pip` installés, puis exécutez :
|
36
36
|
|
37
37
|
```bash
|
38
|
-
pip install django-app-Parfaite
|
39
38
|
|
39
|
+
pip install keith-django-app-creator
|
40
40
|
## Utilisation
|
41
|
-
|
41
|
+
newapp <nom_de_l_app>
|
@@ -1,15 +1,16 @@
|
|
1
1
|
import os
|
2
2
|
import sys
|
3
3
|
|
4
|
+
def to_camel_case(snake_str):
|
5
|
+
return ''.join(word.capitalize() for word in snake_str.split('_'))
|
6
|
+
|
4
7
|
def create_app(app_name):
|
5
8
|
os.makedirs(app_name, exist_ok=True)
|
6
9
|
os.makedirs(f"{app_name}/models", exist_ok=True)
|
7
10
|
os.makedirs(f"{app_name}/views", exist_ok=True)
|
8
11
|
os.makedirs(f"{app_name}/migrations", exist_ok=True)
|
9
12
|
|
10
|
-
# Fichiers de base
|
11
13
|
with open(f"{app_name}/__init__.py", "w"): pass
|
12
|
-
|
13
14
|
with open(f"{app_name}/models/__init__.py", "w") as f:
|
14
15
|
f.write("# models here\n")
|
15
16
|
|
@@ -17,7 +18,7 @@ def create_app(app_name):
|
|
17
18
|
f.write("# views here\n")
|
18
19
|
|
19
20
|
with open(f"{app_name}/migrations/__init__.py", "w") as f:
|
20
|
-
pass
|
21
|
+
pass
|
21
22
|
|
22
23
|
with open(f"{app_name}/urls.py", "w") as f:
|
23
24
|
f.write(
|
@@ -31,7 +32,7 @@ def create_app(app_name):
|
|
31
32
|
f.write("from django.contrib import admin\n\n# Register your models here.\n")
|
32
33
|
|
33
34
|
with open(f"{app_name}/apps.py", "w") as f:
|
34
|
-
class_name = app_name
|
35
|
+
class_name = to_camel_case(app_name) + "Config"
|
35
36
|
f.write(
|
36
37
|
"from django.apps import AppConfig\n\n"
|
37
38
|
f"class {class_name}(AppConfig):\n"
|
@@ -40,10 +41,7 @@ def create_app(app_name):
|
|
40
41
|
)
|
41
42
|
|
42
43
|
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
|
-
)
|
44
|
+
f.write("from django.test import TestCase\n\n# Create your tests here.\n")
|
47
45
|
|
48
46
|
print(f"App Django '{app_name}' créée avec succès !")
|
49
47
|
|
@@ -52,3 +50,6 @@ def main():
|
|
52
50
|
print("Usage : django-create-app <nom_app>")
|
53
51
|
else:
|
54
52
|
create_app(sys.argv[1])
|
53
|
+
|
54
|
+
if __name__ == "__main__":
|
55
|
+
main()
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: keith-django-app-creator
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: Générateur de structure d'app Django personnalisée
|
5
|
-
Author:
|
6
|
-
Author-email:
|
5
|
+
Author: Keith44
|
6
|
+
Author-email: keitamohamed1432@gmail.com
|
7
7
|
License: MIT
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Framework :: Django
|
@@ -35,7 +35,7 @@ Dynamic: summary
|
|
35
35
|
Assurez-vous d’avoir Python 3 et `pip` installés, puis exécutez :
|
36
36
|
|
37
37
|
```bash
|
38
|
-
pip install django-app-Parfaite
|
39
38
|
|
39
|
+
pip install keith-django-app-creator
|
40
40
|
## Utilisation
|
41
|
-
|
41
|
+
newapp <nom_de_l_app>
|
@@ -2,6 +2,14 @@ README.md
|
|
2
2
|
setup.py
|
3
3
|
app_creator/__init__.py
|
4
4
|
app_creator/cli.py
|
5
|
+
keita/__init__.py
|
6
|
+
keita/admin.py
|
7
|
+
keita/apps.py
|
8
|
+
keita/tests.py
|
9
|
+
keita/urls.py
|
10
|
+
keita/migrations/__init__.py
|
11
|
+
keita/models/__init__.py
|
12
|
+
keita/views/__init__.py
|
5
13
|
keith_django_app_creator.egg-info/PKG-INFO
|
6
14
|
keith_django_app_creator.egg-info/SOURCES.txt
|
7
15
|
keith_django_app_creator.egg-info/dependency_links.txt
|
@@ -9,12 +17,4 @@ keith_django_app_creator.egg-info/entry_points.txt
|
|
9
17
|
keith_django_app_creator.egg-info/top_level.txt
|
10
18
|
migrations/__init__.py
|
11
19
|
models/__init__.py
|
12
|
-
parfaite/__init__.py
|
13
|
-
parfaite/admin.py
|
14
|
-
parfaite/apps.py
|
15
|
-
parfaite/tests.py
|
16
|
-
parfaite/urls.py
|
17
|
-
parfaite/migrations/__init__.py
|
18
|
-
parfaite/models/__init__.py
|
19
|
-
parfaite/views/__init__.py
|
20
20
|
views/__init__.py
|
@@ -2,18 +2,18 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='keith-django-app-creator',
|
5
|
-
version='0.
|
5
|
+
version='0.3.0',
|
6
6
|
packages=find_packages(),
|
7
7
|
include_package_data=True,
|
8
8
|
license='MIT',
|
9
9
|
description='Générateur de structure d\'app Django personnalisée',
|
10
10
|
long_description=open('README.md', encoding='utf-8').read(),
|
11
11
|
long_description_content_type='text/markdown',
|
12
|
-
author='
|
13
|
-
author_email='
|
12
|
+
author='Keith44',
|
13
|
+
author_email='keitamohamed1432@gmail.com',
|
14
14
|
entry_points={
|
15
15
|
'console_scripts': [
|
16
|
-
'
|
16
|
+
'createapp = app_creator.cli:main',
|
17
17
|
],
|
18
18
|
},
|
19
19
|
classifiers=[
|
File without changes
|
{keith_django_app_creator-0.1.0/migrations → keith_django_app_creator-0.3.0/keita}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/keita}/views/__init__.py
RENAMED
File without changes
|
File without changes
|
{keith_django_app_creator-0.1.0/parfaite → keith_django_app_creator-0.3.0/migrations}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|