mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-10 12:50:29 +00:00
TimetableTabMixin
This commit is contained in:
1 parent
ead76e49b9
commit
33289c1c04
2 files changed
+47
-4
No files matched your search
+16
-2
@@ -1,6 +1,14 @@
|
||||
import copy
|
||||
import inspect
|
||||
from typing import TYPE_CHECKING, Any, ClassVar, LiteralString, Protocol, Unpack
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
ClassVar,
|
||||
LiteralString,
|
||||
Protocol,
|
||||
TypedDict,
|
||||
Unpack,
|
||||
)
|
||||
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.template.loader import render_to_string
|
||||
@@ -12,11 +20,17 @@ if TYPE_CHECKING:
|
||||
from django.utils.safestring import SafeString
|
||||
|
||||
|
||||
class TabItem(TypedDict):
|
||||
url: str
|
||||
slug: str
|
||||
name: str
|
||||
|
||||
|
||||
class TabedViewMixin(View):
|
||||
"""Basic functions for displaying tabs in the template."""
|
||||
|
||||
current_tab: ClassVar[str | None] = None
|
||||
list_of_tabs: ClassVar[list | None] = None
|
||||
list_of_tabs: ClassVar[list[TabItem] | None] = None
|
||||
tabs_title: ClassVar[str | None] = None
|
||||
|
||||
def get_tabs_title(self):
|
||||
|
||||
Reference in new issue
Block a user