Skip to content

Commit

Permalink
fix multidomain setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeriox committed Apr 3, 2024
1 parent 83c591b commit 3d576fa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pretix_wallet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.1"
__version__ = "1.0.2"
3 changes: 2 additions & 1 deletion pretix_wallet/templates/pretix_wallet/transaction_list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "pretix_wallet/wallet_base.html" %}
{% load wallet_tags %}
{% load i18n %}
{% load eventurl %}

Expand Down Expand Up @@ -36,7 +37,7 @@
</div>
{% if transponder_paired %}
<div class="column is-narrow">
<form method="post" action="{% url "plugins:pretix_wallet:unpair" request.organizer.slug %}">
<form method="post" action="{% organizer_url request.organizer "plugins:pretix_wallet:unpair" %}">
{% csrf_token %}
<button type="submit" class="button is-outlined is-danger has-icons-left is-fullwidth">
<span class="icon"><i class="fa fa-unlink"></i></span>
Expand Down
3 changes: 2 additions & 1 deletion pretix_wallet/templates/pretix_wallet/wallet_base.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% load wallet_tags %}
{% load static %}

<!DOCTYPE html>
Expand All @@ -24,7 +25,7 @@ <h1 class="title">
</div>
<div class="column is-narrow">
<p class="content">
<span>Signed in as</span> <b>{{ request.customer.name_cached }}</b> · <a href="{% url 'presale:organizer.customer.logout' request.customer.organizer.slug %}?next={% url "plugins:pretix_wallet:transactions" request.customer.organizer.slug %}">Log out</a>
<span>Signed in as</span> <b>{{ request.customer.name_cached }}</b> · <a href="{% organizer_url request.customer.organizer 'presale:organizer.customer.logout' %}?next={% organizer_url request.customer.organizer "plugins:pretix_wallet:transactions" %}">Log out</a>
</p>
</div>
</div>
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions pretix_wallet/templatetags/wallet_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django import template
from pretix.multidomain.urlreverse import build_absolute_uri

register = template.Library()

@register.simple_tag()
def organizer_url(organizer, urlname):
return build_absolute_uri(organizer, urlname)

0 comments on commit 3d576fa

Please sign in to comment.