Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.http import HttpResponse
- from . import models as customer_models
- def index(request):
- all_customers = customer_models.Customers.objects.all()
- html = ''
- for customer in all_customers:
- url = '/customers/' + str(customer.id) + '/'
- html += '<a href = "' + url + '">' + customer_models.Customers.customer_name + ' </a><br>'
- return HttpResponse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement