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

@ -84,7 +84,7 @@ def can_edit_prop(obj: Any, user: User) -> bool:
return False
def can_edit(obj: Any, user: User):
def can_edit(obj: Any, user: User) -> bool:
"""Can the user edit the object.
Args:
@ -105,7 +105,7 @@ def can_edit(obj: Any, user: User):
return can_edit_prop(obj, user)
def can_view(obj: Any, user: User):
def can_view(obj: Any, user: User) -> bool:
"""Can the user see the object.
Args:

View File

@ -73,8 +73,8 @@ class MarkdownInput(Textarea):
context = super().get_context(name, value, attrs)
context["statics"] = {
"js": static("vendored/easymde/easymde.min.js"),
"css": static("vendored/easymde/easymde.min.css"),
"js": static("webpack/easymde-index.js"),
"css": static("webpack/easymde-index.css"),
}
context["translations"] = {
"heading_smaller": _("Heading"),