Un modèle pour démarrer un nouveau projet Django.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
960 B

import os
import shutil
ROOT_DIR = os.path.realpath(os.path.curdir)
PROJECT_DIR = os.path.join(ROOT_DIR, '{{ cookiecutter.project_slug }}')
def remove_assets_files():
"""Remove assets related files and directories."""
for path in ASSETS_FILES:
os.remove(os.path.join(ROOT_DIR, path))
for path in ASSETS_DIRS:
shutil.rmtree(os.path.join(ROOT_DIR, path))
def remove_home_page():
"""Remove home view and template."""
os.remove(os.path.join(PROJECT_DIR, 'core/urls.py'))
os.remove(os.path.join(PROJECT_DIR, 'templates/pages/home.html'))
if __name__ == '__main__':
if '{{ cookiecutter.use_assets }}'.lower() != 'y':
if '{{ cookiecutter.use_wagtail }}'.lower() == 'y':
Map all the world