mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Add event meta filter to organizer page
This commit is contained in:
@@ -667,7 +667,7 @@ class EventMetaProperty(LoggedModel):
|
||||
name = models.CharField(
|
||||
max_length=50, db_index=True,
|
||||
help_text=_(
|
||||
"Can not contain spaces or special characters execpt underscores"
|
||||
"Can not contain spaces or special characters except underscores"
|
||||
),
|
||||
validators=[
|
||||
RegexValidator(
|
||||
|
||||
@@ -4,7 +4,17 @@ register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def url_replace(request, field, value):
|
||||
def url_replace(request, *pairs):
|
||||
dict_ = request.GET.copy()
|
||||
dict_[field] = value
|
||||
return dict_.urlencode()
|
||||
key = None
|
||||
for p in pairs:
|
||||
if key is None:
|
||||
key = p
|
||||
else:
|
||||
if p == "":
|
||||
if key in dict_:
|
||||
del dict_[key]
|
||||
else:
|
||||
dict_[key] = p
|
||||
key = None
|
||||
return dict_.urlencode(safe='[]')
|
||||
|
||||
Reference in New Issue
Block a user