diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a6e9d00 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +db.sqlite3 +media/ diff --git a/evenements.php b/evenements.php deleted file mode 100644 index 0dbcedc..0000000 --- a/evenements.php +++ /dev/null @@ -1,987 +0,0 @@ - - - - - - - - - - - - Musique fraternité - Évènements - - - - - - - - - - - - - -
-
- -

2018

- -
-
- -
-
- -

2018

- -

2017

- -

2016

- -
-
- - - - - - - - - - - - diff --git a/img/timeline/2016_Loto_11_novembre_affiche.jpg b/img/timeline/2016_Loto_11_novembre_affiche.jpg deleted file mode 100644 index 20e819b..0000000 Binary files a/img/timeline/2016_Loto_11_novembre_affiche.jpg and /dev/null differ diff --git a/img/timeline/2016_nov_11_IMG_20161111_182030_3.jpg b/img/timeline/2016_nov_11_IMG_20161111_182030_3.jpg deleted file mode 100644 index 0496edd..0000000 Binary files a/img/timeline/2016_nov_11_IMG_20161111_182030_3.jpg and /dev/null differ diff --git a/img/timeline/2016_novembre_02B_affiche_loto_meyenheim_light.jpg b/img/timeline/2016_novembre_02B_affiche_loto_meyenheim_light.jpg deleted file mode 100644 index 8d5edc1..0000000 Binary files a/img/timeline/2016_novembre_02B_affiche_loto_meyenheim_light.jpg and /dev/null differ diff --git a/img/timeline/2016_novembre_03_affiche_loto_meyenheim_light.jpg b/img/timeline/2016_novembre_03_affiche_loto_meyenheim_light.jpg deleted file mode 100644 index 03883a4..0000000 Binary files a/img/timeline/2016_novembre_03_affiche_loto_meyenheim_light.jpg and /dev/null differ diff --git a/img/timeline/2017_05_concert_ecole_affiche_2ct.jpg b/img/timeline/2017_05_concert_ecole_affiche_2ct.jpg deleted file mode 100644 index 06ebcd0..0000000 Binary files a/img/timeline/2017_05_concert_ecole_affiche_2ct.jpg and /dev/null differ diff --git a/img/timeline/2017_07_concert_chant_affiche_2.jpg b/img/timeline/2017_07_concert_chant_affiche_2.jpg deleted file mode 100644 index 1e6ff0c..0000000 Binary files a/img/timeline/2017_07_concert_chant_affiche_2.jpg and /dev/null differ diff --git a/img/timeline/2017_09_ecole_musique_flyer_light.jpg b/img/timeline/2017_09_ecole_musique_flyer_light.jpg deleted file mode 100644 index 5b7dad0..0000000 Binary files a/img/timeline/2017_09_ecole_musique_flyer_light.jpg and /dev/null differ diff --git a/img/timeline/2017_09_eveil_flyer_rentree_light.jpg b/img/timeline/2017_09_eveil_flyer_rentree_light.jpg deleted file mode 100644 index 72dcb2d..0000000 Binary files a/img/timeline/2017_09_eveil_flyer_rentree_light.jpg and /dev/null differ diff --git a/img/timeline/2017_11_concert_affiche_1.jpg b/img/timeline/2017_11_concert_affiche_1.jpg deleted file mode 100644 index 6203430..0000000 Binary files a/img/timeline/2017_11_concert_affiche_1.jpg and /dev/null differ diff --git a/img/timeline/2017_11_loto_verso2-1.jpg b/img/timeline/2017_11_loto_verso2-1.jpg deleted file mode 100644 index 1021e50..0000000 Binary files a/img/timeline/2017_11_loto_verso2-1.jpg and /dev/null differ diff --git a/img/timeline/2017_11_nov_affiche_loto_recto2.jpg b/img/timeline/2017_11_nov_affiche_loto_recto2.jpg deleted file mode 100644 index 41ad486..0000000 Binary files a/img/timeline/2017_11_nov_affiche_loto_recto2.jpg and /dev/null differ diff --git a/img/timeline/2017_12_nov_affiche_loto_recto2A.jpg b/img/timeline/2017_12_nov_affiche_loto_recto2A.jpg deleted file mode 100644 index a899459..0000000 Binary files a/img/timeline/2017_12_nov_affiche_loto_recto2A.jpg and /dev/null differ diff --git a/img/timeline/2017_6_mai_affiche_loto.jpg b/img/timeline/2017_6_mai_affiche_loto.jpg deleted file mode 100644 index 885abec..0000000 Binary files a/img/timeline/2017_6_mai_affiche_loto.jpg and /dev/null differ diff --git a/img/timeline/2017_7_mai_affiche_loto.jpg b/img/timeline/2017_7_mai_affiche_loto.jpg deleted file mode 100644 index 9869176..0000000 Binary files a/img/timeline/2017_7_mai_affiche_loto.jpg and /dev/null differ diff --git a/img/timeline/2017_7_mai_affiche_loto_2.jpg b/img/timeline/2017_7_mai_affiche_loto_2.jpg deleted file mode 100644 index 61b285c..0000000 Binary files a/img/timeline/2017_7_mai_affiche_loto_2.jpg and /dev/null differ diff --git a/img/timeline/2017_7_mai_affiche_loto_2_verso.jpg b/img/timeline/2017_7_mai_affiche_loto_2_verso.jpg deleted file mode 100644 index 03f3080..0000000 Binary files a/img/timeline/2017_7_mai_affiche_loto_2_verso.jpg and /dev/null differ diff --git a/img/timeline/2018_11_nov_affiche_loto_recto.jpg b/img/timeline/2018_11_nov_affiche_loto_recto.jpg deleted file mode 100644 index 07a6f20..0000000 Binary files a/img/timeline/2018_11_nov_affiche_loto_recto.jpg and /dev/null differ diff --git a/img/timeline/2018_12_nov_affiche_loto_recto_1.jpg b/img/timeline/2018_12_nov_affiche_loto_recto_1.jpg deleted file mode 100644 index 884e706..0000000 Binary files a/img/timeline/2018_12_nov_affiche_loto_recto_1.jpg and /dev/null differ diff --git a/img/timeline/2018_19_mai_affiche_loto_recto_2.jpg b/img/timeline/2018_19_mai_affiche_loto_recto_2.jpg deleted file mode 100644 index 66b8135..0000000 Binary files a/img/timeline/2018_19_mai_affiche_loto_recto_2.jpg and /dev/null differ diff --git a/img/timeline/2018_20_mai_affiche_loto_recto_2.jpg b/img/timeline/2018_20_mai_affiche_loto_recto_2.jpg deleted file mode 100644 index bd79364..0000000 Binary files a/img/timeline/2018_20_mai_affiche_loto_recto_2.jpg and /dev/null differ diff --git a/img/timeline/Affiche_1er_mai_2017_1.jpg b/img/timeline/Affiche_1er_mai_2017_1.jpg deleted file mode 100644 index fdab133..0000000 Binary files a/img/timeline/Affiche_1er_mai_2017_1.jpg and /dev/null differ diff --git a/img/timeline/Affiche_BigBand_2018.jpg b/img/timeline/Affiche_BigBand_2018.jpg deleted file mode 100644 index 9efcb3d..0000000 Binary files a/img/timeline/Affiche_BigBand_2018.jpg and /dev/null differ diff --git a/img/timeline/IMG_20180705_212412_2.jpg b/img/timeline/IMG_20180705_212412_2.jpg deleted file mode 100644 index c25ad1d..0000000 Binary files a/img/timeline/IMG_20180705_212412_2.jpg and /dev/null differ diff --git a/img/timeline/IMG_20180705_221046.jpg b/img/timeline/IMG_20180705_221046.jpg deleted file mode 100644 index 19bbce4..0000000 Binary files a/img/timeline/IMG_20180705_221046.jpg and /dev/null differ diff --git a/img/timeline/IMG_20180705_221739_1.jpg b/img/timeline/IMG_20180705_221739_1.jpg deleted file mode 100644 index 2c29d3d..0000000 Binary files a/img/timeline/IMG_20180705_221739_1.jpg and /dev/null differ diff --git a/img/timeline/IMG_2292.JPG b/img/timeline/IMG_2292.JPG deleted file mode 100644 index d4a4c0c..0000000 Binary files a/img/timeline/IMG_2292.JPG and /dev/null differ diff --git a/img/timeline/audition_2018_jeunes.JPG b/img/timeline/audition_2018_jeunes.JPG deleted file mode 100644 index e9089fe..0000000 Binary files a/img/timeline/audition_2018_jeunes.JPG and /dev/null differ diff --git a/img/timeline/audition_chant_2018_affiche_2_light.jpg b/img/timeline/audition_chant_2018_affiche_2_light.jpg deleted file mode 100644 index b99ba1a..0000000 Binary files a/img/timeline/audition_chant_2018_affiche_2_light.jpg and /dev/null differ diff --git a/img/timeline/concert_ecole_2018_affiche_1.jpg b/img/timeline/concert_ecole_2018_affiche_1.jpg deleted file mode 100644 index 07042bd..0000000 Binary files a/img/timeline/concert_ecole_2018_affiche_1.jpg and /dev/null differ diff --git a/img/timeline/loto_2018_208mai_verso2-001.jpg b/img/timeline/loto_2018_208mai_verso2-001.jpg deleted file mode 100644 index a2f06e7..0000000 Binary files a/img/timeline/loto_2018_208mai_verso2-001.jpg and /dev/null differ diff --git a/img/timeline/puces.jpg b/img/timeline/puces.jpg deleted file mode 100644 index 8f7c7fd..0000000 Binary files a/img/timeline/puces.jpg and /dev/null differ diff --git a/img/timeline/puces_t.jpg b/img/timeline/puces_t.jpg deleted file mode 100644 index d7e1f33..0000000 Binary files a/img/timeline/puces_t.jpg and /dev/null differ diff --git a/include_foot.html b/include_foot.html deleted file mode 100644 index af08cdf..0000000 --- a/include_foot.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/less/creative.less b/less/creative.less deleted file mode 100644 index 5e71eb5..0000000 --- a/less/creative.less +++ /dev/null @@ -1,361 +0,0 @@ -@import "variables.less"; -@import "mixins.less"; - -// Global Components -html, -body { - height: 100%; - width: 100%; -} - -body { - .serif-font; -} - -hr { - border-color: @theme-primary; - border-width: 3px; - max-width: 50px; -} - -hr.light { - border-color: white; -} - -a { - .transition-all; - color: @theme-primary; - &:hover, - &:focus { - color: darken(@theme-primary, 10%); - } -} - -h1, -h2, -h3, -h4, -h5, -h6 { - .sans-serif-font; -} - -p { - font-size: 16px; - line-height: 1.5; - margin-bottom: 20px; -} - -.bg-primary { - background-color: @theme-primary; -} - -.bg-dark { - background-color: @gray-darker; - color: white; -} - -.text-faded { - color: fade(white, 70%); -} - -section { - padding: 100px 0; -} - -aside { - padding: 50px 0; -} - -.no-padding { - padding: 0; -} - -// Navigation - -.navbar-default { - background-color: white; - border-color: fade(@gray-darker, 5%); - .sans-serif-font; - .transition-all; - .navbar-header .navbar-brand { - color: @theme-primary; - .sans-serif-font; - font-weight: 700; - text-transform: uppercase; - &:hover, - &:focus { - color: darken(@theme-primary, 10%); - } - } - .navbar-header .navbar-toggle { - font-weight: 700; - font-size: 12px; - color: @gray-darker; - text-transform: uppercase; - } - .nav { - > li { - > a, - > a:focus { - text-transform: uppercase; - font-weight: 700; - font-size: 13px; - color: @gray-darker; - &:hover { - color: @theme-primary; - } - } - &.active { - > a, - > a:focus { - color: @theme-primary !important; - background-color: transparent; - &:hover { - background-color: transparent; - } - } - } - } - } - @media (min-width: 768px) { - background-color: transparent; - border-color: fade(white, 30%); - .navbar-header .navbar-brand { - color: fade(white, 70%); - &:hover, - &:focus { - color: white; - } - } - .nav > li > a, - .nav > li > a:focus { - color: fade(white, 70%); - &:hover { - color: white; - } - } - &.affix { - background-color: white; - border-color: fade(@gray-darker, 5%); - .navbar-header .navbar-brand { - color: @theme-primary; - font-size: 14px; - &:hover, - &:focus { - color: darken(@theme-primary, 10%); - } - } - .nav > li > a, - .nav > li > a:focus { - color: @gray-darker; - &:hover { - color: @theme-primary; - } - } - } - } -} - -// Homepage Header - -header { - position: relative; - width: 100%; - min-height: auto; - .background-cover; - background-position: center; - background-image: url('../img/header.jpg'); - text-align: center; - color: white; - .header-content { - position: relative; - text-align: center; - padding: 100px 15px 100px; - width: 100%; - .header-content-inner { - h1 { - font-weight: 700; - text-transform: uppercase; - margin-top: 0; - margin-bottom: 0; - font-size: 30px; - } - hr { - margin: 30px auto; - } - p { - font-weight: 300; - color: fade(white, 70%); - font-size: 16px; - margin-bottom: 50px; - } - } - } - @media (min-width: 768px) { - min-height: 100%; - .header-content { - position: absolute; - top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); - padding: 0 50px; - .header-content-inner { - max-width: 1000px; - margin-left: auto; - margin-right: auto; - h1 { - font-size: 50px; - } - p { - font-size: 18px; - max-width: 80%; - margin-left: auto; - margin-right: auto; - } - } - } - } -} - -// Sections - -.section-heading { - margin-top: 0; -} - -.service-box { - max-width: 400px; - margin: 50px auto 0; - @media (min-width: 992px) { - margin: 20px auto 0; - } - p { - margin-bottom: 0; - } -} - -.portfolio-box { - position: relative; - display: block; - max-width: 650px; - margin: 0 auto; - .portfolio-box-caption { - color: white; - opacity: 0; - display: block; - background: fade(@theme-primary, 90%); - position: absolute; - bottom: 0; - text-align: center; - width: 100%; - height: 100%; - .transition-all; - .portfolio-box-caption-content { - width: 100%; - text-align: center; - position: absolute; - top: 50%; - transform: translateY(-50%); - .project-category, - .project-name { - .sans-serif-font; - padding: 0 15px; - } - .project-category { - text-transform: uppercase; - font-weight: 600; - font-size: 14px; - } - .project-name { - font-size: 18px; - } - } - } - &:hover { - .portfolio-box-caption { - opacity: 1; - } - } - &:focus { - outline: none; - } - @media (min-width: 768px) { - .portfolio-box-caption { - .portfolio-box-caption-content { - .project-category { - font-size: 16px; - } - .project-name { - font-size: 22px; - } - } - } - } -} - -.call-to-action { - h2 { - margin: 0 auto 20px; - } -} - -// Bootstrap Overrides -.text-primary { - color: @theme-primary; -} - -.no-gutter > [class*='col-'] { - padding-right:0; - padding-left:0; -} - -// Button Styles -.btn-default { - .button-variant(@gray-darker;white;white); -} - -.btn-primary { - .button-variant(white;@theme-primary;@theme-primary); -} - -.btn { - .sans-serif-font; - border: none; - border-radius: 300px; - font-weight: 700; - text-transform: uppercase; -} - -.btn-xl { - padding: 15px 30px; -} - -// Extras -// -- Highlight Color Customization -::-moz-selection { - color: white; - text-shadow: none; - background: @gray-darker; -} - -::selection { - color: white; - text-shadow: none; - background: @gray-darker; -} - -img::selection { - color: white; - background: transparent; -} - -img::-moz-selection { - color: white; - background: transparent; -} - -body { - webkit-tap-highlight-color: @gray-darker; -} \ No newline at end of file diff --git a/less/mixins.less b/less/mixins.less deleted file mode 100644 index 74de548..0000000 --- a/less/mixins.less +++ /dev/null @@ -1,63 +0,0 @@ -// Mixins - -.transition-all() { - -webkit-transition: all 0.35s; - -moz-transition: all 0.35s; - transition: all 0.35s; -} - -.background-cover() { - -webkit-background-size: cover; - -moz-background-size: cover; - background-size: cover; - -o-background-size: cover; -} - -.button-variant(@color; @background; @border) { - color: @color; - background-color: @background; - border-color: @border; - .transition-all; - - &:hover, - &:focus, - &.focus, - &:active, - &.active, - .open > .dropdown-toggle& { - color: @color; - background-color: darken(@background, 5%); - border-color: darken(@border, 7%); - } - &:active, - &.active, - .open > .dropdown-toggle& { - background-image: none; - } - &.disabled, - &[disabled], - fieldset[disabled] & { - &, - &:hover, - &:focus, - &.focus, - &:active, - &.active { - background-color: @background; - border-color: @border; - } - } - - .badge { - color: @background; - background-color: @color; - } -} - -.sans-serif-font() { - font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif; -} - -.serif-font() { - font-family: 'Merriweather', 'Helvetica Neue', Arial, sans-serif; -} \ No newline at end of file diff --git a/less/variables.less b/less/variables.less deleted file mode 100644 index c3eec98..0000000 --- a/less/variables.less +++ /dev/null @@ -1,12 +0,0 @@ -// Variables - -// Gray and Brand Colors for use across theme - -@theme-primary: #F05F40; - -@gray-base: #000; -@gray-darker: lighten(@gray-base, 13.5%); // #222 -@gray-dark: lighten(@gray-base, 20%); // #333 -@gray: lighten(@gray-base, 33.5%); // #555 -@gray-light: lighten(@gray-base, 46.7%); // #777 -@gray-lighter: lighten(@gray-base, 93.5%); // #eee \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..1ee345e --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/nix/store/yglc8kgzmdaskyngv90y1mw96fl00pjy-python3-3.7.4/bin/python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "site_musique.settings.dev") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 663132c..0000000 --- a/nginx.conf +++ /dev/null @@ -1,21 +0,0 @@ -server { - listen 80; - - location / { - root /usr/share/nginx/html; - index index.php; - } - - #error_page 404 /404.html; - - # pass the PHP scripts to FastCGI server listening on php:9000 - # - location ~ \.php$ { - root html; - fastcgi_pass php:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name; - include fastcgi_params; - } - -} diff --git a/site_musique/__init__.py b/site_musique/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/site_musique/settings/base.py b/site_musique/settings/base.py new file mode 100644 index 0000000..bdf4c12 --- /dev/null +++ b/site_musique/settings/base.py @@ -0,0 +1,96 @@ +""" +Django settings for site_musique project. + +Generated by 'django-admin startproject' using Django 1.11.23. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + + +# 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 = [ + 'site_statique.apps.SiteStatiqueConfig', + 'timeline.apps.TimelineConfig', + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'site_musique.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASE_DIR, 'templates')], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'site_musique.wsgi.application' + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'fr-fr' + +TIME_ZONE = 'Europe/Paris' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' + +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] + +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +MEDIA_URL = '/media/' diff --git a/site_musique/settings/dev.py b/site_musique/settings/dev.py new file mode 100644 index 0000000..1ea3e87 --- /dev/null +++ b/site_musique/settings/dev.py @@ -0,0 +1,13 @@ +from .base import * + +DEBUG = True + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} diff --git a/site_musique/settings/prod.py b/site_musique/settings/prod.py new file mode 100644 index 0000000..94c5cd9 --- /dev/null +++ b/site_musique/settings/prod.py @@ -0,0 +1,19 @@ +from .base import * + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] diff --git a/site_musique/urls.py b/site_musique/urls.py new file mode 100644 index 0000000..9e94ca4 --- /dev/null +++ b/site_musique/urls.py @@ -0,0 +1,29 @@ +"""site_musique URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +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 + +urlpatterns = [ + path('evenements/', include('timeline.urls')), + path('', include('site_statique.urls')), + path('admin/', admin.site.urls, name='admin'), +] + +urlpatterns += staticfiles_urlpatterns() +urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/site_musique/wsgi.py b/site_musique/wsgi.py new file mode 100644 index 0000000..c7cbc73 --- /dev/null +++ b/site_musique/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for site_musique 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/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "site_musique.settings") + +application = get_wsgi_application() diff --git a/site_statique/__init__.py b/site_statique/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/site_statique/admin.py b/site_statique/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/site_statique/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/site_statique/apps.py b/site_statique/apps.py new file mode 100644 index 0000000..1b73e83 --- /dev/null +++ b/site_statique/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class SiteStatiqueConfig(AppConfig): + name = 'site_statique' diff --git a/site_statique/migrations/__init__.py b/site_statique/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/site_statique/models.py b/site_statique/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/site_statique/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/direction.php b/site_statique/templates/site_statique/direction.html similarity index 66% rename from direction.php rename to site_statique/templates/site_statique/direction.html index 00fbbbd..388890f 100644 --- a/direction.php +++ b/site_statique/templates/site_statique/direction.html @@ -1,3 +1,4 @@ +{% load static %} @@ -11,28 +12,27 @@ Musique fraternité - Direction - + {% include "include_head.html" %} - + {% include "navbar.html" %}
- +
+ {% include "contact.html" %} + + {% include "footer.html" %} - - - - - + {% include "include_foot.html" %} diff --git a/ecole.php b/site_statique/templates/site_statique/ecole.html similarity index 94% rename from ecole.php rename to site_statique/templates/site_statique/ecole.html index 819d2d4..0b398aa 100644 --- a/ecole.php +++ b/site_statique/templates/site_statique/ecole.html @@ -1,3 +1,4 @@ +{% load static %} @@ -11,15 +12,15 @@ Musique fraternité - École de Musique - + {% include "include_head.html" %} - + {% include "navbar.html" %} -
+

