create-app-savane 0.1.2__tar.gz → 0.2.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.
- {create_app_savane-0.1.2 → create_app_savane-0.2.0}/PKG-INFO +7 -8
- create_app_savane-0.2.0/create_app/cli.py +50 -0
- {create_app_savane-0.1.2 → create_app_savane-0.2.0}/create_app_savane.egg-info/PKG-INFO +7 -8
- create_app_savane-0.2.0/create_app_savane.egg-info/SOURCES.txt +8 -0
- create_app_savane-0.2.0/create_app_savane.egg-info/entry_points.txt +2 -0
- create_app_savane-0.2.0/create_app_savane.egg-info/top_level.txt +1 -0
- create_app_savane-0.2.0/setup.py +24 -0
- create_app_savane-0.1.2/create_app_savane.egg-info/SOURCES.txt +0 -13
- create_app_savane-0.1.2/create_app_savane.egg-info/entry_points.txt +0 -2
- create_app_savane-0.1.2/create_app_savane.egg-info/requires.txt +0 -1
- create_app_savane-0.1.2/create_app_savane.egg-info/top_level.txt +0 -1
- create_app_savane-0.1.2/packages/asgi.py +0 -16
- create_app_savane-0.1.2/packages/settings.py +0 -122
- create_app_savane-0.1.2/packages/urls.py +0 -22
- create_app_savane-0.1.2/packages/wsgi.py +0 -16
- create_app_savane-0.1.2/pyproject.toml +0 -3
- create_app_savane-0.1.2/setup.py +0 -26
- {create_app_savane-0.1.2/packages → create_app_savane-0.2.0/create_app}/__init__.py +0 -0
- {create_app_savane-0.1.2 → create_app_savane-0.2.0}/create_app_savane.egg-info/dependency_links.txt +0 -0
- {create_app_savane-0.1.2 → create_app_savane-0.2.0}/setup.cfg +0 -0
@@ -1,18 +1,17 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
|
-
Name:
|
3
|
-
Version: 0.
|
4
|
-
Summary:
|
2
|
+
Name: create-app-savane
|
3
|
+
Version: 0.2.0
|
4
|
+
Summary: Générateur de structure d'app Django personnalisée
|
5
5
|
Author: SAVANE Mouhamed
|
6
6
|
Author-email: savanemouhamed05@gmail.com
|
7
|
+
License: MIT
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
8
9
|
Classifier: Framework :: Django
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
|
11
|
-
Requires-Python: >=3.7
|
12
|
-
Requires-Dist: Django>=4.0
|
11
|
+
Description-Content-Type: text/markdown
|
13
12
|
Dynamic: author
|
14
13
|
Dynamic: author-email
|
15
14
|
Dynamic: classifier
|
16
|
-
Dynamic:
|
17
|
-
Dynamic:
|
15
|
+
Dynamic: description-content-type
|
16
|
+
Dynamic: license
|
18
17
|
Dynamic: summary
|
@@ -0,0 +1,50 @@
|
|
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
|
+
|
9
|
+
# Fichiers de base
|
10
|
+
with open(f"{app_name}/__init__.py", "w"): pass
|
11
|
+
|
12
|
+
with open(f"{app_name}/models/__init__.py", "w") as f:
|
13
|
+
f.write("# models here\n")
|
14
|
+
|
15
|
+
with open(f"{app_name}/views/__init__.py", "w") as f:
|
16
|
+
f.write("# views here\n")
|
17
|
+
|
18
|
+
with open(f"{app_name}/urls.py", "w") as f:
|
19
|
+
f.write(
|
20
|
+
"from django.urls import path\n\n"
|
21
|
+
"urlpatterns = [\n"
|
22
|
+
" # path('', views.index, name='index'),\n"
|
23
|
+
"]\n"
|
24
|
+
)
|
25
|
+
|
26
|
+
with open(f"{app_name}/admin.py", "w") as f:
|
27
|
+
f.write("from django.contrib import admin\n\n# Register your models here.\n")
|
28
|
+
|
29
|
+
with open(f"{app_name}/apps.py", "w") as f:
|
30
|
+
class_name = app_name.capitalize() + "Config"
|
31
|
+
f.write(
|
32
|
+
"from django.apps import AppConfig\n\n"
|
33
|
+
f"class {class_name}(AppConfig):\n"
|
34
|
+
f" default_auto_field = 'django.db.models.BigAutoField'\n"
|
35
|
+
f" name = '{app_name}'\n"
|
36
|
+
)
|
37
|
+
|
38
|
+
with open(f"{app_name}/tests.py", "w") as f:
|
39
|
+
f.write(
|
40
|
+
"from django.test import TestCase\n\n"
|
41
|
+
"# Create your tests here.\n"
|
42
|
+
)
|
43
|
+
|
44
|
+
print(f"App Django '{app_name}' créée avec succès !")
|
45
|
+
|
46
|
+
def main():
|
47
|
+
if len(sys.argv) < 2:
|
48
|
+
print("Usage : create-app <nom_app>")
|
49
|
+
else:
|
50
|
+
create_app(sys.argv[1])
|
@@ -1,18 +1,17 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
|
-
Name:
|
3
|
-
Version: 0.
|
4
|
-
Summary:
|
2
|
+
Name: create-app-savane
|
3
|
+
Version: 0.2.0
|
4
|
+
Summary: Générateur de structure d'app Django personnalisée
|
5
5
|
Author: SAVANE Mouhamed
|
6
6
|
Author-email: savanemouhamed05@gmail.com
|
7
|
+
License: MIT
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
8
9
|
Classifier: Framework :: Django
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
|
11
|
-
Requires-Python: >=3.7
|
12
|
-
Requires-Dist: Django>=4.0
|
11
|
+
Description-Content-Type: text/markdown
|
13
12
|
Dynamic: author
|
14
13
|
Dynamic: author-email
|
15
14
|
Dynamic: classifier
|
16
|
-
Dynamic:
|
17
|
-
Dynamic:
|
15
|
+
Dynamic: description-content-type
|
16
|
+
Dynamic: license
|
18
17
|
Dynamic: summary
|
@@ -0,0 +1,8 @@
|
|
1
|
+
setup.py
|
2
|
+
create_app/__init__.py
|
3
|
+
create_app/cli.py
|
4
|
+
create_app_savane.egg-info/PKG-INFO
|
5
|
+
create_app_savane.egg-info/SOURCES.txt
|
6
|
+
create_app_savane.egg-info/dependency_links.txt
|
7
|
+
create_app_savane.egg-info/entry_points.txt
|
8
|
+
create_app_savane.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
create_app
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from setuptools import setup, find_packages # type: ignore
|
2
|
+
|
3
|
+
setup(
|
4
|
+
name='create-app-savane',
|
5
|
+
version='0.2.0',
|
6
|
+
packages=find_packages(),
|
7
|
+
include_package_data=True,
|
8
|
+
license='MIT',
|
9
|
+
description='Générateur de structure d\'app Django personnalisée',
|
10
|
+
long_description_content_type='text/markdown',
|
11
|
+
author='SAVANE Mouhamed',
|
12
|
+
author_email='savanemouhamed05@gmail.com',
|
13
|
+
entry_points={
|
14
|
+
'console_scripts': [
|
15
|
+
'create-app = create_app.cli:main',
|
16
|
+
],
|
17
|
+
},
|
18
|
+
classifiers=[
|
19
|
+
'Programming Language :: Python :: 3',
|
20
|
+
'Framework :: Django',
|
21
|
+
'License :: OSI Approved :: MIT License',
|
22
|
+
],
|
23
|
+
install_requires=[],
|
24
|
+
)
|
@@ -1,13 +0,0 @@
|
|
1
|
-
pyproject.toml
|
2
|
-
setup.py
|
3
|
-
create_app_savane.egg-info/PKG-INFO
|
4
|
-
create_app_savane.egg-info/SOURCES.txt
|
5
|
-
create_app_savane.egg-info/dependency_links.txt
|
6
|
-
create_app_savane.egg-info/entry_points.txt
|
7
|
-
create_app_savane.egg-info/requires.txt
|
8
|
-
create_app_savane.egg-info/top_level.txt
|
9
|
-
packages/__init__.py
|
10
|
-
packages/asgi.py
|
11
|
-
packages/settings.py
|
12
|
-
packages/urls.py
|
13
|
-
packages/wsgi.py
|
@@ -1 +0,0 @@
|
|
1
|
-
Django>=4.0
|
@@ -1 +0,0 @@
|
|
1
|
-
packages
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
ASGI config for packages project.
|
3
|
-
|
4
|
-
It exposes the ASGI callable as a module-level variable named ``application``.
|
5
|
-
|
6
|
-
For more information on this file, see
|
7
|
-
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
|
8
|
-
"""
|
9
|
-
|
10
|
-
import os
|
11
|
-
|
12
|
-
from django.core.asgi import get_asgi_application
|
13
|
-
|
14
|
-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'packages.settings')
|
15
|
-
|
16
|
-
application = get_asgi_application()
|
@@ -1,122 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Django settings for packages project.
|
3
|
-
|
4
|
-
Generated by 'django-admin startproject' using Django 5.2.4.
|
5
|
-
|
6
|
-
For more information on this file, see
|
7
|
-
https://docs.djangoproject.com/en/5.2/topics/settings/
|
8
|
-
|
9
|
-
For the full list of settings and their values, see
|
10
|
-
https://docs.djangoproject.com/en/5.2/ref/settings/
|
11
|
-
"""
|
12
|
-
|
13
|
-
from pathlib import Path
|
14
|
-
|
15
|
-
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
16
|
-
BASE_DIR = Path(__file__).resolve().parent.parent
|
17
|
-
|
18
|
-
|
19
|
-
# Quick-start development settings - unsuitable for production
|
20
|
-
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
21
|
-
|
22
|
-
# SECURITY WARNING: keep the secret key used in production secret!
|
23
|
-
SECRET_KEY = 'django-insecure-nu&m*e^=o0no#e$!@z(c@(%&w(83vyc3n0=m_win1xc5_-wtq$'
|
24
|
-
|
25
|
-
# SECURITY WARNING: don't run with debug turned on in production!
|
26
|
-
DEBUG = True
|
27
|
-
|
28
|
-
ALLOWED_HOSTS = []
|
29
|
-
|
30
|
-
|
31
|
-
# Application definition
|
32
|
-
|
33
|
-
INSTALLED_APPS = [
|
34
|
-
'django.contrib.admin',
|
35
|
-
'django.contrib.auth',
|
36
|
-
'django.contrib.contenttypes',
|
37
|
-
'django.contrib.sessions',
|
38
|
-
'django.contrib.messages',
|
39
|
-
'django.contrib.staticfiles',
|
40
|
-
]
|
41
|
-
|
42
|
-
MIDDLEWARE = [
|
43
|
-
'django.middleware.security.SecurityMiddleware',
|
44
|
-
'django.contrib.sessions.middleware.SessionMiddleware',
|
45
|
-
'django.middleware.common.CommonMiddleware',
|
46
|
-
'django.middleware.csrf.CsrfViewMiddleware',
|
47
|
-
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
48
|
-
'django.contrib.messages.middleware.MessageMiddleware',
|
49
|
-
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
50
|
-
]
|
51
|
-
|
52
|
-
ROOT_URLCONF = 'packages.urls'
|
53
|
-
|
54
|
-
TEMPLATES = [
|
55
|
-
{
|
56
|
-
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
57
|
-
'DIRS': [],
|
58
|
-
'APP_DIRS': True,
|
59
|
-
'OPTIONS': {
|
60
|
-
'context_processors': [
|
61
|
-
'django.template.context_processors.request',
|
62
|
-
'django.contrib.auth.context_processors.auth',
|
63
|
-
'django.contrib.messages.context_processors.messages',
|
64
|
-
],
|
65
|
-
},
|
66
|
-
},
|
67
|
-
]
|
68
|
-
|
69
|
-
WSGI_APPLICATION = 'packages.wsgi.application'
|
70
|
-
|
71
|
-
|
72
|
-
# Database
|
73
|
-
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
74
|
-
|
75
|
-
DATABASES = {
|
76
|
-
'default': {
|
77
|
-
'ENGINE': 'django.db.backends.sqlite3',
|
78
|
-
'NAME': BASE_DIR / 'db.sqlite3',
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
|
83
|
-
# Password validation
|
84
|
-
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
85
|
-
|
86
|
-
AUTH_PASSWORD_VALIDATORS = [
|
87
|
-
{
|
88
|
-
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
89
|
-
},
|
90
|
-
{
|
91
|
-
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
92
|
-
},
|
93
|
-
{
|
94
|
-
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
95
|
-
},
|
96
|
-
{
|
97
|
-
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
98
|
-
},
|
99
|
-
]
|
100
|
-
|
101
|
-
|
102
|
-
# Internationalization
|
103
|
-
# https://docs.djangoproject.com/en/5.2/topics/i18n/
|
104
|
-
|
105
|
-
LANGUAGE_CODE = 'en-us'
|
106
|
-
|
107
|
-
TIME_ZONE = 'UTC'
|
108
|
-
|
109
|
-
USE_I18N = True
|
110
|
-
|
111
|
-
USE_TZ = True
|
112
|
-
|
113
|
-
|
114
|
-
# Static files (CSS, JavaScript, Images)
|
115
|
-
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
116
|
-
|
117
|
-
STATIC_URL = 'static/'
|
118
|
-
|
119
|
-
# Default primary key field type
|
120
|
-
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
121
|
-
|
122
|
-
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
URL configuration for packages project.
|
3
|
-
|
4
|
-
The `urlpatterns` list routes URLs to views. For more information please see:
|
5
|
-
https://docs.djangoproject.com/en/5.2/topics/http/urls/
|
6
|
-
Examples:
|
7
|
-
Function views
|
8
|
-
1. Add an import: from my_app import views
|
9
|
-
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
10
|
-
Class-based views
|
11
|
-
1. Add an import: from other_app.views import Home
|
12
|
-
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
13
|
-
Including another URLconf
|
14
|
-
1. Import the include() function: from django.urls import include, path
|
15
|
-
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
16
|
-
"""
|
17
|
-
from django.contrib import admin
|
18
|
-
from django.urls import path
|
19
|
-
|
20
|
-
urlpatterns = [
|
21
|
-
path('admin/', admin.site.urls),
|
22
|
-
]
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
WSGI config for packages project.
|
3
|
-
|
4
|
-
It exposes the WSGI callable as a module-level variable named ``application``.
|
5
|
-
|
6
|
-
For more information on this file, see
|
7
|
-
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
|
8
|
-
"""
|
9
|
-
|
10
|
-
import os
|
11
|
-
|
12
|
-
from django.core.wsgi import get_wsgi_application
|
13
|
-
|
14
|
-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'packages.settings')
|
15
|
-
|
16
|
-
application = get_wsgi_application()
|
create_app_savane-0.1.2/setup.py
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
from setuptools import setup, find_packages
|
2
|
-
|
3
|
-
setup(
|
4
|
-
name='create_app_savane',
|
5
|
-
version='0.1.2',
|
6
|
-
description='Create Django apps with folders for views and models',
|
7
|
-
author='SAVANE Mouhamed',
|
8
|
-
author_email='savanemouhamed05@gmail.com',
|
9
|
-
packages=find_packages(),
|
10
|
-
include_package_data=True,
|
11
|
-
install_requires=[
|
12
|
-
'Django>=4.0',
|
13
|
-
],
|
14
|
-
entry_points={
|
15
|
-
'console_scripts': [
|
16
|
-
'create-django-app=mydjcreator.generator:create_project'
|
17
|
-
],
|
18
|
-
},
|
19
|
-
classifiers=[
|
20
|
-
'Programming Language :: Python :: 3',
|
21
|
-
'Framework :: Django',
|
22
|
-
'License :: OSI Approved :: MIT License',
|
23
|
-
'Operating System :: OS Independent',
|
24
|
-
],
|
25
|
-
python_requires='>=3.7',
|
26
|
-
)
|
File without changes
|
{create_app_savane-0.1.2 → create_app_savane-0.2.0}/create_app_savane.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|