2018-01-14 13:44:11 +01:00
|
|
|
from django import forms
|
|
|
|
from currencies.models import ExchangeRate_name
|
|
|
|
|
|
|
|
|
|
|
|
class CurrencyForm(forms.Form):
|
2018-01-16 00:54:35 +01:00
|
|
|
# https://bradmontgomery.net/blog/2008/11/24/a-simple-django-example-with-ajax/
|
|
|
|
currencies = forms.ModelChoiceField(
|
|
|
|
queryset=ExchangeRate_name.objects.all())
|
|
|
|
|
|
|
|
CURRENCY_CHOICES = [(t.name, t.name) for t in
|
|
|
|
ExchangeRate_name.objects.all()]
|