Compare commits
47 Commits
messege_et
...
34a261a4af
| Author | SHA1 | Date | |
|---|---|---|---|
| 34a261a4af | |||
| f0e8b025a4 | |||
| 62b2938c71 | |||
| 06125b0900 | |||
| 0047b1f91c | |||
| 7ee14e7b3f | |||
| d12b014b20 | |||
| d9b45ac364 | |||
| 44faeac222 | |||
| e1436e8f4e | |||
| 4ee7dd9fc7 | |||
| a9e708c778 | |||
| e427561cc1 | |||
| 78fafebc4d | |||
| ecdaa9f9f9 | |||
| 9951719b26 | |||
| 1391a5ea3b | |||
| 357b50dfa4 | |||
| bda80fae85 | |||
| 9c1eb543ff | |||
| f55b1a6f2d | |||
| a6412341cf | |||
| ab2d8b479c | |||
| 8f412cb031 | |||
| 69764b74a2 | |||
| e1dc510af1 | |||
| fa21850c6b | |||
| 4a8cbf02b9 | |||
| 798784a163 | |||
| 86ad99de76 | |||
| 5680677865 | |||
| 886c3246af | |||
| 7b66250832 | |||
| 80b3573674 | |||
| efadd66483 | |||
| c9431063de | |||
| 15c33efc14 | |||
| 5257901e75 | |||
| b3294a823e | |||
| 2a182830a6 | |||
| 14631c3744 | |||
| f0894bb66f | |||
| 75285a140a | |||
| 3cc8e292b3 | |||
| 34d1464391 | |||
| 6c12131fab | |||
| 19e4675f32 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
db.sqlite3
|
||||
venv/*
|
||||
media/*
|
||||
venv/
|
||||
media/
|
||||
staticfiles/
|
||||
.env
|
||||
migrations/
|
||||
50
Jenkinsfile
vendored
Normal file
50
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
pipeline
|
||||
{
|
||||
agent any
|
||||
options {
|
||||
// This is required if you want to clean before build
|
||||
skipDefaultCheckout(true)
|
||||
}
|
||||
|
||||
environment
|
||||
{
|
||||
SUDO_PASSWORD = credentials('sudo-password')
|
||||
}
|
||||
|
||||
stages
|
||||
{
|
||||
stage ( 'checkout' )
|
||||
{
|
||||
steps
|
||||
{
|
||||
sh 'echo "Debut du pipeline"'
|
||||
cleanWs()
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage ( 'Deploiement' )
|
||||
{
|
||||
when { branch 'main' }
|
||||
steps {
|
||||
sh '''
|
||||
cd /var/www/sirh
|
||||
echo $SUDO_PASSWORD | sudo -S chown -R jenkins:jenkins /var/www/sirh
|
||||
|
||||
git fetch origin main
|
||||
git reset --hard origin/main
|
||||
|
||||
python3 -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
|
||||
echo $SUDO_PASSWORD | sudo -S chown -R www-data:www-data /var/www/sirh
|
||||
echo "Deploiement reussi"
|
||||
echo $SUDO_PASSWORD | sudo -S supervisorctl restart sirh
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,21 +12,21 @@ https://docs.djangoproject.com/en/5.2/ref/settings/
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from decouple import config
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure--wdb9t(77rvyac$_q!n5gw86&0r(0&&j171v9h!-_$jahsza*5'
|
||||
SECRET_KEY = config('SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
DEBUG = config('DEBUG', default=False, cast=bool)
|
||||
|
||||
ALLOWED_HOSTS = ["https://support.cerfig.org", "support.cerfig.org"]
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=[]).split(',')
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -79,24 +79,25 @@ WSGI_APPLICATION = 'SIRH.wsgi.application'
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
||||
|
||||
# DATABASES = {
|
||||
# 'default': {
|
||||
# 'ENGINE': 'django.db.backends.mysql',
|
||||
# 'NAME': 'sirh',
|
||||
# 'USER': 'sirh',
|
||||
# 'PASSWORD': 'sirh-cerfig',
|
||||
# 'HOST': 'localhost',
|
||||
# 'PORT': '3306',
|
||||
# }
|
||||
# }
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
if config('ENVIRONMENT') == 'local':
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
else:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': config('DATABASE_NAME'),
|
||||
'USER': config('DATABASE_USER'),
|
||||
'PASSWORD': config('DATABASE_PASSWORD'),
|
||||
'HOST': config('DATABASE_HOST'),
|
||||
'PORT': config('DATABASE_PORT'),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
||||
|
||||
@@ -2,6 +2,21 @@
|
||||
{% load tags_personnaliser %}
|
||||
|
||||
<div class="col-3 bg-danger d-flex flex-column vh-100 pt-5 sticky-top">
|
||||
<div class="text-center mb-4">
|
||||
{% if user.employe.photo %}
|
||||
<img src="{{ user.employe.photo.url }}"
|
||||
class="rounded-circle"
|
||||
width="100"
|
||||
height="100"
|
||||
style="object-fit:cover;">
|
||||
{% else %}
|
||||
<i class="bi bi-person-circle text-white" style="font-size:60px;"></i>
|
||||
{% endif %}
|
||||
<div class="text-white mt-2 fw-bold fs-5">
|
||||
{{ user.username }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{% url 'gestion_employe:mon-profil' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<i class="bi bi-person-circle"></i> Mon profil
|
||||
</a>
|
||||
@@ -26,15 +41,6 @@
|
||||
<a href="{% url 'gestion_salle:reservation-salle' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<i class="bi bi-calendar-check"></i> Réservation
|
||||
</a>
|
||||
{% comment %} <a href="{% url 'rapport-rh' %}" class="text-white fw-bold text-decoration-none mb-2" style="font-size:1.2em">
|
||||
<i class="bi bi-graph-up"></i> Rapports et Statistiques
|
||||
</a> {% endcomment %}
|
||||
{% comment %} <a href="" class="text-white fw-bold text-decoration-none mb-2" style="font-size:1.2em">
|
||||
<i class="bi bi-person-gear"></i> Gestion des Utilisateurs
|
||||
</a> {% endcomment %}
|
||||
{% comment %} <a href="{% url 'gestion_employe:departement' %}" class="text-white fw-bold text-decoration-none mb-2" style="font-size:1.2em">
|
||||
<i class="bi bi-gear"></i> Paramètres
|
||||
</a> {% endcomment %}
|
||||
<a href="{% url 'deconnexion' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||
<i class="bi bi-box-arrow-right"></i> Déconnexion
|
||||
</a>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user