kopia lustrzana https://github.com/rtts/django-simplecms
Clean up example project
rodzic
d6836a6828
commit
5a4bbca1ab
|
@ -20,8 +20,10 @@ def main():
|
|||
project_dir = os.path.join(os.getcwd(), project_name)
|
||||
if re.match(r"^\w+$", project_name):
|
||||
if (
|
||||
input(f"Do you want to create a new project in `{project_dir}` ?\033[1D")
|
||||
in "Yy"
|
||||
input(
|
||||
f"Do you want to create a new project in {project_dir}? [yN] "
|
||||
).lower()
|
||||
== "y"
|
||||
):
|
||||
create_project(project_name, project_dir)
|
||||
else:
|
||||
|
@ -39,13 +41,6 @@ def create_project(project_name, project_dir):
|
|||
example_dir = os.path.dirname(example.__file__)
|
||||
app_dir = os.path.join(project_dir, project_name)
|
||||
shutil.copytree(example_dir, app_dir, dirs_exist_ok=True)
|
||||
shutil.move(
|
||||
os.path.join(app_dir, "setup.cfg"), os.path.join(project_dir, "setup.cfg")
|
||||
)
|
||||
shutil.move(
|
||||
os.path.join(app_dir, ".pre-commit-config.yaml"),
|
||||
os.path.join(project_dir, ".pre-commit-config.yaml"),
|
||||
)
|
||||
|
||||
with open(
|
||||
os.open(
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[settings]
|
||||
known_third_party=cms
|
|
@ -1,28 +0,0 @@
|
|||
repos:
|
||||
|
||||
- repo: https://github.com/rtts/djhtml
|
||||
rev: main
|
||||
hooks:
|
||||
- id: djhtml
|
||||
|
||||
- repo: https://github.com/myint/autoflake
|
||||
rev: master
|
||||
hooks:
|
||||
- id: autoflake
|
||||
args: ['--in-place', '--remove-all-unused-imports']
|
||||
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: main
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ['--line-length', '88']
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: main
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: main
|
||||
hooks:
|
||||
- id: flake8
|
|
@ -8,17 +8,12 @@ PROJECT_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
|||
DEBUG = "runserver" in sys.argv
|
||||
KEYFILE = f"/tmp/{PROJECT_NAME}.secret"
|
||||
ADMINS = [("Jaap Joris Vens", "jj@rtts.eu")]
|
||||
DEFAULT_FROM_EMAIL = "noreply@rtts.eu"
|
||||
CONTACT_FORM_EMAIL_SUBJECT = "Contact form"
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
ROOT_URLCONF = PROJECT_NAME + ".urls"
|
||||
WSGI_APPLICATION = PROJECT_NAME + ".wsgi.application"
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||
LANGUAGE_CODE = "nl"
|
||||
TIME_ZONE = "Europe/Amsterdam"
|
||||
USE_I18N = True
|
||||
USE_L10N = True
|
||||
USE_TZ = True
|
||||
STATIC_URL = "/static/"
|
||||
STATIC_ROOT = "/srv/" + PROJECT_NAME + "/static"
|
||||
MEDIA_URL = "/media/"
|
||||
|
@ -48,7 +43,6 @@ INSTALLED_APPS = [
|
|||
"cms",
|
||||
"embed_video",
|
||||
"easy_thumbnails",
|
||||
"django_extensions",
|
||||
]
|
||||
if not DEBUG:
|
||||
INSTALLED_APPS += ["django.contrib.staticfiles"]
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[flake8]
|
||||
max-line-length = 88
|
||||
select = C,E,F,W,B,B950
|
||||
extend-ignore = E203, E501
|
|
@ -1,16 +0,0 @@
|
|||
"""
|
||||
WSGI config for project project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
|
||||
|
||||
application = get_wsgi_application()
|
Ładowanie…
Reference in New Issue