Skip to content
Snippets Groups Projects
Verified Commit 38bab320 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

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

parents 348fc74a 4766890d
No related branches found
No related tags found
1 merge request!1045Introduce Vuetify and GraphQL
Pipeline #79541 failed
......@@ -3,7 +3,7 @@ from graphene_django import DjangoObjectType
from graphene_django.forms.mutation import DjangoModelFormMutation
from .forms import PersonForm
from .models import Notification, Person
from .models import Group, Notification, Person
from .util.core_helpers import get_app_module, get_app_packages, has_person
......@@ -17,6 +17,11 @@ class PersonType(DjangoObjectType):
model = Person
class GroupType(DjangoObjectType):
class Meta:
model = Group
class PersonMutation(DjangoModelFormMutation):
person = graphene.Field(PersonType)
......
......@@ -2,6 +2,7 @@ import random
import string
from django import template
from django.shortcuts import reverse
from bs4 import BeautifulSoup
......@@ -40,3 +41,9 @@ def generate_random_id(prefix: str, length: int = 10) -> str:
return prefix + "".join(
random.choice(string.ascii_lowercase) for i in range(length) # noqa: S311
)
@register.simple_tag(takes_context=True)
def absolute_url(context, view_name, *args, **kwargs):
request = context['request']
return request.build_absolute_uri(reverse(view_name, args=args, kwargs=kwargs))
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