How To Add Database Forms To A Web Page - Django Wednesdays #7

  Рет қаралды 92,974

Codemy.com

Codemy.com

Күн бұрын

Пікірлер: 130
@Codemycom
@Codemycom 3 жыл бұрын
▶️ Watch Entire Django Wednesdays Playlist ✅ Subscribe To My KZbin Channel: bit.ly/35Xo9jD bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code bit.ly/3sJpeV6
@mosesejele5089
@mosesejele5089 3 жыл бұрын
@4: 40 A meta class is an inner class that provides a metadata about the outer class in Django, it define things such as available permissions, associated database table names, singular and plural versions of the name etc. Thanks for the video, it was really helpful.
@MrHossain2357
@MrHossain2357 Жыл бұрын
Best video for new learner. I watched at least 5 different people's video, most don't describe the logic or tell the thing they are doing. But he explains every single steps which is great for person who are new to coding.
@Codemycom
@Codemycom Жыл бұрын
Glad you enjoyed it!
@sambhusdharan7532
@sambhusdharan7532 2 жыл бұрын
All your classes are at next level.. hats off.. love from india
@Codemycom
@Codemycom 2 жыл бұрын
Thanks!
@Good-and-Geeky
@Good-and-Geeky Жыл бұрын
Tried FastAPI, Flask and now Django.... Loving Django. It makes so much sense. Good tutorial. Thanks
@Codemycom
@Codemycom Жыл бұрын
Glad you like em!
@bhs_codz2534
@bhs_codz2534 3 жыл бұрын
You are one of the best teacher in the world love from india
@Codemycom
@Codemycom 3 жыл бұрын
Thank you!
@codewithmorris6492
@codewithmorris6492 3 жыл бұрын
after stucking for so long, and then watched your video, I have finally get the solution. TQVM. Subscribed
@Codemycom
@Codemycom 3 жыл бұрын
Glad I could help
@Kingofnekos_osu
@Kingofnekos_osu 2 жыл бұрын
hello, when i submit the form i get submitted = True but it wont return your venue addded succesfully why
@CryptotechCh-tw5ib
@CryptotechCh-tw5ib Жыл бұрын
Your video helped me a lot to understand forms in the minimum time! Thank you so much for the great job
@Codemycom
@Codemycom Жыл бұрын
Happy to help!
@saminrahman5165
@saminrahman5165 2 жыл бұрын
wow .This video helps me a lot in understanding forms in django. I have read the django doc but your video helps me a lots . Moreover your teaching skill is amazing
@Codemycom
@Codemycom 2 жыл бұрын
Glad you're enjoying it!
@eduardjogi
@eduardjogi 3 жыл бұрын
Hi John, GREAT COURSE.... I get a error message when i try to add the form (12:27). The error message starts with ValueError at /add_venue ModelForm has no model class specified. And below: Error during template rendering In template C:\PY_Projects\myclub\myclub_website\events\templates\events\base.html, error at line 0. Do you know what this could be? I have (double) checked the code but could not find any errors.... Much appreciated!!
@eduardjogi
@eduardjogi 3 жыл бұрын
ALready got it :)..... Missed a line :(
@Codemycom
@Codemycom 3 жыл бұрын
@@eduardjogi Yeah was gonna suggest putting is aside for a few hours and checking it again with fresh eyes
@flavius2884
@flavius2884 3 жыл бұрын
@@eduardjogi I got the same problem. What line?
@eduardjogi
@eduardjogi 3 жыл бұрын
@@flavius2884 Hi David, I cant remember it anymore. I would advice you to look at the vid again and pause every time John add something to the files. Another option is to take a look at his files at his github. Good luck :)
@aniket.r.thakur
@aniket.r.thakur 2 жыл бұрын
1000th Like is Mine !!!!
@Codemycom
@Codemycom 2 жыл бұрын
Awesome!
@jeremyeddlemon
@jeremyeddlemon 11 ай бұрын
This doesnt seem to work in Django 5. I have watched the video several times and cannot see any errors in my code. Did anyone get this to work with Django 5?
@Codemycom
@Codemycom 11 ай бұрын
Of course it works with Django 5
@jeremyeddlemon
@jeremyeddlemon 11 ай бұрын
@@Codemycom Yes, sir. I will keep digging. You have great a channel, btw.
@ruffyistderhammer5860
@ruffyistderhammer5860 2 жыл бұрын
at 18:39 how can line 20 ever be accessed?
@joshuabarawa9232
@joshuabarawa9232 2 жыл бұрын
Thnaks man...You always have what i need
@jimmybatista6488
@jimmybatista6488 3 жыл бұрын
when adding venue i do not get the page added sucessfully redirect but it does add it to the database
@Codemycom
@Codemycom 3 жыл бұрын
what did you do differently from the video?
@Kennerdoll
@Kennerdoll 2 жыл бұрын
@@Codemycom same here so right now I'm still checking but I can see it in the web browser '/add_venue?submitted = True'
@silvermind4222
@silvermind4222 Жыл бұрын
How can I use textarea to take input for one of the table in django
@alemagnific69
@alemagnific69 10 ай бұрын
Thank you very much for the video I had two questions: the first is how can I make it so that the saved information is saved and only viewable by the user account that created it (I say this because I have made a registration and login system with authentication of a password manager web app and therefore it would be inconsistent to see the passwords of all) the second: if this information saved on the database I want it to also be viewable on an html page organised in rows/columns, how can I do this? and if so whether there is a possibility from the html page to delete a saved password (via a button) instead of doing it from the django administration.
@Codemycom
@Codemycom 10 ай бұрын
your questions are all answered in the videos
@yunikashrestha5345
@yunikashrestha5345 Жыл бұрын
I'd like to add an author for the form, where the author being the logged in user themselves. How do I do It?
@cadenwiles4981
@cadenwiles4981 2 жыл бұрын
I am trying to add a place holder to a Form.select field for a combo dropdown box. I am wondering if you have any easy references for how to use the place holder in a combo box. Thanks
@dmitry8732
@dmitry8732 Жыл бұрын
what if i use namespace:name, how can i add "?submitted=True" ? i have error "Path not found"
@mxmx8808
@mxmx8808 2 жыл бұрын
Hi. Great course. I like to listening very much. I learned a lot from you. Have you thought about doing a course on how to use datapicker in record editing forms? I have a model-based form. I have working code that adds a record. I use the same form for editing, but unfortunately it does not retrieve the current record data. I have to enter a new date when editing. I was also thinking about using the datapicker with admin. There are a lot of tutorials on stackoverflow - I've tried a few of them but they didn't work for me :)
@rafaeljesus9187
@rafaeljesus9187 Жыл бұрын
How do you do to have a label for the primary key of the class?
@Jonny-gi4iz
@Jonny-gi4iz Жыл бұрын
Thanks for the video, it was very helpful in learning django!
@Codemycom
@Codemycom Жыл бұрын
Happy to hear it!
@panfi1408
@panfi1408 2 жыл бұрын
How could I print out what Venue was created in the /add_venue?submitted=True?
@piotrrybka318
@piotrrybka318 Жыл бұрын
But what about auto-increment id columns? I got `Cannot insert explicit value for identity column in table 'xyz' when IDENTITY_INSERT is set to OFF. (544) (SQLExecDirectW)")` error all the Internet redirects me to my database setting, whereas I want to fix my Django app.
@Codemycom
@Codemycom Жыл бұрын
Django auto increments id columns automatically.
@raminfarzi4229
@raminfarzi4229 Жыл бұрын
sooooo good video very useful thanks
@Codemycom
@Codemycom Жыл бұрын
Welcome!
@MrBrightsideTK
@MrBrightsideTK 3 жыл бұрын
22:10 How can I add a class to all form fields (same as "__all__" in fields variable)? Let's say I have 40 fields, it is so inconvienient to adding all of them.
@BonesD23
@BonesD23 2 жыл бұрын
Correct by adding "__all__" you should be able to add all the fields, The idea of doing it Manually is for you to see that is not Necessary to add all if you have field that are not mandatory and you don't need them hope this help.
@varanushimu6015
@varanushimu6015 3 жыл бұрын
Hey this project is amazing. Plz finish this peoject ASAP....i cant wait!
@Codemycom
@Codemycom 3 жыл бұрын
Thanks! New video every Wednesday
@mdgolamrabbani507
@mdgolamrabbani507 11 ай бұрын
i want to show how html redirecting part is working? Whict is the other vedio that you have shown this
@Codemycom
@Codemycom 11 ай бұрын
Sorry, don't know what you mean.
@israahussein7582
@israahussein7582 3 жыл бұрын
great explanation !
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@aribalmarceljames9908
@aribalmarceljames9908 2 жыл бұрын
can you help me why in my forms.py the bootstrap wont activate
@lorimedicenter4439
@lorimedicenter4439 2 жыл бұрын
thank you very much .you help us to create our project.... !!! could you make video about ecommerce
@Codemycom
@Codemycom 2 жыл бұрын
Happy to hear it!
@behroozfalsafi7951
@behroozfalsafi7951 3 жыл бұрын
Thank you for the video. It was very helpful.
@Codemycom
@Codemycom 3 жыл бұрын
Very welcome!
@mohanasubbu5861
@mohanasubbu5861 3 жыл бұрын
thanks a lot... I have one problem the data was successfully stored in db... but the done message automatically disappeared suddenly ... what can i do...
@mohanasubbu5861
@mohanasubbu5861 3 жыл бұрын
please reply me... i am stuck in this problem
@Codemycom
@Codemycom 3 жыл бұрын
what did you do differently from the video?
@sravanigundepalli3513
@sravanigundepalli3513 Жыл бұрын
how to add 2+venues or events at once in form of table
@seeemawn
@seeemawn 3 жыл бұрын
second chapter, line 2 on models.py "from django.forms import ModelForm": Is this line necessary or can this definition/class be inherited by forms.ModelForm? sry for my bad english :)
@Codemycom
@Codemycom 3 жыл бұрын
Yes, it's necessary
@hayet3198
@hayet3198 2 жыл бұрын
Thank you very much, Heisenberg
@Codemycom
@Codemycom 2 жыл бұрын
lol
@naedeezy8967
@naedeezy8967 3 жыл бұрын
I love you man!
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@balwinderrani809
@balwinderrani809 3 жыл бұрын
Hello first comment
@balwinderrani809
@balwinderrani809 3 жыл бұрын
Yes
@Codemycom
@Codemycom 3 жыл бұрын
Awesome
@bede_hampo
@bede_hampo 3 жыл бұрын
Good day sir, please what's the best way to store phone number in Django models ?
@Codemycom
@Codemycom 3 жыл бұрын
Probably just as characters
@vikasmaur7947
@vikasmaur7947 3 жыл бұрын
Hey, i watched your first video and did all the steps you did in the video. But when i ran "python manage.py runserver" at last it is showing an error : "No module named app_name" . What can i do?
@Codemycom
@Codemycom 3 жыл бұрын
You either don't have your virtual environment turned on, or you aren't in the right directory in the terminal. When you type the command: ls do you see manage.py file listed?
@vikasmaur7947
@vikasmaur7947 3 жыл бұрын
@@Codemycom yes when i ran ls command it showed manage.py and at the above it show the name of virtual environment in fact i tried doing the whole thing without virtual env but still faced same error
@Codemycom
@Codemycom 3 жыл бұрын
@@vikasmaur7947 Well yeah, it wouldn't work without the virtual environment. You might have to delete it all and start over...you missed a step somewhere.
@vikasmaur7947
@vikasmaur7947 3 жыл бұрын
@@Codemycom okay i'll try doing that Thanks
@vikasmaur7947
@vikasmaur7947 3 жыл бұрын
Hey! I actually figured out what the problem was. Actually i had written "name_of_app/urls" in the views.py file but when i saw the tutorial again i found that it was "name_of_app.urls" and when i corrected that it ran successfully. Thank you very much john. You make awesome tutorials . I really love watching you.
@محمدخلیلی-خ2س
@محمدخلیلی-خ2س 2 жыл бұрын
thank you
@Codemycom
@Codemycom 2 жыл бұрын
Welcome!
@bahdev1324
@bahdev1324 3 жыл бұрын
Is this going to be part of ur Codemy courses?
@Codemycom
@Codemycom 3 жыл бұрын
No, this is just on youtube
@bahdev1324
@bahdev1324 3 жыл бұрын
@@Codemycom OK I bought ur courses last month Just want to know if some videos here are included there...
@Codemycom
@Codemycom 3 жыл бұрын
@@bahdev1324 Generally speaking, the paid courses are not free on KZbin...that's why they're paid.
@bahdev1324
@bahdev1324 3 жыл бұрын
@@Codemycom Okay sir thank you...
@k.t.5184
@k.t.5184 2 жыл бұрын
If we directly go to the url: /add_venue?submitted=True It takes us to the page saying you submitted successfully, how to restrict this page only when we submit and will not show if we go directly to the url??
@syedkhizar8624
@syedkhizar8624 3 жыл бұрын
didn't return an HttpResponse object.
@christymarychacko4323
@christymarychacko4323 Жыл бұрын
sir I can't display the message. Could you help me?
@Codemycom
@Codemycom Жыл бұрын
Just rewatch the video and discover what you did differently from the videos. I show you everything you need.
@christymarychacko4323
@christymarychacko4323 Жыл бұрын
@@Codemycom 😀Thank you sir
@1412-kaito
@1412-kaito Жыл бұрын
4:20 Meta is not a Python thing, it's a Django thing. but Django is a Python thing, right?
@aguspe532
@aguspe532 3 жыл бұрын
Hi! Do you have the code in Github?
@Codemycom
@Codemycom 3 жыл бұрын
github.com/flatplanet/djangoblog
@HuyNguyen-xp4ro
@HuyNguyen-xp4ro 3 жыл бұрын
Thanks for best video. Can you tutorial style label djangoform ? Thank you !!!
@Codemycom
@Codemycom 3 жыл бұрын
Yeah, I have videos on that
@HuyNguyen-xp4ro
@HuyNguyen-xp4ro 3 жыл бұрын
@@Codemycom ya, I think we need to do this without bootstrap, I want to learn basically ! Thank you :D
@Codemycom
@Codemycom 3 жыл бұрын
@@HuyNguyen-xp4ro What's the difference? Nothing I'm showing requires the use of Bootstrap, it's just easier that way. No one reinvents the wheel
@assaulttork6384
@assaulttork6384 3 жыл бұрын
How do you prevent user from going back to same form by pressing back button?
@Codemycom
@Codemycom 3 жыл бұрын
The browser handles that
@jithingeorge1946
@jithingeorge1946 Жыл бұрын
class Meta allows you to edit the metadata......cheers!
@Codemycom
@Codemycom Жыл бұрын
lol yeah
@mynameisgod1135
@mynameisgod1135 3 жыл бұрын
Please include hashing in this video series
@Codemycom
@Codemycom 3 жыл бұрын
Not really likely, but you never know.
@bidhyapokhrel1006
@bidhyapokhrel1006 3 жыл бұрын
hello plz make a video for login and registration by using forms.py files
@Codemycom
@Codemycom 3 жыл бұрын
Yeah will probably get to that
@sartajjamalchowdhury5281
@sartajjamalchowdhury5281 3 жыл бұрын
Thanks !!!!!
@Codemycom
@Codemycom 3 жыл бұрын
Welcome!
@gouthamgoutham7640
@gouthamgoutham7640 3 жыл бұрын
Sir pls do followers and following system
@Codemycom
@Codemycom 3 жыл бұрын
we'll see
@learnwithnawf246
@learnwithnawf246 3 жыл бұрын
The output looks different for me but I wrote the same code is there any reason
@TheDarienspider
@TheDarienspider 10 ай бұрын
I wish he would increase the screensize so we can see all of the code and not just roughly 50char length
@Codemycom
@Codemycom 10 ай бұрын
code is in the pinned comment champ
@hackerdaddy2828
@hackerdaddy2828 3 жыл бұрын
hello third comment
@Codemycom
@Codemycom 3 жыл бұрын
Awesome
@chanchalkrishna3336
@chanchalkrishna3336 2 жыл бұрын
Please solve this question Write a function to find if a given inputted word can be made from the string. Example1: If a string “cat” is entered in the input string 1 then the alphabets in the master string allocate ‘c’,’a’,’t’ as already in use. So, the next input string entered will be matched with the remaining characters in the master string. Example2: If the second string entered as ‘egg’ then the required character ‘e’,’g’,’g’ checked from the balance master string. If it's found in the master string, then ‘Yes’ else ‘No’ Setup Django form with following fields. Master String, String 1, String 2, String 3, String 4 Sample Input Master String: aabcglactdde String 1: cat String 2: egg String 3: bat String 4: ball Sample Output Cat: Yes Egg: No Bat: No Ball: No Note: ‘bat’ is marked as ‘no’, because in the given master string(aabcglactdde) only one ‘t’ is given and it's already used for ‘cat’.
@Codemycom
@Codemycom 2 жыл бұрын
lol no one is going to do your homework for you
@chanchalkrishna3336
@chanchalkrishna3336 2 жыл бұрын
@@Codemycom it's not home work . I did partially completed. But I am confused .
@mohamedmamoun1870
@mohamedmamoun1870 3 жыл бұрын
والله يا اب صلعه قعد تجيني في جررح عديييل
@kittyrah2800
@kittyrah2800 Жыл бұрын
I had to refactor my view to look like the code below. Otherwise I kept getting the error: cannot access local variable 'form' where it is not associated with a value refactored: def add_venue(request): submitted = request.GET.get('submitted', False) if request.method == 'POST': form = VenueForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/add_venue?submitted=True') else: submitted = True else: form = VenueForm() context = {'form': form, 'submitted': submitted} return render(request, 'addiction_events/add_venue.html', context)
@eleksonkurbah4013
@eleksonkurbah4013 2 жыл бұрын
Sir, i am getting this error "GET /add-venue?submitted=True HTTP/1.1" 404 2634
@agustin-xc8rg
@agustin-xc8rg 3 жыл бұрын
Thank you!!, this video was very helpful.
@Codemycom
@Codemycom 3 жыл бұрын
Glad you liked it!
@muskankaushik3834
@muskankaushik3834 2 жыл бұрын
'/add_venue?submitted=True ... I don't get this and it gives me this error - The view events.views.add_venue didn't return an HttpResponse object. It returned None instead. Please help me out!
@Codemycom
@Codemycom 2 жыл бұрын
check your code vs the video, you just did something different.
@ngamenifranck1875
@ngamenifranck1875 2 жыл бұрын
Thank you!!, this video was very helpful.
@Codemycom
@Codemycom 2 жыл бұрын
Glad you liked it!
How To Query The Database For Venues - Django Wednesdays #8
19:31
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
Shopify SEO Optimization: How to Get Your Shopify Store to Rank Number 1
9:13
Django Forms: Creating First Django simple form
17:00
Django World
Рет қаралды 8 М.
Django Forms - Save Form Data to Database with Model Forms
10:21
Caleb Curry
Рет қаралды 36 М.
How To Register Users - Django Wednesdays #24
14:53
Codemy.com
Рет қаралды 45 М.
Django 5.0 Just Made Forms Even Better
3:24
Dennis Ivy
Рет қаралды 21 М.
Building Django forms with django-crispy-forms
12:20
BugBytes
Рет қаралды 49 М.
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН