Misc and admin - How to build an E-commerce website using Django 3 and Vue.js - Part 10

preview_player
Показать описание

Inside the django admin interface, I will now make it possible to see the shipment status of a product and also change this using an action.

Fix upload problems 0:29
Image urls 1:40
Category product images 2:30
Fix cart problem 3:06
Show message 3:56
Admin interface customizations 6:38

My Patreon page:

Todo list for part 10:
-Fix the image urls (category_detail, frontpage)
-Product pictures in categories
-Fix the get_total_cost (iterate over self)
-Show message when product is added to cart
-Changes to the Django admin interface

Git repository:
Рекомендации по теме
Комментарии
Автор

Great video again. Liked it without even watching first because I know it is going to be great :)

sanesanyo
Автор

Hi Mr Stein,

Thanks for your great tutorial video. I had complete this part 10.

Thanks for always give feedback and reply my email to resolve some issues i faced.

Tq 3K times.

iterdesly
Автор

Stein, i noticed that the navbar categories menu is not working on every other device...like is not responsive... it disappers when the screen shrunk

dynarielinnovations
Автор

Well done Stein.. it was a great class today. Almost all the bugs are fixed. I have a suggestion.. can we have the thumbnail show in the cart to help customers to double check their orders?

dynarielinnovations
Автор

Hi Stein, im checking this chapter and in the first minutes i got the following error after changing the model and the frontpage files to manage the new url settings:
ValueError at /
The 'thumbnail' attribute has no file associated with it.

Any insight about this error? what am i doing wrong? im kinda stuck in this part

leonardolama
Автор

hello Stein, i want to say thank you for this amazing playlist that i learned a lot from ! i have a question ! if i ordered more than one product and i complete the order i can't see all the products in the TabluarInline ! i see just the first one ! can you please help resolving this !

devislifeouhra
Автор

Hi, I am trying to understand this part of the code where we are changing the admin dashboard:
def order_name(obj):
return f"{obj.name}"

order_name.short_description = "Name"

so we have created a function here in order to access the name of the person who ordered. But why we had to add a short_description property? and wouldn't it make sense to create a new object that inherits from Order and then add that helper function?

Moreover, it would be great if you could explain this part of the code:
class OrderAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'created_at']
list_filter = ['created_at', 'status']
admin.site.register(Order, OrderAdmin)

I think I get the gist but would be great to understand the technicalities. I assume that when you register Order along with OrderAdmin. It seeks for all the properties that Order has with the names listed in list_display and list_filter, right??

Thanks a lot in advance.

sanesanyo
Автор

Hi again, I do not understand the function below properly.
def admin_order_shipped(modeladmin, request, queryset):
for order in queryset:
order.shipped_date = datetime.datetime.now()
order.status = Order.SHIPPED
order.save()
return

We pass 3 variables out of which we only using one and on top we do not return anything (not sure if we need a return statement). I tried with one variable only & no return statement and it seems to work the same. Just want to confirm if I am not understanding something.

sanesanyo
Автор

Hi, can we also add product search in one of the future videos? and if possible, PayPal as a payment method. I know adding it should be quite similar to what we did with Stripe but it is always nice to do it in a code along. Thanks a ton once again.

sanesanyo
Автор

How do you customize the Django Admin Completely? Like implement there the whole Vuetify from Vue.

jmmacatangay_grizzlybear
welcome to shbcf.ru