Skip to content

Commit

Permalink
add urls for meetings app
Browse files Browse the repository at this point in the history
  • Loading branch information
pylbatu committed Apr 29, 2020
1 parent 14f5ecf commit b9dae50
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 2 additions & 5 deletions meeting_planner/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
from website.views import welcome, date, about
from meetings.views import detail, rooms, roomDetail

urlpatterns = [
path('admin/', admin.site.urls),
path('', welcome, name='home'),
path('date', date),
path('about', about),
path('meeting/<int:id>', detail, name='detail'),
path('rooms', rooms, name='rooms'),
path('room/<int:id>', roomDetail, name='room')
path('meetings/', include('meetings.urls'))
]
9 changes: 9 additions & 0 deletions meetings/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.urls import path

from . import views

urlpatterns = [
path('<int:id>', views.detail, name="detail"),
path('rooms', views.rooms, name='rooms'),
path('room/<int:id>', views.room, name='room')
]
2 changes: 1 addition & 1 deletion meetings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def rooms(request):
}
)

def roomDetail(request, id):
def room(request, id):
room = get_object_or_404(Room, pk=id)
return render(request, 'rooms/detail.html', {
'room': room
Expand Down

0 comments on commit b9dae50

Please sign in to comment.