mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
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:
@ -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:
|
||||
|
@ -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"),
|
||||
|
Reference in New Issue
Block a user