Commit 76cad784 authored by Brendan Fausto's avatar Brendan Fausto

Created dashboard/views, added dashboard to widget_group3 and populated the database

parent c9f8e0b0
...@@ -6,4 +6,14 @@ from .models import WidgetUser ...@@ -6,4 +6,14 @@ from .models import WidgetUser
# Create your views here. # Create your views here.
def index(request): def index(request):
return_string = '<body>Welcome to Widget!<br><br>WIDGET USERS:<br><ul>'
for user in WidgetUser.objects.all():
user_string = '<li>{}</li>'.format(user.__str__())
return_string += user_string
return_string += '</ul></body>'
html_string = '<html>{}</html>'.format(return_string)
return HttpResponse(html_string)
No preview for this file type
...@@ -14,8 +14,9 @@ Including another URLconf ...@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import include, path
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('dashboard/', include('dashboard.urls', namespace="dashboard")),
] ]
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