Django Tutorial for Beginners - 30 - Model Forms

  Рет қаралды 154,601

thenewboston

thenewboston

Күн бұрын

Пікірлер: 145
@MaverickQbiak
@MaverickQbiak 5 жыл бұрын
I actually appreciate how it's all combined - Django, css, html and bootstrap - but that's because I don't know any of that! Great videos!
@Arximed1Monte
@Arximed1Monte 8 жыл бұрын
If anyone stuck, because of the changed design, compare your files to files in this repository: github.com/monteua/viberr I think, all the new code, which was not showed you can find here.
@shaneodonnell2515
@shaneodonnell2515 8 жыл бұрын
Thank you, this got me back on track
@ggodoyoliveira
@ggodoyoliveira 8 жыл бұрын
Thanks man!
@aladolfsenjustanoldguy2045
@aladolfsenjustanoldguy2045 8 жыл бұрын
Many thanks. I didn't know that knowledge of Bootstrap was required. You help me quite a bit. Arrogant of Bucky to assume and not provide requirements before starting.
@davcastroruiz
@davcastroruiz 8 жыл бұрын
thanks!
@amirshahnazar6674
@amirshahnazar6674 8 жыл бұрын
thanks man
@brodWenDayondon
@brodWenDayondon 7 жыл бұрын
Ok. Before you start the tutorials make sure you already changed the templates index.html, details.html, and the base.html. I'm using Bootstrap 4 {% extends 'music/base.html' %} {% block body %} {% for album in all_albums %} {{ album.title }} {{ album.artist }} View Details {% endfor %} {% endblock %} {% load staticfiles %} {% block title %} Viberr {% endblock %} Viberr Albums (current) Songs Search Add Album Log-out {% block body %} {% endblock %} {% extends 'music/base.html' %} {% block title %} Album Details {% endblock %} {% block body %} {{ album.artist }} | {{ album.title }} {{ album.brief_description }} All Songs Title Audio File Favorite Actions {% for song in album.song_set.all %} {{ song.title }} .{{ song.file_type }} {% if song.is_favorite %} {% endif %} {% endfor%} {% endblock %}
@Crucizer
@Crucizer 5 жыл бұрын
you're a kind person
@KC_Nasci
@KC_Nasci 3 жыл бұрын
You're the king man. Thank you
@pascallohscheidt7281
@pascallohscheidt7281 7 жыл бұрын
Thanks, Bucky :) a clean tut as always. :) For all people complaining about this Bootstrap thing. This is a tutorial about Back-End-Development. No Front-End-Design. There are thousands of videos for bootstrap.
@sean123654
@sean123654 8 жыл бұрын
I knew this day was coming......the day I have to go and learn bootstrap! lol
@SireBandi
@SireBandi 8 жыл бұрын
+Ricky Singh It's not a waste of time! Put some effort into learning bootstrap and it'll pay off with interest in no time!
@cesarochoa5593
@cesarochoa5593 7 жыл бұрын
A thing that i used to do is just write all code on my own style and then tranform it keeping classes and ids to bootstrap styling.
@retkoussa
@retkoussa 6 жыл бұрын
If you're watching in 2018: Note that: - from django.core.urlresolvers import reverse should now be -> - from django.urls import reverse
@grizzlegreezz9696
@grizzlegreezz9696 5 жыл бұрын
Thank you..Works in October 2019
@weho_brian
@weho_brian 7 жыл бұрын
for those who are stuck, this is what you can try. goto his github, copy the code for the index.html and detail.html in your files. When you try to re-run your site you will get some errors. All you do is delete the references to the views or functions that don't yet exists. Foe example, just set href= "", this will just set it to dead links for the time being.
@ded-pihto
@ded-pihto 7 жыл бұрын
Thx, that's work.
@ahmedtevez
@ahmedtevez 7 жыл бұрын
If you are working with Django 2.0. its now "from django.urls import reverse" instead of "django.core.urlresolvers import reverse".
@dukesanmi4999
@dukesanmi4999 6 жыл бұрын
No other changes to the code?
@tanetsriamorn3021
@tanetsriamorn3021 7 жыл бұрын
** DYI ** Django 2.0 removes the django.core.urlresolvers module, which was moved to django.urls in version 1.9. You should change any import to use django.urls instead.
@harshdewangan1951
@harshdewangan1951 7 жыл бұрын
thanks it helped..
@MaverickQbiak
@MaverickQbiak 5 жыл бұрын
BOSSSSS, thanks for that!
@hussamcheema
@hussamcheema 5 жыл бұрын
thanks
@swarlos99
@swarlos99 8 жыл бұрын
c'mon dude not all of us know bootstrap too well despite watching your tutorials on it
@jyothishkumar3098
@jyothishkumar3098 7 жыл бұрын
that awkward moment when you have watched 30 tutorials and still don't understand django.
@adrianzyskowski1989
@adrianzyskowski1989 7 жыл бұрын
tell me if you had understood it now after 8 months
@vaibhavtiwari6992
@vaibhavtiwari6992 4 жыл бұрын
Now? 3 years?
@jyothishkumar3098
@jyothishkumar3098 4 жыл бұрын
@@adrianzyskowski1989 This was my brother's account 😁 I remember seeing him build this project back then (and he was 15). He's focused on high school and college entrance exams and now but I think he gottor a better idea of the topic.
@jyothishkumar3098
@jyothishkumar3098 4 жыл бұрын
@@vaibhavtiwari6992 👆😁
@Hackaprende
@Hackaprende 7 жыл бұрын
Pausing this tutorial to take the bootstrap one, a new challenge!
@karandave4481
@karandave4481 7 жыл бұрын
reverse can be imported from django.urls instead of django.core.urlresolvers for those finding reference errors. It worked for me.
@Deeredman4
@Deeredman4 6 жыл бұрын
Bucky... Typically; I love your videos, I have been watching them since I was a kid, I have learned a lot from them, they are very informative, detailed, and of the highest quality but in this case; you have left out a HUGE chunk of essential information... I can understand not explaining all of it but you really should at least show it on camera so that we can copy it. I am honestly, and unfortunately; a little disappointed over this one. I know that people are going to say "Well, it's a free tutorial so; you can't complain." and while I appreciate the effort; keep in mind that because I cannot follow the tutorial from this point forward; you just wasted hours (over the course of 2-3 days) of my time and since I still don't understand Django; I have to go watch someone else's videos and spend even more time covering the basics (which I already spent the last 2-3 days learning) all over again. I just wanted you to know exactly what you are doing to people with this tutorial so that you could understand why you need to do something about it. I recommend that you please either redo this video or take down the entire series so that this doesn't happen to the next guy that comes along. At the VERY least you could put an annotation in the first video that says "Knowledge of bootstrap is REQUIRED for this tutorial series; you have been warned." In the first video you mention that it is used and that you won't be explaining it, and that is fine but; you never specifically say "I am going to leave chunks of code off camera so; you will need to know bootstrap to follow along." I am tempted to skip ahead and try to piece together the file from future videos to try to recover the time that I have lost but I am leery because I don't know whether or not you are going to do this again on video 36 or video 37... I'm going to take a break while I decide how to approach this moving forward... EDIT: After perusing the comments I found a comment by Vadym Stavskyi that puts the missing code in a github repo: github.com/monteua/viberr I believe it might be more full featured than the code you have at this point in the tutorial but it's better than nothing. Could I recommend that you please put this link in the video description and/or an annotation in the video?
@eshanmehendal2481
@eshanmehendal2481 6 жыл бұрын
to do the grid view like bucky did in this video do this - Thumbnail label ... Button Button
@didi2500
@didi2500 6 жыл бұрын
I'm so happy that many people don't know bootstrap like me. I thought I was the only one who doesn't know it. haha!
@carstenht
@carstenht 8 жыл бұрын
It might be that people should know bootstrap but i didnt and was following the tutorial step by step to learn by typing. And this was kinda off-setting to suddenly have to and download a bunch of code you havent been walked through. This might not sound like a big thing, but when you are learning something from scratch, taking things step by step is the way to go in terms of teaching. So, if Bootstrap was a prerequisite, it should have been mentioned earlier. You had it going good up until this point teaching wise.
@cesarochoa5593
@cesarochoa5593 7 жыл бұрын
You can learn so fast bootstrap thing so easy, just google 'bootstrap w3 schools' and go for the first result. There is a lot and complete bootstrap functions tutorial there.
@Robert-jl2tl
@Robert-jl2tl 4 жыл бұрын
I wish there were an easy way to see a list of all of these Django videos in order so it was easier to watch them all. Doing a search on YT brings back a mish-mash of links.
@Athomield3D
@Athomield3D 8 жыл бұрын
making html/css modifications off-screen is not cool mate, it confuses ppl
@RossDCurrie
@RossDCurrie 8 жыл бұрын
Yeah, it wouldn't be as big of an issue if he at least included a version on github for "Start of Tutorial 30". Right now I'm picking apart what's there to try and bring it back to where it was at the start of the tutorial.
@bhawnakukreja7589
@bhawnakukreja7589 8 жыл бұрын
plz upload the video on the design part of this video:-)...we really need it Bucky Sir....
@muhammadtariq7474
@muhammadtariq7474 6 жыл бұрын
its great to follow your taturiols online
@davidgromer2117
@davidgromer2117 6 жыл бұрын
Nice vid ,but I have a question. How could i create a Instance of "Song" with a further Attribute (let's say "song_publisher) and set this Attribute via ForeignKey equal to the user who is currently logged in.
@lawfirm7279
@lawfirm7279 8 жыл бұрын
Bro this is not cool.If you want to prof ,do not prof with assumptions .Now i fine it out hard to follow up with your tutorial
@atharva-naik
@atharva-naik 4 жыл бұрын
There is a big flaw here, if I know bootstrap I can skip bootstrap parts, but if I don't then that is another tutorial series for me
@mitchjohnson4714
@mitchjohnson4714 7 жыл бұрын
Should there be a caret in that regular expression at the end?
@tonyiguru7595
@tonyiguru7595 4 жыл бұрын
It seems to work with or without the caret, so I left mine in there: re_path(r'^album/add/$', views.AlbumCreate.as_view(), name='album_add'),
@addohm
@addohm 8 жыл бұрын
I used the following - def get_absolute_url(self): return reverse('music:album_detail', args=[str(self.id)])
@varunreddy3865
@varunreddy3865 5 жыл бұрын
I only have a small doubt, I understood up to submit button but what I can't understand is how is data saved directly in the DATA BASE even though we didn't write any functionality?
@Robert-jl2tl
@Robert-jl2tl 4 жыл бұрын
It would also be really helpful if all of this code he's writing were in a repository we could pull. I followed the GitHub link above and couldn't find anything pertaining to this video.
@omarFaruk-hu4ig
@omarFaruk-hu4ig 6 жыл бұрын
why from django.core.ultresolvers import reverse does don work, when i import it gives wrong
@tushardm1729
@tushardm1729 6 жыл бұрын
use from "django.urls import reverse"
@consumerdude
@consumerdude 6 жыл бұрын
Django tutorial 30 Model Forms apps used in this tutorial \music\urls .py \music\views .py \music\models .py
@davogrady
@davogrady 8 жыл бұрын
I have a question. On 4:53 you import CreateView, UpdateView and Deleteview from django.views.generic.edit. Wouldn't they have been imported from line 1 "from django.views import generic" ?
@mitchjohnson4714
@mitchjohnson4714 7 жыл бұрын
I'm not an expert, but I think he could have said (generic.edit.CreateView) below, without having to import those classes. I think he just thought it would look a little nice to import those classes above and then write (CreateView) below.
@TheMesoria
@TheMesoria 7 жыл бұрын
Well, done tut, I really do not understand this whole "omfg, offscreen!" kind of hate... If you do nto know bootstrap, you just will not use it freely after watching you make bootstrap part. Daever, Like always wonderful ez af tut to understand, ty!
@donpislik7709
@donpislik7709 7 жыл бұрын
NEED HELP: Reverse for 'detail' with arguments '()' and keyword arguments '{'pk': 19}' not found. 0 pattern(s) tried: []
@self5010
@self5010 8 жыл бұрын
If anyone lost the track, here the code and compare with yours github.com/Ananthu/Django-thenewboston-youTube-classes
@yuvaraj9740
@yuvaraj9740 5 жыл бұрын
" from django.urls import reverse" if you got a error in importing urlresolvers!
@user47263
@user47263 7 жыл бұрын
Hi Bucky! How to add new songs using the link on the detail view?
@christianlisangola9383
@christianlisangola9383 7 жыл бұрын
when i try to import reverse in my models.py file with the following line:< from django.core.urlresolvers import reverse> i'm getting this error :
@devchahal4917
@devchahal4917 5 жыл бұрын
can anyone tell when bucky refered to music:detail in reverse was he reffering to the detail html file or the name in urls where he has specified name='detail'
@PersephonesVoice
@PersephonesVoice 7 жыл бұрын
I imported the project "as-is" from github, unpacked, ran, failed. Went in, modified the first issue, failing again, this time with:WSGIRequest' object has no attribute 'user' At this point, I cant continue the tutorials. I dont know whats wrong with my previous code, I dont know whats wrong with your code, and I dont have the knowledge to fix it, because I cant follow along in the code, because my code doesnt match your code, and my code and your code doesnt work. All in all, it was a beautiful Casey Jones.
@ishwaraju
@ishwaraju 8 жыл бұрын
hello bucky can u please provide the link of the code which u have used to create the website design.. please i m a beginer. i was learning following each and every step and the sudden chaneg really confing me . please help me.. please do provide the code. thanks in andvance
@manishadwani386
@manishadwani386 8 жыл бұрын
go to github Bucky Roberts viberr
@melvyniandrag
@melvyniandrag 8 жыл бұрын
The CreateView is different from the other views we've seen so far I think because the template it fills in isnt mentioned explicity in the class, right? The docs docs.djangoproject.com/en/1.10/ref/class-based-views/generic-editing/ say: The CreateView page displayed to a GET request uses a template_name_suffix of '_form'. For example, changing this attribute to '_create_form' for a view creating objects for the example Author model would cause the default template_name to be 'myapp/author_create_form.html'. So that's how the CreateView sees the template it should use. I was confused by this for a few minutes.
@aloualassane867
@aloualassane867 8 жыл бұрын
thanks !!!
@Crucizer
@Crucizer 5 жыл бұрын
if anybody knows how to make that bootstrap fancy thing, please kindly share the code.
@m.haroonali4214
@m.haroonali4214 4 жыл бұрын
i cant get your project on github plz give me link of the code in github
@manishadwani386
@manishadwani386 8 жыл бұрын
how can I create that list view where all songs are listed. it's weird to make that table view if anyone has a tutorial link please replay
@augustuscaeser8939
@augustuscaeser8939 7 жыл бұрын
also please do a tutorial series on materialize css framework
@sagarkumar0711
@sagarkumar0711 6 жыл бұрын
I am not getting the images in the index and details pages, except this everything is working as expected. So someone help me out please.
@ozzyparkar8405
@ozzyparkar8405 5 жыл бұрын
Did you find out what was wrong? Im getting the same error but only for the Index Page
@Khan_2025
@Khan_2025 6 жыл бұрын
'music:views' is not a viewname, how can i fix it
@muntadarmuhammad4578
@muntadarmuhammad4578 6 жыл бұрын
the hard part is coming why is the point from get_absolute_url function can some one explain plz
@jhunyormonttez7408
@jhunyormonttez7408 8 жыл бұрын
mmm im lost , what should i do now? pffff copy the entire code on github? but, that way i cant understand anything......
@jarnalyrkar
@jarnalyrkar 8 жыл бұрын
Aww, your decision to write the design off-screen is really frustrating and a bit off-putting. Everything went smooth to here. Fortunately other people in the comments has supplied the missing code, but as others are commenting, we now do not have any idea of the changes made.. Hope you avoid doing this in the future - keep each playlist seperate, not dependant on eachother. Apart from that, i love your casual style of videos, i'm learning a bunch, and for free! So I know i'm not in a position to complain.
@s.bhargavakrishna8749
@s.bhargavakrishna8749 7 жыл бұрын
nice one ...thanks.
@bidhanmondal4032
@bidhanmondal4032 8 жыл бұрын
hey bucky can you say how to see the total list that is coming through object_list?? not just like object_list.title and all. i want to see all the data at once like print(object_list) will do in python. can you help?? or anyone?
@lingovilla
@lingovilla 8 жыл бұрын
you just have to write, name_of_class.object.all() that returns all the data from the database.
@ani2595
@ani2595 7 жыл бұрын
Did anyone get a NoReverseMatch error?
@AbhishekNigam
@AbhishekNigam 7 жыл бұрын
Maybe you could've made a skippable video for styling the website using bootstrap
@vigneshnc7253
@vigneshnc7253 7 жыл бұрын
Yeah. I too noticed that
@RohitChaurasiyalisten
@RohitChaurasiyalisten 5 жыл бұрын
in view y u making class actually according to my reading in view.py only functaion and return type that is standard #buckyroberts correct me if i am wrong.
@dasvas9383
@dasvas9383 7 жыл бұрын
Django 2.0 removes the django.core.urlresolvers module, which was moved to django.urls in version 1.9.
@semirumutkurt6635
@semirumutkurt6635 8 жыл бұрын
github.com/sumut/ahrazify don't forget to give stars .__. just kidding. here is the design change between video tutorials 29 and 30 IMPORTANT EDIT: do not forget to download favicon where located under /music/static/ and main.js where located /music/static/music/js/main.js
@semirumutkurt6635
@semirumutkurt6635 8 жыл бұрын
I named the project ahrazify. it's ironic name, i was bored when i named it. ahraz means deaf in arabic
@davcastroruiz
@davcastroruiz 8 жыл бұрын
Thanks!
@semirumutkurt6635
@semirumutkurt6635 8 жыл бұрын
i will upload detail page this night. yesterday there was match between bayern and arsenal. thats why I couldn't complete
@davcastroruiz
@davcastroruiz 8 жыл бұрын
gist.github.com/davcastroruiz/a3d4267982b2476236a8665459122337 Here you have, I add an Update button for tutorial 32
@jyothishkumar3098
@jyothishkumar3098 7 жыл бұрын
Thanks man!
@avinashanand8994
@avinashanand8994 8 жыл бұрын
can anyone please share or point out where can i find the code for the above bootstrap styling
@manishadwani386
@manishadwani386 8 жыл бұрын
get it on his github page
@micoberss5579
@micoberss5579 7 жыл бұрын
I didnt get why we need REVERSE function and what it does
@mitchjohnson4714
@mitchjohnson4714 7 жыл бұрын
I'm not good at django, but I will try to answer this, since nobody else has. Basically, I think the reverse function takes the name of a url (as seen in the urls config file) and returns the actual url. I think it's called "reverse" because normally you'd type in the url, it would then look it up and call the appropriate view. That's sort of the reverse of what he wants to do here.
@hoangyell
@hoangyell 7 жыл бұрын
thank you
@ArifAli-ps3qr
@ArifAli-ps3qr 7 жыл бұрын
i got this No module named 'django.core.urlresolvers' {% pls help asap %}
@ArifAli-ps3qr
@ArifAli-ps3qr 7 жыл бұрын
i found it------ django.urls import reverse
@mitchjohnson4714
@mitchjohnson4714 7 жыл бұрын
I wish people would quit whining about bootstrap. If you're building a website along with Bucky, it will still work just the same. It just won't have cool styling. Still, I do think that Bucky should have avoided it.
@samuelkyama5935
@samuelkyama5935 8 жыл бұрын
you guys should quit complaining.why would you learn django without knowing bootstrap? having bootstrap doesnt change any functionality in here so its cool to do it on the background. bootstrap is for you guys to learn
@mitchjohnson4714
@mitchjohnson4714 7 жыл бұрын
Because I'm focusing on back-end stuff. I just want a minimalistic front-end for now, and I can learn all about cool styling later on.
@augustuscaeser8939
@augustuscaeser8939 7 жыл бұрын
this series sucks please remake this series i get more confused from watching this than learning
@aladolfsenjustanoldguy2045
@aladolfsenjustanoldguy2045 8 жыл бұрын
pretty arrogant having bootstrap as a requirement without telling us at the beginning.
@taihatranduc8613
@taihatranduc8613 5 жыл бұрын
fuck. I understand nothing
@Akash-hx9mn
@Akash-hx9mn 4 жыл бұрын
Start from beginning.You will understand everything.
@taihatranduc8613
@taihatranduc8613 4 жыл бұрын
Sorry for saying that. It's a long time ago. I mater Django now.
@Dadusingh1010
@Dadusingh1010 7 жыл бұрын
can anyone tell me where (file) is our album(title,logo..) is store?
@Khan_2025
@Khan_2025 6 жыл бұрын
'music:views' is not a viewname, how can i fix it
@superCharged24
@superCharged24 6 жыл бұрын
hi how did you fix it?
@superCharged24
@superCharged24 6 жыл бұрын
i got this same error, pls how did you fix it?
Django Tutorial for Beginners - 31 - ModelForm and CreateView
11:08
thenewboston
Рет қаралды 120 М.
Django Tutorial for Beginners - 29 - Generic Views
10:08
thenewboston
Рет қаралды 141 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
A Quick Intro to Model Formsets in Django
10:37
Pretty Printed
Рет қаралды 39 М.
Learn HTML forms in 10+ minutes! 📝
17:55
Bro Code
Рет қаралды 134 М.
Model Form | Django
6:43
Dennis Ivy
Рет қаралды 132 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 212 М.
Django Tutorial for Beginners - 23 - Adding Forms to the Template
9:38
Django Tutorial for Beginners - 25 - Bootstrap and Static Files
11:08
Building Django forms with django-crispy-forms
12:20
BugBytes
Рет қаралды 49 М.