Don't forget to check out my Complete Django course! dub.sh/NvGboTI
@shahbozabdullayev55834 жыл бұрын
That was my biggest question: a particular dynamic single page for every item. And I got answer after this video. Thanks a lot !!! You are the treasure we must keep!
@DennisIvy4 жыл бұрын
Glad it was helpful!
@DemocracyHasNoBias4 жыл бұрын
@@DennisIvy Honestly, you helped me a lot with this question as well! Thanks)))
@din_deorwine4 жыл бұрын
That was my biggest question too!
@frassettiguido3 жыл бұрын
@@DennisIvy I cant solve this issue, anybody help? "Reverse for 'customer' with no arguments not found. 1 pattern(s) tried: ['customer/(?P[^/]+)/$']" ; using // , when i comeback into the home page, that raise up
@Sapkaal4 жыл бұрын
Best channel on KZbin for Django
@DennisIvy4 жыл бұрын
:)
@hasantareq93943 жыл бұрын
This is so far the best tutorials ever man!!!!!!!!!!!!!!! And its free!!!!!!!!!!!! Big respect from BANGLADESH
@muhammadyaseenkhan98754 жыл бұрын
Far better than All udemy courses keep it up 🔥
@Chinmay_3954 жыл бұрын
The Best Tutorial!!!
@DennisIvy4 жыл бұрын
Thank you!
@darkman89395 жыл бұрын
well explained, Thanks again for sharing ur knowledge. Making crash course with a project is a great idea better than explaining stuff separately
@DennisIvy5 жыл бұрын
I totally agree. I can have a concept explained to me but its not until I can put it into practice when I understand it.
@aboulfathfekri4044 Жыл бұрын
Thanks a lot , this is the best way of teaching I had seen, You are the treasure we must keep!❤👌🌹
@musangealain75564 жыл бұрын
Dennis Ivy you are the best
@juneyou92074 жыл бұрын
Thanks Dennis. your course is better than Udemy django course👏😏
@allivecars4 жыл бұрын
thanks man, definitely the best tutorial ever, had so much fun
@akhror-oshie4 жыл бұрын
I found it very useful I just enjoyed understanding from your explanation, Thanks so much and will wait such courses again!
@ronilpatel70034 жыл бұрын
count value of number of orders for a particular customer can be rendered out with {{ orders.count }} here orders being the querySet. This would avoid use of extra variable named orders_count which is now being passed in the context variable.
@nischalbista53812 жыл бұрын
Thank you Dennis! This course is really helping me a lot.
@tiagotitericz36544 жыл бұрын
@Dennis Ivy thank you so much for this crash course, that's awesome!!! I'm just facing a problem!!! After I code the pk method I can't request the standard path cutomer/ anymore. When I request any id the url call the correct view, but when I request only customer/ I can't match any url Folllow the error below: Using the URLconf defined in fp.urls, Django tried these URL patterns, in this order: admin/ products/ customer/ The current path, customer/, didn't match any of these.
@aslamkhan-xd1jz3 жыл бұрын
Same here did u solve it?
@tiagotitericz36543 жыл бұрын
@@aslamkhan-xd1jz not yet, I’m trying to read django doc to find it out
@Raul-tw2xx3 жыл бұрын
@@tiagotitericz3654 Hey , did you figured out ?
@tiagotitericz36543 жыл бұрын
@@Raul-tw2xx not yet, If I get it I’ll tell you 😉
@keshavjha98354 жыл бұрын
Thank you Dennis for this great course. It is helping me a lot.
@_swordancer_4 жыл бұрын
I don't get one thing, in Order class we set customer.ForeignKey() so that Customer was a parent to the Order and we can call in views.py customer.order_set.all() but we did the same with Product and yet in 05:47 we set {{ order.product.category }} so now Order is a parent to the Product ?? It works both ways or am I missing something ??
@elonmusk21424 жыл бұрын
i dont understand it too if have understand it so can u explain me please..
@johnmorgan23494 жыл бұрын
You use {{order.product.category}} if you are accessing the parent model, and customer.order_set.all() when trying to get the child model.
@abdulqadar9580 Жыл бұрын
You are amazing Dennis
@binaryreliantmind16114 жыл бұрын
@6:39 my table is empty. I followed the steps correctly and can't figure out why its not working. I tested it by replacing the for loop with plain text and it showed up. But the orders aren't passing through. I have a populated database with orders.
@drcod3r3294 жыл бұрын
we can directly call the order_set in the template without creating a new variable and pass it to the context like order in customer.order_set.all
@srinivaspendem28264 жыл бұрын
I am getting an error when I call order_set.all(). "function' object has no attribute 'order_set' ". I am getting this error, what should I do? any suggestions, please!
@matildaghanm6225 Жыл бұрын
@@srinivaspendem2826 iam getting the same error toooo 😭😭😭😭
@thomasrackow81595 жыл бұрын
Well done, good work. Only yesterday KZbin suggested your videos to me. Of course, I will follow your account. Appreciate Django content here. Just one thing, I think you should have done the dynamic url using as the pk will never contain any string.
@DennisIvy5 жыл бұрын
I appreciate that Thomas :) And your right, "int" would be more appropriate here. I just really wanted people to understand that string values can be used in other situations, maybe like a blog name or something..
@grzegorz-gregmika83395 жыл бұрын
@@DennisIvy Please change id to uuid, it would be better and more relevant to the document DB and will survive ;-)
@DennisIvy5 жыл бұрын
@@grzegorz-gregmika8339 That's how I normally do it but because I haven't covered uuid yet i kept it with the id. I'll probably add that as another video so I can cover the entire topic :)
@tilting_cat33444 жыл бұрын
@@DennisIvy Hey dennis i can still open the customer/1 page as i have customer with id =1 but when it came to show the output data it doesn't show up even the {{customer.name}} doesn't show up only the lay out of the page and nothing else
@tilting_cat33444 жыл бұрын
@@DennisIvy the thing is if it does not have any value it should return error right but it doesn't show any error i cna open the page but not one data output show
@kshitijsangar31514 жыл бұрын
Hello Sir, at 0:56 you passed pk to the customer function like customer(request,pk), so my question is, when we give a call to this function, don't we have to pass the parameter pk? because you didn't mention any of that in here.
@looyeeng99464 жыл бұрын
0:01 Dynamic URL routing 3:25 Queries & Rendering data to templates 8:35 What's next Note: www.notion.so/9-Dynamic-URL-Routing-Templates-b3611d6ad067484bbdeb947102a62e6e
@mohamedelmabrouki5124 жыл бұрын
This is awsome man. Thanks for sharing your knowledge for free
@tristanjayvirtudazo22683 жыл бұрын
hi im a bit curious on how to use it in an tag in html. can you show me? i would deeply appreciate it
@dhairya-varshney2 жыл бұрын
Helped me in my project. Thanks for the video buddy.
@ΒασίληςΖ-σ4υ4 жыл бұрын
Hi Dennis, Nice Job. I am facing this error : type object 'Customer' has no attribute 'object'. I had check my code so far line by line compare it with yours but i could not find something. At my "views" i am importing : "from .models import *" but seems that ignore it. Any help. I must inform you that so far the code was running (until this tutorial). The problem occured when i changed this line "path('customer//', views.customer),". Thanks Again.
@devpaccy4 жыл бұрын
@Vladimir Terentev hello! I tried to use this but I can't figure out, how did you use that code? Thank you!
@stephenchege4 жыл бұрын
I am getting an error at 2:28 when I refresh my browser Page not found (404) Request Method: GET Request URL: 127.0.0.1:8000/2/ Using the URLconf defined in crm1.urls, Django tried these URL patterns, in this order: admin/ products/ customer// The current path, 2/, didn't match any of these. You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page. When I set debug to False I still get an error .... can anyone help me with this?
@immanuelpaul94214 жыл бұрын
after doing runserver, 127.0.0.1:8000/customer/2/ give this i think you have forgot to give primary key value /2/ or etc.....
@felmangarcia12744 жыл бұрын
Thank you so much! The best tutorial ever!
@abinashdutta21094 жыл бұрын
I'm confused about 'order_set', 4:17 , can you please mention where u have introduced it?
@rijalefendi64654 жыл бұрын
u can check Database Model Queries in previous video
@matildaghanm6225 Жыл бұрын
@@rijalefendi6465 iam getting the same error too ...please help
@banaras.wala.foreignaala4 жыл бұрын
Dear Dennis, thanks for making such good videos. Thanks,
@Magistrado19144 жыл бұрын
Excellent course 13/07/2020
@talhasaleem83334 жыл бұрын
how can i redirect to a dynamic url
@moanxion91022 жыл бұрын
If yall get this error "object is not iterable" use filter() instead of get()
@brunomandela3480 Жыл бұрын
what if i get an error like NoReverseMatch at /students/3/ what should i do now
@paulo257403 жыл бұрын
thanks mate exactly what I needed
@bishaladhikari86912 жыл бұрын
i want individual customer ,order date ,status table in single page how can i do that ?
@syedrayyan81304 жыл бұрын
it unable to load css files and image files while passing pk_test string...please help me with this Refused to apply style from '127.0.0.1:8000/product-details/3/static/css/bootstrap.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
@tic-tac-toe74734 жыл бұрын
What if i want to search the customer from form input field..how can redirect that url
@hamzaseif49924 жыл бұрын
thanks alooot for these videos really helpfull ♥
@doniyorabduvokhidov17064 жыл бұрын
Wow... This was really amazing .
@rutviktak7164 жыл бұрын
U r awesome😘 I mean i'm really getting a hang of this and it's so much fun😊
@singhgangadhar16834 жыл бұрын
i have been completing the course from first but i got an error// The current path, customer/, didn't match any of these.// i tried every thing can u plz help me
@abhishek.p68254 жыл бұрын
check your url.py file. You would have made some mistake there..
@tiagotitericz36544 жыл бұрын
Did you solve it? I'm facing the same problem. After I code the pk I can't request the standard cutomer/ anymore. When I request any id the url call the correct view, but when I request only customer/ I can't math any url Folllow the error below: Using the URLconf defined in fp.urls, Django tried these URL patterns, in this order: admin/ products/ customer/ The current path, customer/, didn't match any of these.
@shaziyaakhtar44373 жыл бұрын
@@tiagotitericz3654 did you solve it? As i m facing the same issue.
@doniyorabduvokhidov18624 жыл бұрын
Wow enjoy watching ur totorials
@manastiwari22503 жыл бұрын
this tutorial is so so good it has helped me alol
@MilaBarross3 жыл бұрын
That is awesome!! Thanks!
@tamarapetrova8440 Жыл бұрын
The link to the source code is not working. Could you please fix this, Dennis?
@SumitKumar-js3po4 жыл бұрын
Urgent answer please! i want to grab the loggedin user user_id . model is --> Profile (user,email,pic,website)
@chancewatkins50712 жыл бұрын
Very nice tutorial, exactly what I was looking for. Thanks; I've subscribed. God Bless. : D
@davidbrown28064 жыл бұрын
FYI .... I noticed that line 10 in customer.html is missing {{ customer }} to put the customer name in the top left panel. Cheers
@jacobidoko30094 жыл бұрын
i am following the tutorial and on this particular video i keep getting an error that says:'Customer' object has no attribute 'order_set'.
@garryg50444 жыл бұрын
I know how frustrating it can be. And I am having my share of errors as well. Just download the source code and compare it to yours. It is tedious work but it will help you.
@kevinobrien67704 жыл бұрын
Hi Jacob, this can happen depending what IDE you are using. I was using PyCharm Community Edition 2018 and had this issue. Once I updated to the 2020 it was fixed. I believe it has to do with the level of support for Django within the IDE.
@gaurabdawadi19074 жыл бұрын
Maybe you have different class name for order model . Something like class OrderModel() instead of class Order() ,but while writing query you have used order_set.
@muhammadismail82304 жыл бұрын
i had the same error, my mistake was i wrote order.set instead of order_set. Check ur code.
@kakego30022 жыл бұрын
i reading this comments but no one say if u named ur class CustomerModel u need to use ordermodel_set
@meleniogaray51094 жыл бұрын
I have a problem with the contact information the email and phone do not appear on my website. can you help me with that?
@gg-vl2xw4 жыл бұрын
do you find the solution?
@Sn4c08034 жыл бұрын
I am getting an error can you help me out. Its saying customer() got an unexpected keyword argument 'pk_test'
@gg-vl2xw4 жыл бұрын
do you find the solution?
@julianbazanaguirre84394 жыл бұрын
please show us ur code, if you just say that, could be many things, apparently is something with pk_test check that is the same in all places. One of the skills of a programmer is to debug his/her own code, so, give it a try next time. Try to go back and forth, change things, double check that all the things are written correctly, possible copy the error and look for it in stackoverflow or github, for sure someone had the same error than u did. Let me know later! this is my views.py def customer(request, pk_tes): #customer = Customer.objects.get(id=pk_test) return render(request, 'accounts/customer.html') this is my urls.py urlpatterns = [ path('', views.home), path('products/', views.products), #make path dynamic by adding
@dimitrioschamarousios11314 жыл бұрын
You must add pk_test as parameter at customer in views.py
@shreymodi75194 жыл бұрын
@@julianbazanaguirre8439 def customer(request,pk_test) change it to this
@KrishnaManohar80214 жыл бұрын
bro make tutorial about import UUIDField
@Bawaromerali4 жыл бұрын
great video , thanks .
@davidbrown28064 жыл бұрын
In line 9 of customer.html he missed including {{customer.name}} to complete the form.
@amanchaurasia98804 жыл бұрын
getting attribute error in customer page
@shaneebkottakkal34913 жыл бұрын
i dont undserstand order_set pls help me
@Ab-gf8pz3 жыл бұрын
in Order model class Order(models.Model): choice=(('Pending','Pending'), ('Out of stock','Out of stock'),('Delivered','Delivered')) customer=models.ForeignKey(Customer,on_delete=models.CASCADE,null=True,related_name="customer") product=models.ForeignKey(Product,on_delete=models.CASCADE,null=True,related_name="product_order") added=models.DateTimeField(auto_now_add=True) status=models.CharField(max_length=200,choices=choice) in views.py def customer(request,pk): customer=Customer.objects.get(pk=pk) ##reverse relationship of Customer and Order shown in Order - customer ## customer.related_name orders=customer.customer.all() context={'customer':customer, 'orders':orders } return render(request,"Accounts/customer.html",context)
@danielampey91314 жыл бұрын
Well explained...
@palanikumar80234 жыл бұрын
orders=customer.order_set.all() showing error for me..plz help me sir..
@aarushihans19244 жыл бұрын
hey, its showing me the same error, did you find any solution to it?
@BrandonDelPozo4 жыл бұрын
How can I create a personalized URL for every user, for example I have this: www.mywebsite.com/profile and I want something like this www.mywebsite.com/user... I mean www.mywebsite.com/john, www.mywebsite.com/luisa etc. How can I do that?
@frassettiguido3 жыл бұрын
I cant solve this issue, anybody help? "Reverse for 'customer' with no arguments not found. 1 pattern(s) tried: ['customer/(?P[^/]+)/$']" ; using // , when i comeback into the home page, that raise up @Dennis Ivy
@farsanaks56723 жыл бұрын
hi sir i have one error can you help me
@waqarshaikh7163 жыл бұрын
Is your error solved?
@farsanaks56723 жыл бұрын
@@waqarshaikh716 no could you hel me
@waqarshaikh7163 жыл бұрын
@@farsanaks5672 Sure, I'll try to help you.
@farsanaks56723 жыл бұрын
@@waqarshaikh716 i try to write a ecommerce project.the problem is when the project is run first web page is showed but when i click on login and register button that redirect home page. and i try to find the bug but it shows no module named django.but i already install django and use the command pip install django also
@waqarshaikh7163 жыл бұрын
@@farsanaks5672 In you Command Prompt or Terminal run this command `pip list`. This command will list all the python packages installed in your PC. Check if you have Django in that list.
"GET /customer/ HTTP/1.1" 404 2490 Not Found: /customer/ , this is the error I m getting, every page is getting open admin,about,dashboard,product but customer page is not opening at all ,, if anyone knows how to solve this error ,kindly let me know ..
@KevinTempelx4 жыл бұрын
ty
@EOO-Stand4 жыл бұрын
excellent teaching, do you have a paypal account where people can buy you coffee. i have seen a few youtube videos with accounts.
@saeedou4 жыл бұрын
share the codes please
@DennisIvy4 жыл бұрын
Already linked.
@saeedou4 жыл бұрын
@@DennisIvy got it and thank you for this great course .
@matildaghanm6225 Жыл бұрын
@@DennisIvy the link doesn't work
@brunomandela3480 Жыл бұрын
pliz answer urgently
@srinivaspendem28264 жыл бұрын
I am getting an error when I call order_set.all(). "function' object has no attribute 'order_set' ". I am getting this error, what should I do? any suggestions please