Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/eventyay/base/templatetags/login_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def build_login_url(context):
query_string = request.META.get('QUERY_STRING', '')

# Construct the base login URL
login_url = reverse('control:auth.login')
login_url = reverse('eventyay_common:auth.login')

# Encode the next parameter
if query_string:
Expand Down
26 changes: 13 additions & 13 deletions app/eventyay/eventyay_common/views/account/basic.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
from logging import getLogger
from collections import defaultdict
from logging import getLogger

from django.urls import reverse
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpRequest, HttpResponse
from django.views.generic import UpdateView, TemplateView, ListView
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth import update_session_auth_hash
from django.contrib import messages
from django.utils.translation import gettext_lazy as _
from django.utils.functional import cached_property
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.contenttypes.models import ContentType
from django.http import HttpRequest, HttpResponse
from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
from django.views.generic import ListView, TemplateView, UpdateView
from django_scopes import scopes_disabled

from eventyay.base.models import User, Event, NotificationSetting, LogEntry
from eventyay.base.notifications import get_all_notification_types
from eventyay.base.forms.user import UserSettingsForm
from eventyay.base.models import Event, LogEntry, NotificationSetting, User
from eventyay.base.notifications import get_all_notification_types

from ...navigation import get_account_navigation
from .common import AccountMenuMixIn


logger = getLogger(__name__)


Expand Down Expand Up @@ -203,7 +203,7 @@ def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
dest = (
reverse('eventyay_common:account.notifications')
if request.user.is_authenticated
else reverse('control:auth.login')
else reverse('eventyay_common:auth.login')
)
return redirect(dest)

Expand Down
7 changes: 4 additions & 3 deletions app/eventyay/plugins/socialauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get(self, request: HttpRequest) -> HttpResponse:
try:
oauth2_params = OAuth2Params.model_validate(oauth2_params)
query_string = urlencode(oauth2_params.model_dump())
auth_url = reverse('control:oauth2_provider.authorize')
auth_url = reverse('eventyay_common:oauth2_provider.authorize')
return redirect(f'{auth_url}?{query_string}')
except ValidationError as e:
logger.warning('Ignore invalid OAuth2 parameters: %s.', e)
Expand All @@ -85,7 +85,7 @@ def get(self, request: HttpRequest) -> HttpResponse:
except AttributeError as e:
messages.error(request, _('Error while authorizing: no email address available.'))
logger.error('Error while authorizing: %s', e)
return redirect('control:auth.login')
return redirect('eventyay_common:auth.login')

@staticmethod
def get_or_create_user(request: HttpRequest) -> User:
Expand All @@ -112,7 +112,8 @@ def get_or_create_user(request: HttpRequest) -> User:
},
)

# Update wikimedia_username if the user exists but has no wikimedia_username value set (Basically our existing users), or if the user has updated his username in his wikimedia account
# Update wikimedia_username if the user exists but has no wikimedia_username value set
# (basically our existing users), or if the user has updated his username in his wikimedia account
if not created and (not user.wikimedia_username or user.wikimedia_username != wikimedia_username):
user.wikimedia_username = wikimedia_username
user.save()
Expand Down
24 changes: 12 additions & 12 deletions app/eventyay/presale/templates/pretixpresale/fragment_modals.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="modal-card-content">
<h3></h3>
<p class="text"></p>
<p class="status">{% trans "If the process continues for an extended period, feel free to reach out to us." %}</p>
<p class="status">{% translate 'If the process continues for an extended period, feel free to reach out to us.' %}</p>
</div>
</div>
</div>
Expand All @@ -19,23 +19,23 @@ <h3></h3>
<div class="modal-card-content-join">
<div>
<h3>
{% trans "This is a ticketed event. If you ordered a ticket as a guest user, you don't have an account but can still access the ticket using the secret link in your ticket confirmation email. On the tickets page there is also a link to join online sessions." %}
{% translate "This is a ticketed event. If you ordered a ticket as a guest user, you don't have an account but can still access the ticket using the secret link in your ticket confirmation email. On the tickets page there is also a link to join online sessions." %}
</h3>
<h3>
{% trans "As a ticket holder please also check your email for the unique link to join online sessions." %}
{% translate 'As a ticket holder please also check your email for the unique link to join online sessions.' %}
</h3>
{% if request.event %}
<p class="text">
{% trans "Can't find your ticket?" %}
{% translate "Can't find your ticket?" %}
<a class="btn btn-link" href='{% eventurl request.event "presale:event.resend_link" %}'>
{% trans "Resend the email" %}
{% translate 'Resend the email' %}
</a>
{% trans "to receive it." %}
{% translate 'to receive it.' %}
</p>
<p class="text">
{% trans "Want to order a ticket?" %}
{% translate 'Want to order a ticket?' %}
<a class="btn btn-link" href='{% eventurl request.event "presale:event.index" %}'>
{% trans "Get a ticket here" %}
{% translate 'Get a ticket here' %}
</a>
</p>
{% endif %}
Expand All @@ -44,16 +44,16 @@ <h3>
{% blocktrans with event_name=event_name %}
Want to create a {{ event_name }} account?
{% endblocktrans %}
<a class="btn btn-link" href='{% url "control:auth.register" %}?next={{ request.get_full_path|urlencode }}'>
{% trans "Sign up here" %}
<a class="btn btn-link" href='{% url "eventyay_common:auth.register" %}?next={{ request.get_full_path|urlencode }}'>
{% translate 'Sign up here' %}
</a>
</p>
<p class="text">
{% blocktrans with event_name=event_name %}
Already have a {{ event_name }} account?
{% endblocktrans %}
<a class="btn btn-link" href='{% url "control:auth.login" %}?next={{ request.get_full_path|urlencode }}'>
{% trans "Login here" %}
<a class="btn btn-link" href='{% url "eventyay_common:auth.login" %}?next={{ request.get_full_path|urlencode }}'>
{% translate 'Login here' %}
</a>
</p>
{% endif %}
Expand Down