diff --git a/evenementiel/settings_dev.py b/evenementiel/settings_dev.py index 2efc4d4..7a05f58 100644 --- a/evenementiel/settings_dev.py +++ b/evenementiel/settings_dev.py @@ -35,6 +35,7 @@ INSTALLED_APPS = [ 'equipment.apps.EquipmentConfig', 'event.apps.EventConfig', 'user.apps.UserConfig', + 'shared.apps.SharedConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -43,6 +44,7 @@ INSTALLED_APPS = [ 'django.contrib.staticfiles', 'bootstrapform', 'debug_toolbar', + 'widget_tweaks', ] MIDDLEWARE_CLASSES = [ @@ -60,13 +62,13 @@ MIDDLEWARE_CLASSES = [ ROOT_URLCONF = 'evenementiel.urls' STATICFILES_DIRS = [ - os.path.join(BASE_DIR, 'var/static/'), + os.path.join(BASE_DIR, 'shared/static/'), ] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ["var/templates/", ], + 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -74,7 +76,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', - 'var.shared.context_processor', + 'shared.shared.context_processor', ], }, }, diff --git a/event/templates/event/base.html b/event/templates/event/base.html new file mode 100644 index 0000000..172f0cd --- /dev/null +++ b/event/templates/event/base.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block sidenav %} +
+ +
+ +
  • + + + Looool + +
  • + +{% endblock %} diff --git a/requirements.txt b/requirements.txt index bef374d..1a4d834 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ Django==1.10 Pillow==3.3.0 psycopg2==2.6.2 django-bootstrap-form==3.2.1 +django-widget-tweaks diff --git a/shared/__init__.py b/shared/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shared/admin.py b/shared/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/shared/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/shared/apps.py b/shared/apps.py new file mode 100644 index 0000000..46de263 --- /dev/null +++ b/shared/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class SharedConfig(AppConfig): + name = 'shared' diff --git a/shared/migrations/__init__.py b/shared/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shared/models.py b/shared/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/shared/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/var/shared.py b/shared/shared.py similarity index 100% rename from var/shared.py rename to shared/shared.py diff --git a/var/static/css/bootstrap.min.css b/shared/static/css/bootstrap.min.css similarity index 100% rename from var/static/css/bootstrap.min.css rename to shared/static/css/bootstrap.min.css diff --git a/var/static/css/style-responsive.css b/shared/static/css/style-responsive.css similarity index 100% rename from var/static/css/style-responsive.css rename to shared/static/css/style-responsive.css diff --git a/var/static/css/style.css b/shared/static/css/style.css similarity index 100% rename from var/static/css/style.css rename to shared/static/css/style.css diff --git a/var/static/font-awesome/HELP-US-OUT.txt b/shared/static/font-awesome/HELP-US-OUT.txt similarity index 100% rename from var/static/font-awesome/HELP-US-OUT.txt rename to shared/static/font-awesome/HELP-US-OUT.txt diff --git a/var/static/font-awesome/css/font-awesome.css b/shared/static/font-awesome/css/font-awesome.css similarity index 100% rename from var/static/font-awesome/css/font-awesome.css rename to shared/static/font-awesome/css/font-awesome.css diff --git a/var/static/font-awesome/css/font-awesome.min.css b/shared/static/font-awesome/css/font-awesome.min.css similarity index 100% rename from var/static/font-awesome/css/font-awesome.min.css rename to shared/static/font-awesome/css/font-awesome.min.css diff --git a/var/static/font-awesome/fonts/FontAwesome.otf b/shared/static/font-awesome/fonts/FontAwesome.otf similarity index 100% rename from var/static/font-awesome/fonts/FontAwesome.otf rename to shared/static/font-awesome/fonts/FontAwesome.otf diff --git a/var/static/font-awesome/fonts/fontawesome-webfont.eot b/shared/static/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from var/static/font-awesome/fonts/fontawesome-webfont.eot rename to shared/static/font-awesome/fonts/fontawesome-webfont.eot diff --git a/var/static/font-awesome/fonts/fontawesome-webfont.svg b/shared/static/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from var/static/font-awesome/fonts/fontawesome-webfont.svg rename to shared/static/font-awesome/fonts/fontawesome-webfont.svg diff --git a/var/static/font-awesome/fonts/fontawesome-webfont.ttf b/shared/static/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from var/static/font-awesome/fonts/fontawesome-webfont.ttf rename to shared/static/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/var/static/font-awesome/fonts/fontawesome-webfont.woff b/shared/static/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from var/static/font-awesome/fonts/fontawesome-webfont.woff rename to shared/static/font-awesome/fonts/fontawesome-webfont.woff diff --git a/var/static/font-awesome/fonts/fontawesome-webfont.woff2 b/shared/static/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from var/static/font-awesome/fonts/fontawesome-webfont.woff2 rename to shared/static/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/var/static/font-awesome/less/animated.less b/shared/static/font-awesome/less/animated.less similarity index 100% rename from var/static/font-awesome/less/animated.less rename to shared/static/font-awesome/less/animated.less diff --git a/var/static/font-awesome/less/bordered-pulled.less b/shared/static/font-awesome/less/bordered-pulled.less similarity index 100% rename from var/static/font-awesome/less/bordered-pulled.less rename to shared/static/font-awesome/less/bordered-pulled.less diff --git a/var/static/font-awesome/less/core.less b/shared/static/font-awesome/less/core.less similarity index 100% rename from var/static/font-awesome/less/core.less rename to shared/static/font-awesome/less/core.less diff --git a/var/static/font-awesome/less/fixed-width.less b/shared/static/font-awesome/less/fixed-width.less similarity index 100% rename from var/static/font-awesome/less/fixed-width.less rename to shared/static/font-awesome/less/fixed-width.less diff --git a/var/static/font-awesome/less/font-awesome.less b/shared/static/font-awesome/less/font-awesome.less similarity index 100% rename from var/static/font-awesome/less/font-awesome.less rename to shared/static/font-awesome/less/font-awesome.less diff --git a/var/static/font-awesome/less/icons.less b/shared/static/font-awesome/less/icons.less similarity index 100% rename from var/static/font-awesome/less/icons.less rename to shared/static/font-awesome/less/icons.less diff --git a/var/static/font-awesome/less/larger.less b/shared/static/font-awesome/less/larger.less similarity index 100% rename from var/static/font-awesome/less/larger.less rename to shared/static/font-awesome/less/larger.less diff --git a/var/static/font-awesome/less/list.less b/shared/static/font-awesome/less/list.less similarity index 100% rename from var/static/font-awesome/less/list.less rename to shared/static/font-awesome/less/list.less diff --git a/var/static/font-awesome/less/mixins.less b/shared/static/font-awesome/less/mixins.less similarity index 100% rename from var/static/font-awesome/less/mixins.less rename to shared/static/font-awesome/less/mixins.less diff --git a/var/static/font-awesome/less/path.less b/shared/static/font-awesome/less/path.less similarity index 100% rename from var/static/font-awesome/less/path.less rename to shared/static/font-awesome/less/path.less diff --git a/var/static/font-awesome/less/rotated-flipped.less b/shared/static/font-awesome/less/rotated-flipped.less similarity index 100% rename from var/static/font-awesome/less/rotated-flipped.less rename to shared/static/font-awesome/less/rotated-flipped.less diff --git a/var/static/font-awesome/less/screen-reader.less b/shared/static/font-awesome/less/screen-reader.less similarity index 100% rename from var/static/font-awesome/less/screen-reader.less rename to shared/static/font-awesome/less/screen-reader.less diff --git a/var/static/font-awesome/less/stacked.less b/shared/static/font-awesome/less/stacked.less similarity index 100% rename from var/static/font-awesome/less/stacked.less rename to shared/static/font-awesome/less/stacked.less diff --git a/var/static/font-awesome/less/variables.less b/shared/static/font-awesome/less/variables.less similarity index 100% rename from var/static/font-awesome/less/variables.less rename to shared/static/font-awesome/less/variables.less diff --git a/var/static/font-awesome/scss/_animated.scss b/shared/static/font-awesome/scss/_animated.scss similarity index 100% rename from var/static/font-awesome/scss/_animated.scss rename to shared/static/font-awesome/scss/_animated.scss diff --git a/var/static/font-awesome/scss/_bordered-pulled.scss b/shared/static/font-awesome/scss/_bordered-pulled.scss similarity index 100% rename from var/static/font-awesome/scss/_bordered-pulled.scss rename to shared/static/font-awesome/scss/_bordered-pulled.scss diff --git a/var/static/font-awesome/scss/_core.scss b/shared/static/font-awesome/scss/_core.scss similarity index 100% rename from var/static/font-awesome/scss/_core.scss rename to shared/static/font-awesome/scss/_core.scss diff --git a/var/static/font-awesome/scss/_fixed-width.scss b/shared/static/font-awesome/scss/_fixed-width.scss similarity index 100% rename from var/static/font-awesome/scss/_fixed-width.scss rename to shared/static/font-awesome/scss/_fixed-width.scss diff --git a/var/static/font-awesome/scss/_icons.scss b/shared/static/font-awesome/scss/_icons.scss similarity index 100% rename from var/static/font-awesome/scss/_icons.scss rename to shared/static/font-awesome/scss/_icons.scss diff --git a/var/static/font-awesome/scss/_larger.scss b/shared/static/font-awesome/scss/_larger.scss similarity index 100% rename from var/static/font-awesome/scss/_larger.scss rename to shared/static/font-awesome/scss/_larger.scss diff --git a/var/static/font-awesome/scss/_list.scss b/shared/static/font-awesome/scss/_list.scss similarity index 100% rename from var/static/font-awesome/scss/_list.scss rename to shared/static/font-awesome/scss/_list.scss diff --git a/var/static/font-awesome/scss/_mixins.scss b/shared/static/font-awesome/scss/_mixins.scss similarity index 100% rename from var/static/font-awesome/scss/_mixins.scss rename to shared/static/font-awesome/scss/_mixins.scss diff --git a/var/static/font-awesome/scss/_path.scss b/shared/static/font-awesome/scss/_path.scss similarity index 100% rename from var/static/font-awesome/scss/_path.scss rename to shared/static/font-awesome/scss/_path.scss diff --git a/var/static/font-awesome/scss/_rotated-flipped.scss b/shared/static/font-awesome/scss/_rotated-flipped.scss similarity index 100% rename from var/static/font-awesome/scss/_rotated-flipped.scss rename to shared/static/font-awesome/scss/_rotated-flipped.scss diff --git a/var/static/font-awesome/scss/_screen-reader.scss b/shared/static/font-awesome/scss/_screen-reader.scss similarity index 100% rename from var/static/font-awesome/scss/_screen-reader.scss rename to shared/static/font-awesome/scss/_screen-reader.scss diff --git a/var/static/font-awesome/scss/_stacked.scss b/shared/static/font-awesome/scss/_stacked.scss similarity index 100% rename from var/static/font-awesome/scss/_stacked.scss rename to shared/static/font-awesome/scss/_stacked.scss diff --git a/var/static/font-awesome/scss/_variables.scss b/shared/static/font-awesome/scss/_variables.scss similarity index 100% rename from var/static/font-awesome/scss/_variables.scss rename to shared/static/font-awesome/scss/_variables.scss diff --git a/var/static/font-awesome/scss/font-awesome.scss b/shared/static/font-awesome/scss/font-awesome.scss similarity index 100% rename from var/static/font-awesome/scss/font-awesome.scss rename to shared/static/font-awesome/scss/font-awesome.scss diff --git a/var/static/jquery/jquery-3.1.0.min.js b/shared/static/jquery/jquery-3.1.0.min.js similarity index 100% rename from var/static/jquery/jquery-3.1.0.min.js rename to shared/static/jquery/jquery-3.1.0.min.js diff --git a/var/static/jquery/jquery.dcjqaccordion.2.7.js b/shared/static/jquery/jquery.dcjqaccordion.2.7.js similarity index 100% rename from var/static/jquery/jquery.dcjqaccordion.2.7.js rename to shared/static/jquery/jquery.dcjqaccordion.2.7.js diff --git a/var/static/jquery/jquery.nicescroll.js b/shared/static/jquery/jquery.nicescroll.js similarity index 100% rename from var/static/jquery/jquery.nicescroll.js rename to shared/static/jquery/jquery.nicescroll.js diff --git a/var/static/jquery/jquery.scrollTo.min.js b/shared/static/jquery/jquery.scrollTo.min.js similarity index 100% rename from var/static/jquery/jquery.scrollTo.min.js rename to shared/static/jquery/jquery.scrollTo.min.js diff --git a/var/static/js/bootstrap-inputmask.min.js b/shared/static/js/bootstrap-inputmask.min.js similarity index 100% rename from var/static/js/bootstrap-inputmask.min.js rename to shared/static/js/bootstrap-inputmask.min.js diff --git a/var/static/js/bootstrap-switch.js b/shared/static/js/bootstrap-switch.js similarity index 100% rename from var/static/js/bootstrap-switch.js rename to shared/static/js/bootstrap-switch.js diff --git a/var/static/js/bootstrap.min.js b/shared/static/js/bootstrap.min.js similarity index 100% rename from var/static/js/bootstrap.min.js rename to shared/static/js/bootstrap.min.js diff --git a/var/static/js/form-component.js b/shared/static/js/form-component.js similarity index 100% rename from var/static/js/form-component.js rename to shared/static/js/form-component.js diff --git a/var/static/js/index.js b/shared/static/js/index.js similarity index 100% rename from var/static/js/index.js rename to shared/static/js/index.js diff --git a/var/static/js/jquery.tagsinput.js b/shared/static/js/jquery.tagsinput.js similarity index 100% rename from var/static/js/jquery.tagsinput.js rename to shared/static/js/jquery.tagsinput.js diff --git a/var/templates/base.html b/shared/templates/base.html similarity index 100% rename from var/templates/base.html rename to shared/templates/base.html diff --git a/var/templates/base.html.old b/shared/templates/base.html.old similarity index 100% rename from var/templates/base.html.old rename to shared/templates/base.html.old diff --git a/var/templates/base_error.html b/shared/templates/base_error.html similarity index 100% rename from var/templates/base_error.html rename to shared/templates/base_error.html diff --git a/var/templates/base_footer.html b/shared/templates/base_footer.html similarity index 100% rename from var/templates/base_footer.html rename to shared/templates/base_footer.html diff --git a/var/templates/base_html.html b/shared/templates/base_html.html similarity index 100% rename from var/templates/base_html.html rename to shared/templates/base_html.html diff --git a/var/templates/base_html.html.old b/shared/templates/base_html.html.old similarity index 100% rename from var/templates/base_html.html.old rename to shared/templates/base_html.html.old diff --git a/var/templates/base_nav.html b/shared/templates/base_nav.html similarity index 100% rename from var/templates/base_nav.html rename to shared/templates/base_nav.html diff --git a/var/templates/base_sidebar_menu.html b/shared/templates/base_sidebar_menu.html similarity index 100% rename from var/templates/base_sidebar_menu.html rename to shared/templates/base_sidebar_menu.html diff --git a/var/templates/form_script.html b/shared/templates/form_script.html similarity index 100% rename from var/templates/form_script.html rename to shared/templates/form_script.html diff --git a/var/templates/sidebase.html b/shared/templates/sidebase.html similarity index 100% rename from var/templates/sidebase.html rename to shared/templates/sidebase.html diff --git a/shared/tests.py b/shared/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/shared/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/shared/views.py b/shared/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/shared/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/user/templates/user/base_user.html b/user/templates/user/base_user.html index d0c6ef4..ea8df3e 100644 --- a/user/templates/user/base_user.html +++ b/user/templates/user/base_user.html @@ -23,7 +23,7 @@ {% endif %} {% if user.is_authenticated %}
  • - + Changer de mot de passe diff --git a/user/templates/user/user_form.html b/user/templates/user/user_form.html index dbb2cf7..a782471 100644 --- a/user/templates/user/user_form.html +++ b/user/templates/user/user_form.html @@ -1,15 +1,18 @@ {% extends "user/base_user.html" %} +{% load widget_tweaks %} + {% load bootstrap %} {% block page_title %}{{ page_title }}{% endblock %} {% block content %} -
    -
    +
    +
    -

    Form Elements

    -
    - +

    Formulaire

    + + {% csrf_token %} +
    {% for field in form %} {% if field.errors %}
    @@ -23,7 +26,7 @@ {% else %}
    -
    {{ field | add_class:"form-control" }} +
    {{ field | attr:"class:form-control" }} {% if field.help_text %}

    {{ field.help_text }}

    {% endif %} @@ -31,43 +34,20 @@
    {% endif %} {% endfor %} - -
    - -
    - +
    +
    +
    +
    + {% block extra_form_input %}{% endblock %}
    -
    +
    - - -
    -
    -
    - {% if form.errors %} -

    {% block user_error %}{% endblock %}

    - {% endif %} -
    - {% csrf_token %} -
    - {% for field in form %} - {{ field | bootstrap }} - {% endfor %} -
    -
    - - {% block extra_form_input %}{% endblock %} -
    -
    -
    -
    -