You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Dennis,
Could you explain me
the error that I am getting This is content of urls.py file:
__from django.urls import path
from . import views
urlpatterns = [
path('',views.home, name = 'home'),
path('room/str:pk/',views.room, name = 'room')
]__ This is content of views.py file:
__
from django.shortcuts import render
Hello Dennis,
Could you explain me
the error that I am getting
This is content of urls.py file:
__from django.urls import path
from . import views
urlpatterns = [
path('',views.home, name = 'home'),
path('room/str:pk/',views.room, name = 'room')
]__
This is content of views.py file:
__
from django.shortcuts import render
Create your views here.
rooms = [
{'id':1, 'name':'Lets Learn python!'},
{'id':2, 'name':'Design with me'},
{'id':3, 'name':'Fronted developers'},
]
def home(request):
context = {'rooms':rooms}
return render(request, 'base/home.html',context)
def room(request, pk):
return render(request,'base/room.html')
__
The text was updated successfully, but these errors were encountered: