Commit 871b531c authored by Joaquin Hermosisima's avatar Joaquin Hermosisima

created views.py and edited urls.py

parent a1c33576
...@@ -15,8 +15,11 @@ Including another URLconf ...@@ -15,8 +15,11 @@ 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 path, include
from . import views
urlpatterns = [ urlpatterns = [
path('', include('bookshelf.urls')),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('home/', views.HomeView)
] ]
from django.shortcuts import render
from django.utils.safestring import mark_safe
from bookshelf import urls
def HomeView(request):
urls = ['books','authors']
context = {
'nickname': "Jak",
'urls': urls
}
return render(request, 'home.html', context)
\ No newline at end of file
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