Completely integrate wepack in django

* Migrate alpine
* Migrate jquery and jquery-ui
* Migrate shorten
* Add babel for javascript
* Introduce staticfiles django app
* Only bundle -index.js files in static/webpack
* Unify scss and webpack generated files
* Convert scss calls to static
* Add --clear-generated option to collectstatic
* Fix docs warnings
This commit is contained in:
2024-09-17 23:42:05 +02:00
committed by Bartuccio Antoine
parent 71c96fdf62
commit 655d72a2b1
86 changed files with 6170 additions and 1268 deletions

View File

@ -66,7 +66,7 @@ class PictureQuerySet(models.QuerySet):
def viewable_by(self, user: User) -> Self:
"""Filter the pictures that this user can view.
Warnings:
Warning:
Calling this queryset method may add several additional requests.
"""
if user.is_root or user.is_in_group(pk=settings.SITH_GROUP_SAS_ADMIN_ID):
@ -178,7 +178,7 @@ class AlbumQuerySet(models.QuerySet):
def viewable_by(self, user: User) -> Self:
"""Filter the albums that this user can view.
Warnings:
Warning:
Calling this queryset method may add several additional requests.
"""
if user.is_root or user.is_in_group(pk=settings.SITH_GROUP_SAS_ADMIN_ID):

View File

@ -2,7 +2,7 @@
{% from 'core/macros.jinja' import paginate_alpine %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('sas/css/album.scss') }}">
<link rel="stylesheet" href="{{ static('sas/css/album.scss') }}">
{%- endblock -%}
{% block title %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('sas/css/album.scss') }}">
<link rel="stylesheet" href="{{ static('sas/css/album.scss') }}">
{%- endblock -%}
{% block title %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('sas/css/picture.scss') }}">
<link rel="stylesheet" href="{{ static('sas/css/picture.scss') }}">
{%- endblock -%}
{%- block additional_js -%}