Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pretix public registrations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIF
Pretix public registrations
Commits
0fa7d336
Commit
0fa7d336
authored
5 years ago
by
Felix Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
Change question type, better question name
parent
7a00f9cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pretix_public_registrations/signals.py
+2
-3
2 additions, 3 deletions
pretix_public_registrations/signals.py
with
2 additions
and
3 deletions
pretix_public_registrations/signals.py
+
2
−
3
View file @
0fa7d336
...
...
@@ -35,11 +35,10 @@ def add_public_registrations_html_head(sender, request=None, **kwargs):
def
add_public_registration_question
(
sender
,
position
,
**
kwargs
):
# TODO: This should also filter by items with an attendee
if
str
(
position
.
item
.
pk
)
in
sender
.
settings
.
get
(
'
public_registrations_items
'
):
return
{
'
public_registration
'
:
forms
.
Char
Field
(
return
{
'
public_
registrations_public_
registration
'
:
forms
.
Boolean
Field
(
label
=
_
(
'
Public registration
'
),
required
=
False
,
help_text
=
sender
.
settings
.
get
(
'
public_registrations_field_help_text
'
,
as_type
=
LazyI18nString
),
widget
=
forms
.
CheckboxInput
(),
)}
else
:
return
{}
...
...
@@ -61,7 +60,7 @@ def add_public_registrations_table(sender, **kwargs):
order_positions
=
OrderPosition
.
objects
.
filter
(
order__event
=
sender
,
item__pk__in
=
sender
.
settings
.
get
(
'
public_registrations_items
'
))
public_order_positions
=
[
op
for
op
in
order_positions
if
op
.
meta_info_data
.
get
(
'
question_form_data
'
,
{}).
get
(
'
public_registration
'
)
==
"
True
"
if
op
.
meta_info_data
.
get
(
'
question_form_data
'
,
{}).
get
(
'
public_registration
s_public_registration
'
)
]
answers
=
QuestionAnswer
.
objects
.
filter
(
orderposition__in
=
public_order_positions
,
question__in
=
public_questions
)
public_answers
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment