The code is really clean... Not like your previous projects aren't clean... But, this is good... I'm seeing improvements... This is why I follow you...
Many thanks mr Stein for your effort. in this vid around min 4:10, the list item of all categories, can we do away with the else statement? I know someone is going to say, "if you want to"😅
Thank you for your effort again Stein. I want to ask your opinion about htmx or vue? For a small to medium size ecommerce web site, would you prefer htmx(maybe plus alpine.js) or vue.js(or react)? What are the benefits of using a js framework over a light library like htmx or vice versa?
I think I would suggest Htmx (or at least just use Vue some places in the ecommerce website). The "problem" with building the entire frontend with Vue/React, and then have a separate backend is security. It's not necessaraly a very big problem, but there is a lot more you need to think about when building headless. A combination of Htmx/Alpine is really great imo.
search isn't working. when I am clicking on the search button, even url is not going to shop, instead showing :8000/?query=chair and showing all the products. What am i missing? code is same as yours.
locals() is a Python built-in function that according to the official Python documentation: Updates and returns a dictionary representing the current local symbol table. Free variables are returned by locals() when it is called in function blocks, but not in class blocks.
The code is really clean... Not like your previous projects aren't clean... But, this is good... I'm seeing improvements... This is why I follow you...
Hey! Thank you so much :-D I always try to improve, so it's nice that you've noticed it :-D
Perfect tut. Keep the fire 🔥 because we love your skills
Thank you :-D
Thank you a lot my mentoring hero. Much appreciated Stein.
Thanks 😁😁 glad you liked it 👍🏻
good totorial, its my hope that no 6 will comeout today... Thanks
And it did 😁😁
Many thanks mr Stein for your effort. in this vid around min 4:10, the list item of all categories, can we do away with the else statement?
I know someone is going to say, "if you want to"😅
Maybe, not 100% sure 🤷🏼♂️
You are doing a great job bro... Keep Soaring Higher 🦅🦅🦅
Thanks :-D
Amazing!!!
😁
4:25 i just realise i lost my "All Categories"... back to the 4 part...
p.s. How to search in diffrent languiges?
Hey, for more advanced search you need to install and set up something like hey, elastic, or similar :-)
This is a very good one. Keep up!
Could you please make a blog project. Thanks!
Thanks 😁 I already have, just search on my channel 😉
@@CodeWithStein I had become stuck with the blog project, that's why I asked. But I figured it out. Thanks!!!
Thanks for your efforts 🙏🙏🙏🙏🙏
You're welcome! Thanks for the comment :-D
Thank you for your effort again Stein. I want to ask your opinion about htmx or vue? For a small to medium size ecommerce web site, would you prefer htmx(maybe plus alpine.js) or vue.js(or react)? What are the benefits of using a js framework over a light library like htmx or vice versa?
I think I would suggest Htmx (or at least just use Vue some places in the ecommerce website). The "problem" with building the entire frontend with Vue/React, and then have a separate backend is security. It's not necessaraly a very big problem, but there is a lot more you need to think about when building headless. A combination of Htmx/Alpine is really great imo.
@@CodeWithStein that is a good point. Thanks.
nice video can you show how to have subesctrption based vendor in the next video
No, that has nothing to do with this series ;-)
search isn't working. when I am clicking on the search button, even url is not going to shop, instead showing
:8000/?query=chair
and showing all the products. What am i missing? code is same as yours.
Hey, you probably have a typo somewhere in your code :-) Go over the video again and make sure there isn't any indentation error or similar ;-)
@@CodeWithStein got it. thanks.
Plz anyone can tell me that my search functionality is not working. Code is also same.In shop.html
In views
from django.db.models import Q
def shop(request):
categories = Category.objects.all()
products = Product.objects.all()
# Functionality For active category
active_category = request.GET.get('category', '')
# Functionality For filter category
if active_category:
products = products.filter(category__slug=active_category)
# Functionality For search category
query = request.GET.get('query', '')
if query:
products = products.filter(Q(name__icontains=query) | Q(description__icontains=query))
return render(request,'shop.html',locals())
Hey, what is "locals()"?
return render(request,'shop.html',locals())
@@CodeWithStein Thanks for reply sir
locals() is a Python built-in function that according to the official Python documentation: Updates and returns a dictionary representing the current local symbol table. Free variables are returned by locals() when it is called in function blocks, but not in class blocks.
But sir, like you, I have used the code , using context but search functionality is not working.
Ah, I haven’t seen it before actually 😝 but i do not know why its not working. Maybe you’re running a different Python version?
👍
:-D