Herramientas de usuario

Herramientas del sitio


wiki2:python:django:project

¡Esta es una revisión vieja del documento!


Preparing a Django project

poetry init

poetry add django

poetry run django-admin startproject {project}

- fix directory generation -

touch README.md

- copy the .gitignore -

git init

git add -A 

git commit -m "first commit"

git remote add origin {url}

git push -u origin master

- move settings to an inner package, renaming the file to 'default.py' -

- Add a develop.py file -

- In settings\__init__.py and in settings\develop.py add the line: from .default import * a

- change BASE_DIR like this: BASE_DIR = Path(__file__).resolve().parent.parent.parent

poetry add whitenoise

Files

.gitignore

*.pyc
.DS_Store
env
venv
.idea/**
node_modules
*.sqlite3
*.pyc
**/__pycache__/*
**/.sass-cache/*
**/.env
**/elm-stuff/**
strit/migrations/**
!strit/migrations/__init__.py

strit/settings/**
!strit/settings/default.py
!strit/settings/__init__.py

daauth
/daauth/
wiki2/python/django/project.1608887657.txt.gz · Última modificación: 2020/12/25 10:14 (editor externo)