getting rid of clutter.
This commit is contained in:
parent
dba76057b3
commit
2f940e57c7
|
@ -1,11 +0,0 @@
|
|||
from django import forms
|
||||
from currencies.models import ExchangeRate_name
|
||||
|
||||
|
||||
class CurrencyForm(forms.Form):
|
||||
# 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()]
|
|
@ -25,7 +25,3 @@ class ExchangeRate(models.Model):
|
|||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
class Meta:
|
||||
# https://simpleisbetterthancomplex.com/tips/2016/10/06/django-tip-17-earliest-and-latest.html
|
||||
get_latest_by = 'name__name'
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
from django.shortcuts import render
|
||||
from datetime import datetime
|
||||
from django.views.generic.edit import UpdateView
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from currencies.models import (ExchangeRate,
|
||||
ExchangeRate_date,
|
||||
ExchangeRate_name)
|
||||
from currencies import exchange_rates
|
||||
from currencies.forms import CurrencyForm
|
||||
from django.http import JsonResponse
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue