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

@ -134,13 +134,15 @@ def merge_users(u1: User, u2: User) -> User:
return u1
def delete_all_forum_user_messages(user, moderator, *, verbose=False):
def delete_all_forum_user_messages(
user: User, moderator: User, *, verbose: bool = False
):
"""Soft delete all messages of a user.
Args:
user: the user to delete messages from
moderator: the one marked as the moderator.
verbose: it True, print the deleted messages
user: core.models.User the user to delete messages from
moderator: core.models.User the one marked as the moderator.
verbose: bool if True, print the deleted messages
"""
for message in user.forum_messages.all():
if message.is_deleted():