préparations prod
This commit is contained in:
parent
c9e613adda
commit
bc4f5684b7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
__pycache__/
|
||||
db.sqlite3
|
||||
media/
|
||||
result
|
||||
|
6
MANIFEST.in
Normal file
6
MANIFEST.in
Normal file
@ -0,0 +1,6 @@
|
||||
graft common_files/templates
|
||||
graft common_files/static
|
||||
graft site_statique/static
|
||||
graft site_statique/templates
|
||||
graft timeline/templates
|
||||
graft timeline/static
|
@ -20,6 +20,10 @@ pkgs.python3.pkgs.buildPythonPackage rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
python $out/bin/manage.py collectstatic
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Site de présentation de l'association Musique Fraternité de Meyenheim";
|
||||
homepage = https://musique-meyenheim.fr;
|
||||
|
8
setup.py
Normal file
8
setup.py
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(name='site_musique',
|
||||
version='1.0',
|
||||
packages=find_packages(),
|
||||
scripts=['manage.py'],
|
||||
include_package_data=True)
|
@ -19,13 +19,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__fil
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = '%y$(+on3*nzj0*fnq-@#=u4w_x-$4=l12+9be^xbq92nj5%0cd'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
@ -89,5 +82,4 @@ USE_TZ = True
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
MEDIA_URL = '/media/'
|
||||
|
@ -2,6 +2,10 @@ from .base import *
|
||||
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
SECRET_KEY = '%y$(+on3*nzj0*fnq-@#=u4w_x-$4=l12+9be^xbq92nj5%0cd'
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
||||
|
||||
@ -11,3 +15,5 @@ DATABASES = {
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
|
@ -17,3 +17,20 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ["musique-meyenheim.fr"]
|
||||
|
||||
SECRET_KEY = os.environ['SECRET_KEY']
|
||||
|
||||
VAR_DIR = os.environ['VAR_DIR']
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(VAR_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
MEDIA_ROOT = os.path.join(VAR_DIR, 'media')
|
||||
|
@ -17,7 +17,7 @@ from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from django.contrib.staticfiles.urls import static
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from .settings import base as settings
|
||||
from django.conf import settings
|
||||
|
||||
urlpatterns = [
|
||||
path('evenements/', include('timeline.urls')),
|
||||
|
Loading…
Reference in New Issue
Block a user