Commit 57662278 authored by Elaiza Bolislis's avatar Elaiza Bolislis

Modified views.py to improve code formatting

parent ee93308a
...@@ -4,9 +4,8 @@ from .models import Department, WidgetUser ...@@ -4,9 +4,8 @@ from .models import Department, WidgetUser
def index(request): def index(request):
return_string = '<p>Welcome to Widget!</p>WIDGET USERS:<ul style="list-style: none; padding: 0; margin: 0;">' return_string = '<p>Welcome to Widget!</p> WIDGET USERS:<br>'
for user in WidgetUser.objects.all(): for user in WidgetUser.objects.all():
return_string += '<li>{}: {}</li>'.format(user, user.department) return_string += '{}: {}<br>'.format(user, user.department)
return_string += '</ul>'
html_string = '<html><body>{}</body></html>'.format(return_string) html_string = '<html><body>{}</body></html>'.format(return_string)
return HttpResponse(html_string) return HttpResponse(html_string)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment