def get(self, request, *args, **kwargs): response = JsonResponse({ "tag_types": { tag_type: config.get("value") for tag_type, config in TagTypeSettings.all().items() }, "triggers": [trigger.as_dict() for trigger in Trigger.objects.active()], }) return response
def __init__(self, request, consent=None): self._request = request self._consent = consent self._context = Tag.create_context(request) self._cookies = request.COOKIES self._config = TagTypeSettings.all() self._tags = [] self.cookies = {} self.define_strategy()
def __init__(self, request, payload=None): self._request = request self._context = Tag.create_context(request) self._payload = payload or {} self._config = TagTypeSettings.all() self._tags = [] from wagtail_tag_manager.utils import get_consent self.consent_state = get_consent(request) self.consent = {} if request: self.define_strategy()
def get(self, request, *args, **kwargs): return JsonResponse(TagTypeSettings.all())