Merge branch 'dokku'

This commit is contained in:
Carmen Ngaka Iziasuma 2024-02-09 15:17:31 +01:00
commit 0620acd0de
5 changed files with 12 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1 @@
venv venv
*.pyc
db.sqlite3

View File

@ -1 +1 @@
web: gunicorn colline.wsgi.application web: gunicorn colline.wsgi:application

View File

@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
""" """
from pathlib import Path from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
@ -25,12 +26,13 @@ SECRET_KEY = 'django-insecure-am+jesv8+*y7gubnwd5j$gg15%#yf=d@75w!(a#_1vhcbhn@0j
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = ["localhost", "127.0.0.1", "colline.legaragenumerique.eu"]
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
"whitenoise.runserver_nostatic",
'polls.apps.PollsConfig', 'polls.apps.PollsConfig',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
@ -48,6 +50,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
"whitenoise.middleware.WhiteNoiseMiddleware",
] ]
ROOT_URLCONF = 'colline.urls' ROOT_URLCONF = 'colline.urls'
@ -117,6 +120,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/5.0/howto/static-files/ # https://docs.djangoproject.com/en/5.0/howto/static-files/
STATIC_URL = 'static/' STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

BIN
db.sqlite3 Normal file

Binary file not shown.

6
requirements.txt Normal file
View File

@ -0,0 +1,6 @@
asgiref==3.7.2
Django==5.0.2
gunicorn==21.2.0
packaging==23.2
sqlparse==0.4.4
whitenoise==6.6.0