Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. from django.http import HttpResponse
  2. from . import models as customer_models
  3.  
  4. def index(request):
  5. all_customers = customer_models.Customers.objects.all()
  6. html = ''
  7. for customer in all_customers:
  8. url = '/customers/' + str(customer.id) + '/'
  9. html += '<a href = "' + url + '">' + customer_models.Customers.customer_name + ' </a><br>'
  10. return HttpResponse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement