분류 전체보기
-
django reservation-detail by CBV with DetailViewProject using python/Cloning Airbnb 2021. 3. 17. 06:22
url 설정 config/urls.py urlpatterns = [ path("rooms/", include("rooms.urls", namespace="room")) ] reservations/urls.py from django.urls import path from . import views app_name = "reservations" urlpatterns = [ path( "/", views.ReservationDetailView.as_view(), name="detail", )] CBV(Class Based View) reservations/views.py CBV는 django에서 정의한 여러가지 View들을 이용한다. 그 중 ListView를 이용해서 reservation-list page를 ..
-
django reservation-detail by FBVProject using python/Cloning Airbnb 2021. 3. 17. 05:54
url 설정 config/urls.py urlpatterns = [ path("reservations/", include("reservations.urls", namespace="reservations")) ] reservations/urls.py from django.urls import path from reservations import views app_name = "reservations" urlpatterns = [ path( "/", views.reservationDetail, name="detail", ), ] FBV(Function Based View) reservations/views.py # reservations/views.py from django.shortcuts import r..
-
django reservation-list by CBV with ListViewProject using python/Cloning Airbnb 2021. 3. 17. 05:36
url 설정 config/urls.py urlpatterns = [ path("rooms/", include("rooms.urls", namespace="room")) ] reservations/urls.py from django.urls import path from . import views app_name = "reservations" urlpatterns = [ path( "user//", views.ReservationListView.as_view(), name="list", )] CBV(Class Based View) reservations/views.py CBV는 django에서 정의한 여러가지 View들을 이용한다. 그 중 ListView를 이용해서 reservation-list page를..
-
django reservation-list by FBVProject using python/Cloning Airbnb 2021. 3. 15. 11:24
url 설정 config/urls.py urlpatterns = [ path("reservations/", include("reservations.urls", namespace="reservations")) ] reservations/urls.py from django.urls import path from reservations import views app_name = "reservations" urlpatterns = [ path( "user//", views.reservationList, name="list", ), ] FBV(Function Based View) reservations/views.py # reservations/views.py from django.shortcuts import ..
-
django 'reserve a room' by FBVProject using python/Cloning Airbnb 2021. 3. 13. 11:16
url 설정 config/urls.py urlpatterns = [ path("reservations/", include("reservations.urls", namespace="reservations")) ] rooms/urls.py from django.urls import path from reservations import views app_name = "reservations" urlpatterns = [ path( "/create/--/", views.createReservation, name="create", ), ] FBV(Function Based View) rooms/views.py # reservations/views.py import datetime from django.shortc..
-
django delete-photo by FBVProject using python/Cloning Airbnb 2021. 3. 12. 11:47
url 설정 config/urls.py urlpatterns = [ path("rooms/", include("rooms.urls", namespace="room")) ] rooms/urls.py from django.urls import path from . import views app_name = "rooms" urlpatterns = [path( "/photos//delete/", views.deletePhoto, name="delete-photo", )] FBV(Function Based View) rooms/views.py # rooms/views.py from django.shortcuts import render, redirect, reverse from django.contrib impo..
-
django edit-photo by CBVProject using python/Cloning Airbnb 2021. 3. 12. 11:34
url 설정 config/urls.py urlpatterns = [ path("rooms/", include("rooms.urls", namespace="room")) ] rooms/urls.py from django.urls import path from . import views app_name = "rooms" urlpatterns = [ path( "/photos//edit/", views.EditPhotoView.as_view(), name="edit-photo", )] CBV(Class Based View) rooms/views.py CBV는 django에서 정의한 여러가지 View들을 이용한다. 그 중 UpdateView를 이용해서 edit-photo page를 작성한다. # rooms/vi..
-
django edit photo by FBVProject using python/Cloning Airbnb 2021. 3. 12. 10:31
url 설정 config/urls.py urlpatterns = [ path("rooms/", include("rooms.urls", namespace="room")) ] rooms/urls.py from django.urls import path from . import views app_name = "rooms" urlpatterns = [path( "/photos//edit/", views.editPhoto, name="edit-photo", )] FBV(Function Based View) rooms/views.py # rooms/views.py from django.shortcuts import render, redirect, reverse from django.contrib import mes..