Beispiel #1
0
def index(request):
  portfolios = get_portfolios(request)
  currencies = Currency.all()

  if request.method == 'POST':
    form = PositionForm(request.POST)
    if form.is_valid():
      form.save()
      return HttpResponseRedirect('/')
  else:
    form = PositionForm()

  return shortcuts.render_to_response('index.html', locals())
Beispiel #2
0
def currencies(request):  
  Currency.delete_all()
  Currency.download_all()
  
  return redirect(request)