make a video on Django rest framework brother .Much appreciated
@11rshan7 ай бұрын
Beautifully explained
@sangitniroula7 ай бұрын
Thank you.
@JaeBlaze077 ай бұрын
You explained this so well, very helpful! 🙌
@joey4uandme8 ай бұрын
Thanks Dipak for this project. I have learnt a lot. I have been following closely. I observed that when a customer adds products to cart without checkout, the cart does not persist in his view but is still in the database when he logs out.
@sangitniroula8 ай бұрын
Thank you. The cart should be shown in the user view even if you are not logged in as a customer since it persists in the database since the cart ID is stored with the current session. If the session ID is expired, only then the cart should be missed.
@joey4uandme8 ай бұрын
Thanks for the feedback. I appreciate it deeply
@saddamhossain51658 ай бұрын
when i try to add then its saying ... ValueError: FileInput doesn't support uploading multiple files. how i write the code for solution
@mohit82999 ай бұрын
superr videoo
@loony42809 ай бұрын
Sir more videos please your content was top notch why you stopped uploading?? look at other and look at you, Actually you can beat youtube community
@sangitniroula9 ай бұрын
I will start once I got time to make them. Thanks for the comment.
@gunjanp857610 ай бұрын
Sir i want to show table on my home page and in tabel there are columns like person name, addresss, city, intrest,etc. So how can i fetch all data in view and pass through context to template. Please help. In your tutorial you fetch data on the basis of id , i want that all the data without id.
@sangitniroula10 ай бұрын
I recommend watching my tutorial on making ecommerce using django. Here is the link to this kzbin.info/www/bejne/f6uTaqOVd515f5I&ab_channel=DipakNiroula. You can find lots of ways of fetching data from database and presenting them in the UI there.
@loony428011 ай бұрын
Thank you
@deepenarts Жыл бұрын
Thank you sir..❤
@RudrappaNaidu Жыл бұрын
old esewa payment gateway is deprecated ,how to use latest version payment gateway for our application..?
@timmasrinu Жыл бұрын
ecomapp.models.Cart.DoesNotExist: Cart matching query does not exist. this error is occuring please give me solution
@timmasrinu Жыл бұрын
hello
@tazpgamingpro Жыл бұрын
@Dipak Niroula aaile esewa payment intregrate garda token magxa ta k garnu test id ra password halda ni
@hari3658 Жыл бұрын
can you tell me how to display these multiple interest of a person on HTML using context and jinja .
@withpratap Жыл бұрын
Thanks for posting. Keep adding more.
@sangitniroula Жыл бұрын
Thanks. Sure!
@bipinon Жыл бұрын
keep going
@sangitniroula Жыл бұрын
thanks
@uttarpustika Жыл бұрын
Wow keep it up sir🎉❤
@sangitniroula Жыл бұрын
thanks
@madankhatri2080 Жыл бұрын
Love you brother!! Are you working as a django developer?
@sangitniroula Жыл бұрын
as a Python Developer.
@AmitRajpurohit Жыл бұрын
Thanks 👏
@irynafriaf5762 Жыл бұрын
Thank you so much for this video. Helped a lot! ❤
@ajaykryadav Жыл бұрын
👍👍 good
@luckypatcher972 Жыл бұрын
Hi this is the best tutorial since i started learning django, Whenever i add product to cart am getting a new cart instead of using old cart kindly assist
@tarfiain Жыл бұрын
Hey sir good evening......thank uh for your amazing video it clarifies my 3-4 doubts ....plz keep posting videos like this process only....thanks alottt sir.......and before living let me inform uh......your voice is Masha Allah ......may Allah accept your all hala dua's.....ameen.....stay concentrated and succeed sir...thank uh
@sushmagowda6015 Жыл бұрын
This something I was hunting for! thanks a lot
@pradipathawale82852 жыл бұрын
Tell how to insert data from front end into many to many field
@SisiraSomaratne2 жыл бұрын
You are a good teacher! Thank You.
@vijaykumar-tv4oo2 жыл бұрын
Thank you for your video it very useful and easy to understand but i am getting page not found error while creating the detail view because of slug in urls Give me an idea about this
@atharhussain65342 жыл бұрын
How to add csrf token i we are not using forms. Example : we have to send a variable through axios post request to database in that case how to add csrf token as we can't append token to variable
@sangitniroula2 жыл бұрын
If you use the frontend powered by Django, then you can get CSRF token as {{csrf_token}} in the html page but if your axios client is seperate, then exempt csrf validation in your view docs.djangoproject.com/en/4.1/ref/csrf/#django.views.decorators.csrf.csrf_exempt for class based view refer to docs.djangoproject.com/en/4.1/topics/class-based-views/intro/#decorating-the-class import and use csrf_exempt inside the method_decorator
@jayantkeer34162 жыл бұрын
This is very nice video
@shashankshekhar10122 жыл бұрын
Why didn't you just use multi threading? One can create a thread to send mail the same result will be achieved in just two lines of code. So what's the advantage of your method over mine suggested method? I am asking that just because of curiosity.
@sangitniroula2 жыл бұрын
Since Django introduced the support of asynchronous programming, I just demonstrated it just for educational purposes. You can create another thread to send mail with no harm or use celery like tools for such puposes . But one thing not related to this topic is if there is a situation where too many threads are needed, use asynchronous programming instead if that solves your problem.
@shashankshekhar10122 жыл бұрын
@@sangitniroula thanks for this information
@shashankshekhar10122 жыл бұрын
@@sangitniroula Hey I am facing a little problem. I created a view (named clients) and a helper function to send mail. But when I send request, I get an error on the console " RuntimeWarning: coroutine 'clients' was never awaited". Can you please help?
@danalex29912 жыл бұрын
Suppose the server you are hosting has only 1 core , like the free aws t2 micro server ? then it is not recommended to use multiple threads . Hence async comes into use , by scheduling processing power.
@saikatmondal8092 жыл бұрын
It is a great work with dedications. We have learn so much from YOU. Please make a tutorial on deployment of this ecomapp. I have tried many ways to deploy on heroku but getting error .
@balamuruganloganathan70392 жыл бұрын
Very clear explanation. Beginner can also easily understand the django model relationship. Thank you Dipak bro.
@جمعةضو-ز6ب2 жыл бұрын
Thanks for your
@sumedhkhuje56922 жыл бұрын
AttributeError: type object 'Order' has no attribute 'object' sir im getting this error when I try to login from admin login page
@sangitniroula2 жыл бұрын
You may have mistakenly used Order.object.* instead of Order.objects.* . Please check that. Also check the git repo provided in the description.
@eleighanneaveno6552 жыл бұрын
Hi, Sir! Can you show us too how to delete order? Like how to cancel a pending order?
@sangitniroula2 жыл бұрын
By admin or By person who ordered? Make a url accepting a pk of order and view class or function handling post method. There get the order object from the pk and delete that object eg. order = Order.objects.get(pk=pk) order.delete() or Order.objects.get(pk=pk).delete()
@eleighanneaveno6552 жыл бұрын
@@sangitniroula Sir, by the user themselves.
@eleighanneaveno6552 жыл бұрын
@@sangitniroula If it is not too much to ask, can you show me the full code for this, Sir? I'm still new to Django and I just have an e-commerce project and I come up to visit your videos since this is easy to understand compared to others.
@sangitniroula2 жыл бұрын
@@eleighanneaveno655 clone this repo github.com/ecedreamer/ecommerce_django . The feature you want is here.
@eleighanneaveno6552 жыл бұрын
@@sangitniroula Thank you so much, Sir! II really appreciate your effort!
@obulareddyguda5672 жыл бұрын
Best video for django model relationship. Thanks bro ❤👌
@cricketisourpassion69562 жыл бұрын
thanks you sir this is amazing please send source code.
@bibekjoshi342 жыл бұрын
what is the logic To check the answer and count correct one.. explain
@sangitniroula2 жыл бұрын
Bro, its has very unsecured methodology of answer checking since a complete frontend application was converted to backend and it has that logic in frontend which is wrong. Good way is make your validation logic in frontend and answer checking logic in backend. When you make question and their options, mark one of the option correct. When user submits answer, get the selected answers by user and check it to the marked correct answer and make answer list eg. 1 for correct and 0 for incorrect. Sum the list and thats the count of correct answer, simple. There are multiple ways of doing this.
@Logicrealtor_dubaipro2 жыл бұрын
Error from If request.user.is_authenticated and request.user.customer
@sangitniroula2 жыл бұрын
post your error copied or doing screenshot so that everyone here can understand and guide you. Or clone the github repo provided.
@Logicrealtor_dubaipro2 жыл бұрын
Related objectDoestNotExist at /?
@sangitniroula2 жыл бұрын
first watch the complete video and try to understand the logic. Search the use of function/api used in the code to understand about them. Then it will be easy to debug it by your self. If you still feel difficult, post your complete error screenshot so that every one here can help you.
@explorenpwithpratik2 жыл бұрын
@VijayKumar-dq3ph2 жыл бұрын
Hi , do you have video explaining foreign key relations among tables of different databases or can you give any hint on how to achieve that?
But you can make it possible by writing your custom module/orm according to the requirement.
@sumitdadwal9852 жыл бұрын
Hello sir, Can you guide me how can i add related products under product detail. I know i need to match the category by doing something like related_products = Product.objects.filter(cartegory=product.category). But it is the first time I am working with the class based views so i am little confused.
@sumitdadwal9852 жыл бұрын
Hello sir, first of all thanks for such a great tutorial and secondly I am stuck on part where you update quantity and subtotal amount by adding the same product again in the cart. For me it is updating the total amount but when nothing else. I think the problem is in this part of the code: class AddToCartView(TemplateView): template_name = "addtocart.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) #get product id from requested url product_id = self.kwargs['pro_id'] #get product product_obj = Product.objects.get(id=product_id) # check if cart exists cart_id = self.request.session.get("cart_id", None) if cart_id: cart_obj = Cart.objects.get(id=cart_id) this_product_in_cart = cart_obj.cartproduct_set.filter(product=product_obj) if this_product_in_cart.exists(): cartproduct = this_product_in_cart.last() cartproduct.quantity += 1 cartproduct.subtotal += product_obj.selling_price cart_obj.total += product_obj.selling_price cart_obj.save() else: cartproduct = CartProduct.objects.create( cart=cart_obj, product=product_obj, price=product_obj.selling_price, quantity=1, subtotal=product_obj.selling_price) cart_obj.total += product_obj.selling_price cart_obj.save() for what i understand for some reason cartproduct_set.filter() is not working. Can you take a look and see if you can help. I matched the code with yours and its the same. Thanks in advance.
@sangitniroula2 жыл бұрын
If every thing is ok, I request you to clear the cookies of your browser and test it.
@davidandai_w4122 жыл бұрын
This is absolutely amazing to understanding the concept of Database Relationship in Django.
@kamranzeynalov31552 жыл бұрын
hello, so i have one question. on home page when we click to add to cart button, it adds the item to cart and redirect us to addtocart page. i don't want to be redirected to that page. so i go to home.html and delete {% url 'ecomapp:addtocart' p.id %} FROM <a href="{% url 'ecomapp:addtocart' p.id %}" class="btn btn-primary">Add To Cart</a>. so i don't get redirected but it doesn't add item to cart also. what should i do? thank you in advance!
@niro1002 жыл бұрын
Sir your playlist is so helpful
@pungushe2 жыл бұрын
Why can't I display the orders as on: 23:45. Maybe somebody help me?