Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
30be2755
Verified
Commit
30be2755
authored
Sep 09, 2018
by
Sébastiaan Versteeg
Browse files
Complete docs for payments package, closes
#580
parent
4ae90c69
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/payments/models.py
View file @
30be2755
...
...
@@ -9,6 +9,9 @@ from django.utils.translation import ugettext_lazy as _
class
Payment
(
models
.
Model
):
"""
Describes a payment
"""
id
=
models
.
UUIDField
(
primary_key
=
True
,
default
=
uuid
.
uuid4
,
editable
=
False
)
...
...
website/payments/widgets.py
View file @
30be2755
"""Widgets provided by the payments package"""
from
django.forms
import
Widget
from
payments.models
import
Payment
class
PaymentWidget
(
Widget
):
"""
Custom widget for the Payment object, used in registrations
"""
template_name
=
'payments/widget.html'
def
value_from_datadict
(
self
,
data
,
files
,
name
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment