Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit 24a0887b authored by Louis's avatar Louis

La sélection des exercices fonctionne (mais pas la création).

parent 1aa5590f
"""
Django settings for enligne project.
Generated by 'django-admin startproject' using Django 2.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/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.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '^8+8*0r-j9754j4!i=93mi6si@5ptr%8cq47y#i)x)s3r_pf88'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
#'django.contrib.admin',
#'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'utiliser.apps.UtiliserConfig',
]
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 = 'enligne.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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 = 'enligne.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
#'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
#}
}
# Password validation
# https://docs.djangoproject.com/en/2.0/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',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/
LANGUAGE_CODE = 'fr-fr'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
from django.conf.urls import include, url
from django.urls import path
urlpatterns = [
path('', include('utiliser.urls')),
path('creer/', include('utiliser.urls')),
]
"""
WSGI config for enligne 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/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "enligne.settings")
application = get_wsgi_application()
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "enligne.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
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?"
) from exc
execute_from_command_line(sys.argv)
MAINSITEURL = "http://pyromaths.frama.io/pyromaths-staticsite/"
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class UtiliserConfig(AppConfig):
name = 'utiliser'
from django.db import models
# Create your models here.
This diff is collapsed.
This diff is collapsed.
/**********************************
* GLOBAL
**********************************/
html, body{
height:100%;
margin:-8px 0;
}
body{
font-size:11px;
color:#333;
}
body a{
color:#773015;
}
body ul{
list-style:none;
padding:0;
}
#total{
min-height:100%;
position: relative;
margin:0;
}
#page{
width:940px;
margin:0 auto;
}
h2, h3{
border-bottom:1px solid #ffa628;
}
h1, h2, h3{
color:#d32f19;
font-family:verdana,sans-serif;
}
h1{
font-weight:lighter;
font-variant:small-caps;
padding-bottom:15px;
}
h2{
font-weight:lighter;
padding-bottom:10px;
}
h3{
padding-bottom:5px;
}
h4{
margin-top:10px;
margin-bottom:5px;
color:#000;
}
h5{
float:right;
margin-top:0;
padding-left:20px;
color:#000;
font-size:11px;
}
#deux_cols h5{
margin-top:11px;
}
code{
color:#ffa628;
}
/**********************************
* MENUS
**********************************/
#nav_menu{
text-align:center;
font-size:120%;
clear:both;
padding-top:15px;
padding-bottom:15px;
font-variant: small-caps;
color:#d32f19;
}
#nav_menu a{
text-decoration:none;
color:#d32f19;
}
#nav_menu a:hover{
font-weight:bold;
}
#nav_menu ul{
border:1px solid #ffa628;
height:35px;
list-style:none;
}
#nav_menu li{
border-right:1px solid #ffa628;
display: block;
width: 12em;
height:25px;
float:left;
padding:5px 0;
}
/**********************************
* SLIDESHOW
**********************************/
#presentation{
height:365px;
padding:5px 0;
}
.presentation_gauche{
border:1px solid #ffa628;
width:49%;
float:left;
overflow:hidden;
height:345px;
}
#presentation .diapo{
display:none;
position:relative;
}
#presentation .diapo img{
width:420px;
height:330px
}
.diapo_contenu{
position:absolute;
left:20px;
width:420px;
height:330px
}
.presentation_droite{
width:50%;
height:345px;
float:right;
position:relative;
}
.presentation_droite_haut{
position:relative;
line-height:24px;
}
.presentation_droite_haut h2{
margin-left:60px;
}
.presentation_droite_haut a{
padding-left:60px;
background:transparent url(img/case_a_cocher2.png) no-repeat right top;
display:block;
text-decoration:none;
}
.presentation_droite_haut a.activeSlide{
background-position:right bottom;
color:#773015;
font-weight:bold;
}
.presentation_droite_bas{
padding-left:60px;
position:absolute;
bottom:0;
}
/**********************************
* 3 COLONNES
**********************************/
#trois_cols{
display:block;
padding-top:15px;
padding-bottom:50px;/*pour compenser la hauteur du pied de page*/
}
#trois_cols img{
max-width:250px;
}
#trois_cols #col_gauche{
width:32%;
float:left;
}
#trois_cols #col_centre{
width:32%;
margin:0 auto;
}
#trois_cols #col_droite{
width:32%;
float:right;
}
.centerleft{
width:21%;
float:left;
text-align: center;
}
.centerright{
width:21%;
float:right;
text-align: center;
}
.center{
width:21%;
margin:0 auto;
text-align: center;
}
/**********************************
* 2 COLONNES
**********************************/
#deux_cols{
display:block;
padding-top:15px;
padding-bottom:50px;/*pour compenser la hauteur du pied de page*/
}
#deux_cols #col_gauche{
width:65%;
}
#deux_cols #col_droite{
width:25%;
float:right;
padding:15px;
border:1px solid #ffa628;
}
#deux_cols #col_droite ul.docs{
list-style:disc;
padding-left:15px;
line-height: 2em;
}
/**********************************
* ARTICLES
**********************************/
.article ul{
list-style:disc;
padding-left:15px;
margin-left:0;
}
.article li{
padding-top:5px;
}
.code{
border: 1px dashed #000;
margin:0 20px;
padding:10px 40px;
font-family:monospace;
display: block;
}
.code em{
font-family: serif;
}
/**********************************
* EN TETE
**********************************/
#logo_holder #logo{
float:left;
display:block;
text-indent:-9999px;
height:80px;
width:444px;
}
/**********************************
* PIED DE PAGE
**********************************/
#footer{
position:absolute;
width:100%;
height:50px;
bottom:0;
border-top:1px dotted #ffa628;
padding:0;
margin:0;
}
#footer p{
padding:2px 0;
}
#footer #copyright{
text-align:center;
padding:0;
}
#footer #left{
float: left;
width: 75px;
height:50px;
}
#footer #feeds{
float:right;
line-height:16px;
width: 75px;
height:50px;
}
#footer #right a#feeds{
padding:20px 20px 0 0;
background: transparent url("img/feed.png") no-repeat 70% 35%;
text-decoration:none;
}
/**********************************
* BOUTTONS
**********************************/
a.button{
background: transparent url('img/bouton_a.png') no-repeat scroll top right;
color: #444;
display: block;
float: left;
font: bold 12px verdana, sans-serif;
height: 24px;
margin-right: 6px;
padding-right: 18px; /* sliding doors padding */
padding-left:0;
margin-left:0;
text-decoration: none;
}
a.button span{
background: transparent url('img/bouton_span.png') no-repeat;
display: block;
line-height: 14px;
padding: 5px 0 5px 18px;
margin:0;
}
a.button:hover {
background-position: bottom right;
color: #000;
outline: none; /* hide dotted outline in Firefox */
}
a.button:hover span {
background-position: bottom left;
padding: 6px 0 4px 18px; /* push text down 1px */
}
/**********************************
* ARTICLES
**********************************/
.clear {
clear: both;
display: block;
height: 1px;
overflow: hidden;
margin: 0;
padding: 0;
}
.article img{
border:0;
vertical-align:middle;
}
.download{
float:right;
}
.download p{
padding-top:40px;
}
ul#version{
list-style: none;
}
.console{
overflow: auto;
width: 90%;
border: 1px solid #000;
background: #333;
padding:0.8em 2em 0.8em 0.5em;
color: #fff;
}
/**********************************
* STATISTIQUES
**********************************/
.article table#stats{
margin-left : auto;
margin-right : auto;
border:0;
}
.article table#dons{
width:100%;
border:0;
}
.article tr.titres{
background-color : #911101;
text-align : center;
}
.article tr.lignes{
background-color : #eddeb2;
}
.article th.os img{
border-width : 0;
margin-left : 10px;
margin-right : 10px;
}
.article th.os{
width : 38px;
height : 60px;
color : #ffffff;
}
.article th.total{
color : #ffffff;
width : 100px;
}
.article td.category{
font-weight : bold;
padding : 5px;
}
.article td.statstot{
font-weight : bold;
text-align : right;
padding-right : 5px;
}
.article td.stats{
text-align : right;
padding-right : 5px;
}
.article td.noms{
text-align : left;
padding-right : 5px;
}
/**********************************
* PYROMATHS EN LIGNE
**********************************/
.ui-tabs-panel {
background: url(/static/img/degrade.png) no-repeat;
width:611px;
}
table.tabs {
width:611px;
}
table.tabs td{
width:50%;
}
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-tabs-nav {
margin:0;
height:30px;
width:611px;
padding:0;
border-bottom:1px solid #ddc525;
}
.ui-tabs .ui-tabs-nav li {
list-style:none;
float:left;
position: relative;
padding:0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav a{
background: url(/static/img/tabs.png) no-repeat -652px 0;
display:block;
height: 30px;
line-height:30px;
width: 76px;
text-align:center;
float:left;
text-decoration:none;
color:#666;
position:relative;
}
.ui-tabs .ui-tabs-panel {
display: block;
padding:0;
}
.ui-tabs a:active {
outline:none;
}
.ui-tabs a:hover {
background-position: -652px -31px;
color:#fff;
}
p#msgjs, p#errmsg{
color:#911101;
text-align: center;
}
/* active tab uses a class name "current". it's highlight is also done by moving the background image. */
ul.tabs a.current, ul.tabs a.current:hover, ul.tabs li.current a {
background-position: -652px -62px;
cursor:default !important;
color:#000 !important;
}
form#idForm input{
border:2px outset #ddc525;
background-color: #f8f3d2;
}
form#idForm select{
color: #666;
background-color: #f8f3d2;
}
/**********************************
* DESCRIPTIF EXERCICES
**********************************/
ul.menu {
list-style-type:none;
margin: 0;
padding: 0 0 0 75px;
width: 15em;
}
ul.menu a {
display: block;
text-decoration: none;
}
ul.menu li {
margin-top: 1px;
}
ul.menu li p.titre{
width: 425px;
height: 28px;
margin: 0px auto 0px auto;
padding: 5px 0px 0px 25px;
background-color: #fff;
background-position: 0px 0px;
background-repeat: no-repeat;
background-image: url(img/titlesBackgroundImagePlus.png);
color: #000;
}
ul.menu li p{
width: 365px;
padding: 0 30px 0 30px;
}
p.desc {
background-color:#FFE7C5;
}
{% extends "utiliser/layout.html" %}
{% block content %}
<div id="deux_cols">
<div id="col_droite">
{% block colonnedroite %} {% endblock %}
</div>
<div id="col_gauche">
{% block colonnegauche %} {% endblock %}
</div>
<div class="clear"></div>
</div>
{% endblock %}
{% load static %}
<!DOCTYPE html>
<html lang="fr">
<head>
<title>{% block title %}{% endblock %}</title>
{% block head %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" href="{{ MAINSITEURL }}/theme/images/favicon.ico"/>
<link rel="stylesheet" href="{% static "style.css" %}" type="text/css"/>
{% endblock head %}
{% block javascript %}{% endblock %}
</head>
<body>
<div id="total">
<div id="page">
<div id="header">
{% block header %}
<div id="logo_holder">
<h1><a href="{{ MAINSITEURL }}" id="logo" style="background:transparent url({{ MAINSITEURL }}/theme/images/bandeau.png);">Pyromaths</a></h1>
</div>
<div class="topnav" id="nav_menu">
<a href="javascript:void(0);" class="icon" onclick="myFunction();">
<!--<i class="fa fa-bars"></i>-->
</a>
<ul>
<li><a href="{{ MAINSITEURL }}" class="active">Accueil</a></li>