École de Musique
«Les notes de l’Ill»

@@ -114,7 +115,7 @@
- icone trombone + icone trombone

Les instruments enseignés sont

  • Le chant @@ -142,16 +143,16 @@ @@ -190,9 +191,10 @@
- + {% include "footer.html" %} + + {% include "include_foot.html" %} - + + + + + + + + + + + diff --git a/include_head.html b/templates/include_head.html similarity index 86% rename from include_head.html rename to templates/include_head.html index cd59f6d..78d55e3 100644 --- a/include_head.html +++ b/templates/include_head.html @@ -1,3 +1,4 @@ +{% load static %} @@ -7,7 +8,7 @@ - + @@ -16,4 +17,4 @@ - + diff --git a/navbar.html b/templates/navbar.html similarity index 66% rename from navbar.html rename to templates/navbar.html index 7dbbd5f..4d82a88 100644 --- a/navbar.html +++ b/templates/navbar.html @@ -1,3 +1,4 @@ +{% load static %}
+ + {% endif %} + +
+
+ + {% ifchanged evenement.evenement_passe %} + + {% endifchanged %} + + {% ifchanged evenement.annee evenement.evenement_passe %} +

{{ evenement.annee }}

+ {% endifchanged %} + +
    + + {% endifchanged %} + +
  • +
    +
    +
    +

    {{ evenement.titre }}

    +

    {{ evenement.date }}
    + {{ evenement.heure_debut }} - {{ evenement.heure_fin }}
    + {{ evenement.lieu }}

    +
    +
    + + + +
    + +

    {{ evenement.description }}

    + + + +
    +
    +
  • + + {% if forloop.last %} + +
+
+
+ + {% endif %} + + {% endfor %} + + {% endif %} + + {% include "contact.html" %} + + {% include "footer.html" %} + + {% include "include_foot.html" %} + + + + + + diff --git a/timeline/tests.py b/timeline/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/timeline/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/timeline/urls.py b/timeline/urls.py new file mode 100644 index 0000000..aba43cc --- /dev/null +++ b/timeline/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='evenements'), +] diff --git a/timeline/views.py b/timeline/views.py new file mode 100644 index 0000000..1bbd9c1 --- /dev/null +++ b/timeline/views.py @@ -0,0 +1,10 @@ +from django.shortcuts import render + +from .models import Timeline + +def index(request): + liste_evenements = Timeline.objects.order_by('-date') + context = { + 'liste_evenements': liste_evenements, + } + return render(request, 'timeline/evenements.html', context)