spacepaste

  1.  
  2. # -*- coding: utf-8 -*-
  3. from __future__ import unicode_literals
  4. from django.shortcuts import render
  5. # Create your views here.
  6. from django.http import HttpResponse
  7. #def index(requests):
  8. # return HttpResponse("<h2>HEY!</h2>")
  9. def index(requests):
  10. return render(requests, 'webapp/header.html')
  11. def header(requests):
  12. return render(requests, 'webapp/home.html')
  13. import csv
  14. from django.shortcuts import render
  15. def display_csv(request):
  16. with open('personal/E0.csv') as fin:
  17. data = list(csv.reader(fin))
  18. return render(request, 'webapp/Home.html', {'records': data})
  19.