-- 현재는 어디까지 진행 되었나요?
완료: 초기 세팅, 모델링, 데이터베이스 업로더, 회원가입과 로그인(Users app)(회원가입은 프론트와 통신 완료)
진행 중: 상품 전체 페이지와 상세 페이지(Products app) 작성 중(자가 통신 완료)
-- 남은 기간 동안 어디까지 진행될 수 있을까요?
필수 구현 사항: 회원가입과 로그인(Users app), 상품 전체 페이지와 상세 페이지(Products app), 장바구니(Carts app)
products = Product.objects.all()
products_list = []
for product in products:
subcategory = SubCategory.objects.get(product=product)
main_image = MainImage.objects.get(product=product).main_url
detail_images_query = DetailImage.objects.filter(product=product)
storage = ProductStorage.objects.get(product=product).storage
detail_images_list = []
for image in detail_images_query:
detail_images_list.append(image.detail_url)
products_list.append({'name':product.name, 'subcategory':subcategory.name, 'serial_number':product.serial_number, 'storage':storage.storage, 'price':product.price, 'main_image':main_image, 'detail_images':detail_images_list})
products = Product.objects.filter(product_condition).order_by(sort_by.get(order_condition, 'id'))[offset:limit+offset]
products_list = [{
'name' : product.name,
'subcategory' : SubCategory.objects.get(product=product).name,
'serial_number': product.serial_number,
'storage' : product.storage.get().type,
'price' : product.price,
'main_image' : product.mainimage_set.first().main_url,
'detail_images': [detail_image.detail_url for detail_image in DetailImage.objects.filter(product=product)]
} for product in products]