Compare commits
5 commits
master
...
kerl/bds_h
Author | SHA1 | Date | |
---|---|---|---|
|
3b98f35773 | ||
|
5983a55950 | ||
|
b32eb96fc7 | ||
|
8ee173cd8c | ||
|
02958b4866 |
11 changed files with 321 additions and 10 deletions
21
bds/migrations/0005_rm_ffsu_and_certificate.py
Normal file
21
bds/migrations/0005_rm_ffsu_and_certificate.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 2.2.12 on 2020-05-08 14:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("bds", "0004_is_member_cotiz_type"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(model_name="bdsprofile", name="FFSU_number",),
|
||||
migrations.AlterField(
|
||||
model_name="bdsprofile",
|
||||
name="certificate_file",
|
||||
field=models.BooleanField(
|
||||
default=False, verbose_name="fichier de certificat médical"
|
||||
),
|
||||
),
|
||||
]
|
|
@ -65,18 +65,13 @@ class BDSProfile(models.Model):
|
|||
mails_bds = models.BooleanField(_("recevoir les mails du BDS"), default=False)
|
||||
|
||||
has_certificate = models.BooleanField(_("certificat médical"), default=False)
|
||||
certificate_file = models.FileField(
|
||||
_("fichier de certificat médical"),
|
||||
upload_to=get_certificate_filename,
|
||||
blank=True,
|
||||
certificate_file = models.BooleanField(
|
||||
_("fichier de certificat médical"), default=False
|
||||
)
|
||||
|
||||
ASPSL_number = models.CharField(
|
||||
_("numéro AS PSL"), max_length=50, blank=True, null=True
|
||||
)
|
||||
FFSU_number = models.CharField(
|
||||
_("numéro FFSU"), max_length=50, blank=True, null=True
|
||||
)
|
||||
|
||||
is_member = models.BooleanField(_("adhérent⋅e du BDS"), default=False)
|
||||
cotisation_period = models.CharField(
|
||||
|
|
25
bds/static/bds/config.rb
Normal file
25
bds/static/bds/config.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
require 'compass/import-once/activate'
|
||||
# Require any additional compass plugins here.
|
||||
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "css"
|
||||
sass_dir = "sass"
|
||||
images_dir = "images"
|
||||
javascripts_dir = "javascripts"
|
||||
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
|
||||
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
# preferred_syntax = :sass
|
||||
# and then run:
|
||||
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
92
bds/static/bds/css/bds.css
Normal file
92
bds/static/bds/css/bds.css
Normal file
|
@ -0,0 +1,92 @@
|
|||
@import url("https://fonts.googleapis.com/css?family=Muli:400,700&display=swap");
|
||||
/* line 9, ../sass/bds.scss */
|
||||
html {
|
||||
font-family: Muli, sans-serif;
|
||||
height: 100%;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* line 15, ../sass/bds.scss */
|
||||
body {
|
||||
margin: 0;
|
||||
background: #DC004E;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* line 21, ../sass/bds.scss */
|
||||
header {
|
||||
background-color: #76002a;
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
/* line 26, ../sass/bds.scss */
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #FBE000;
|
||||
line-height: 75px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* line 33, ../sass/bds.scss */
|
||||
h2 {
|
||||
text-align: center;
|
||||
background-color: #ffee62;
|
||||
padding: 10px 0;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #0767A0;
|
||||
}
|
||||
|
||||
/* line 41, ../sass/bds.scss */
|
||||
li {
|
||||
list-style: none;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* line 46, ../sass/bds.scss */
|
||||
a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 51, ../sass/bds.scss */
|
||||
a:hover {
|
||||
color: #011f32;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* line 56, ../sass/bds.scss */
|
||||
#main-container {
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
font-size: large;
|
||||
min-height: calc(100vh - 50px - 75px);
|
||||
}
|
||||
|
||||
/* line 63, ../sass/bds.scss */
|
||||
section {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* line 72, ../sass/bds.scss */
|
||||
article {
|
||||
flex: 1;
|
||||
margin: 30px;
|
||||
/* background: #90baad; */
|
||||
background: #FFF9CB;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
/* line 80, ../sass/bds.scss */
|
||||
footer {
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
background-color: #76002a;
|
||||
color: #f0f0f0;
|
||||
width: 100%;
|
||||
}
|
87
bds/static/bds/sass/bds.scss
Normal file
87
bds/static/bds/sass/bds.scss
Normal file
|
@ -0,0 +1,87 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Muli:400,700&display=swap');
|
||||
|
||||
$main: #DC004E;
|
||||
$aux1: #FBE000;
|
||||
$aux2: #0767A0;
|
||||
$white: #FFF9CB;
|
||||
$black: darken(#013352, 20%);
|
||||
|
||||
html {
|
||||
font-family: Muli, sans-serif;
|
||||
height: 100%;
|
||||
color: $black;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: $main;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: darken($main, 20%);
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: $aux1;
|
||||
line-height: 75px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
background-color: lighten($aux1, 20%);
|
||||
padding: 10px 0;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid $aux2;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: lighten($black, 10%);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#main-container {
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
font-size: large;
|
||||
min-height: calc(100vh - 50px - 75px);
|
||||
}
|
||||
|
||||
section {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
article {
|
||||
flex: 1;
|
||||
margin: 30px;
|
||||
/* background: #90baad; */
|
||||
background: $white;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
background-color: darken($main, 20%);
|
||||
color: #f0f0f0;
|
||||
width: 100%;
|
||||
}
|
30
bds/templates/bds/base.html
Normal file
30
bds/templates/bds/base.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% load staticfiles %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>GestioBDS</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="{% static 'bds/css/bds.css' %}" />
|
||||
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="header">
|
||||
<h1>GestioBDS</h1>
|
||||
</header>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<footer class="footer">
|
||||
Développé par <a href="https://www.eleves.ens.fr/kde">KDEns</a> -
|
||||
Pour tout problème :
|
||||
<a href="mailto:klub-dev@ens.fr"><tt>klub-dev@ens.fr</tt></a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
41
bds/templates/bds/home.html
Normal file
41
bds/templates/bds/home.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
{% extends "bds/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="main-container">
|
||||
<section>
|
||||
<article>
|
||||
<h2>Gestion des membres</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="#todo">Chercher une personne</a></li>
|
||||
<li><a href="#todo">Exporter une liste des membres</a></li>
|
||||
</ul>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="section columns">
|
||||
<article>
|
||||
<h2>Gestion des clubs</h2>
|
||||
|
||||
<ul>
|
||||
<li>Club 1</li>
|
||||
<li>Club 2</li>
|
||||
<li>Club 3</li>
|
||||
<li>Club 4</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<h2>Événements</h2>
|
||||
|
||||
<ul>
|
||||
<li>Événement 1</li>
|
||||
<li>Événement 2</li>
|
||||
<li>Événement 3</li>
|
||||
<li>Événement 4</li>
|
||||
</ul>
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
6
bds/urls.py
Normal file
6
bds/urls.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.urls import path
|
||||
|
||||
from bds import views
|
||||
|
||||
app_name = "bds"
|
||||
urlpatterns = [path("", views.home, name="home")]
|
11
bds/views.py
11
bds/views.py
|
@ -1 +1,10 @@
|
|||
# Create your views here.
|
||||
from django.contrib.auth.mixins import PermissionRequiredMixin
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
|
||||
class HomeView(PermissionRequiredMixin, TemplateView):
|
||||
permission_required = "bds:is_team"
|
||||
template_name = "bds/home.html"
|
||||
|
||||
|
||||
home = HomeView.as_view()
|
||||
|
|
|
@ -2,4 +2,8 @@ from django.contrib.staticfiles.apps import StaticFilesConfig
|
|||
|
||||
|
||||
class IgnoreSrcStaticFilesConfig(StaticFilesConfig):
|
||||
ignore_patterns = StaticFilesConfig.ignore_patterns + ["src/**"]
|
||||
ignore_patterns = StaticFilesConfig.ignore_patterns + [
|
||||
"src/**",
|
||||
"config.rb",
|
||||
"sass/",
|
||||
]
|
||||
|
|
|
@ -8,7 +8,6 @@ from django.conf.urls.static import static
|
|||
from django.contrib import admin
|
||||
from django.contrib.auth import views as django_auth_views
|
||||
from django.urls import include, path
|
||||
from django.views.decorators.cache import cache_page
|
||||
from django.views.generic.base import TemplateView
|
||||
from django_cas_ng import views as django_cas_views
|
||||
from django_js_reverse.views import urls_js
|
||||
|
@ -33,6 +32,8 @@ urlpatterns = [
|
|||
path("", gestioncof_views.HomeView.as_view(), name="home"),
|
||||
# Le BdA
|
||||
path("bda/", include("bda.urls")),
|
||||
# Le BDS
|
||||
path("bds/", include("bds.urls")),
|
||||
# Les exports
|
||||
path("export/", include(export_patterns)),
|
||||
# Les petits cours
|
||||
|
|
Loading…
Reference in a new issue