You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
573 B
Python
18 lines
573 B
Python
5 years ago
|
from django import forms
|
||
|
from items.models import Item, address_is_valid_monero
|
||
|
|
||
|
|
||
|
class CreateItemForm(forms.ModelForm):
|
||
|
payout_address = forms.CharField(validators=[address_is_valid_monero])
|
||
|
|
||
|
class Meta:
|
||
|
model = Item
|
||
|
fields = ['name', 'description', 'ask_price_xmr', 'payout_address']
|
||
|
labels = {
|
||
|
'ask_price_xmr': 'Asking Price (XMR)',
|
||
|
'payout_address': 'Payout Wallet Address'
|
||
|
}
|
||
|
help_texts = {
|
||
|
'payout_address': 'Monero address where funds will be sent after sale is confirmed'
|
||
|
}
|