Skip to content
Snippets Groups Projects
Commit c5462a78 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Merge branch 'feature/vuejs' of edugit.org:AlekSIS/official/AlekSIS-Core into feature/vuejs

parents 6577a4af 748082ab
No related branches found
No related tags found
1 merge request!1045Introduce Vuetify and GraphQL
Pipeline #79663 failed
......@@ -16,6 +16,11 @@ class PersonType(DjangoObjectType):
class Meta:
model = Person
full_name = graphene.Field(graphene.String)
def resolve_full_name(root: Person, info, **kwargs):
return root.full_name
class GroupType(DjangoObjectType):
class Meta:
......
......@@ -73,17 +73,17 @@ def get_app_packages(only_official: bool = False) -> Sequence[str]:
def get_app_module(app: str, name: str) -> Optional[ModuleType]:
"""Get the settings module of an app."""
"""Get a named module of an app."""
pkg = ".".join(app.split(".")[:-2])
mod_settings = None
while "." in pkg:
try:
return import_module(f"{app}.{name}")
return import_module(f"{pkg}.{name}")
except ImportError:
# Import errors are non-fatal.
pkg = ".".join(pkg.split(".")[:-1])
# The app does not have settings
# The app does not have this module
return None
......
......@@ -77,6 +77,7 @@ const app = new Vue({
django: window.django,
// FIXME: maybe just use window.django in every component or find a suitable way to access this property everywhere
showCacheAlert: false,
languageCode: JSON.parse(document.getElementById("current-language").textContent),
}),
components: {
"cache-notification": CacheNotification,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment