diff --git a/devart/settings.py b/devart/settings.py index d9e0c56..1936a8a 100644 --- a/devart/settings.py +++ b/devart/settings.py @@ -90,14 +90,25 @@ WSGI_APPLICATION = 'devart.wsgi.application' DATABASES = { 'default': { - 'ENGINE': os.getenv('DATABASE_ENGINE'), - 'HOST': os.getenv('DATABASE_HOST'), - 'NAME': os.getenv('DATABASE_NAME'), - 'USER': os.getenv('DATABASE_USER'), - 'PASSWORD': os.getenv('DATABASE_PASSWORD'), + 'ENGINE': os.environ.get('DATABASE_ENGINE'), + 'USER': os.environ.get('DATABASE_USER'), + 'PASSWORD': os.environ.get('DATABASE_PASSWORD'), + 'HOST': os.environ.get('DATABASE_HOST'), + 'PORT': os.environ.get('DATABASE_PORT'), } } +# La partie intelligente : +db_name = os.environ.get('DATABASE_NAME') +db_engine = DATABASES['default']['ENGINE'] + +if 'sqlite' in db_engine: + # Si c'est SQLite, on ajoute le chemin complet + DATABASES['default']['NAME'] = BASE_DIR / db_name +else: + # Si c'est MySQL (ou Postgres), on met juste le nom de la base + DATABASES['default']['NAME'] = db_name + # Password validation # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators diff --git a/static/css/app.css b/static/css/app.css index 29ea0cc..dc6b046 100644 --- a/static/css/app.css +++ b/static/css/app.css @@ -207,6 +207,21 @@ font-size: 12px; } +.content-lesson { + border: 1px solid var(--border); + border-radius: var(--r-2); + background: var(--surface-raised); + color: var(--text); + padding: 20px; +} + +.content-lesson .lessonTitle { + font-size: 1.4rem; + padding-bottom: 10px; + font-weight: 600; + color: var(--primary); +} + /* Petit badge "PREMIUM" affiché dans la TOC des cours */ .premium-tag { display: inline-flex; diff --git a/templates/courses/partials/_course_toc.html b/templates/courses/partials/_course_toc.html index ff400b2..b233a88 100644 --- a/templates/courses/partials/_course_toc.html +++ b/templates/courses/partials/_course_toc.html @@ -66,7 +66,10 @@ {% endif %} {% endif %} {% endif %} - {{ lesson.content|safe }} +
+
Ce que l'on voit durant ce cours :
+ {{ lesson.content|safe }} +

Commentaires

{% if comments %} diff --git a/templates/home.html b/templates/home.html index 090f14d..5b8d0a6 100644 --- a/templates/home.html +++ b/templates/home.html @@ -124,13 +124,9 @@ {% endfor %}
- + -{% block course %} - {% include "courses/partials/list.html" %} -{% endblock %} -