Django Tutorial - User Specific Pages/Access

  Рет қаралды 73,124

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 102
@craigchihururu3538
@craigchihururu3538 5 жыл бұрын
Thanks for the great staff content Tim :-), but there is no tutorial on how to deploy the projects that we made.
@ayushganguli1359
@ayushganguli1359 5 жыл бұрын
I have been trying to figure out this thing since long. Many tutorial exclude this part and it really becomes difficult to develop web application after that. Most tutorial teach you login and register but they exclude this part. The concept has been explained really well.
@tertiusvanbiljon3211
@tertiusvanbiljon3211 2 жыл бұрын
Thanks Tim. This tutorial has helped me tremendously and looking forward to moving on to many of your other tutorials.
@PlaneToTheBrainES
@PlaneToTheBrainES 5 жыл бұрын
Please cover custom user models too, if you can. Great content! Greetings
@edwardnovais7
@edwardnovais7 5 жыл бұрын
When I try to make migrations, I got this error: You are trying to add a non-nullable field 'user' to todolist without a default; we can't do that (the database needs something to populate existing rows). Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit, and let me add a default in models.py
@M4RCO25
@M4RCO25 4 жыл бұрын
have you found a solution yet?
@gustavvilaca
@gustavvilaca 4 жыл бұрын
@@M4RCO25 this worked for me stackoverflow.com/questions/31357346/error-you-are-trying-to-add-a-non-nullable-field
@yusufyildirim2438
@yusufyildirim2438 3 жыл бұрын
i said 1 and again it worked tried taht
@ezchu574
@ezchu574 2 жыл бұрын
add default parameter to the user model will solve this issue. Eg: user = models.ForeignKey(User, on_delete=models.CASCADE, default='1', related_name='todolist', null=False)
@YOUJOJOJOJO4
@YOUJOJOJOJO4 Жыл бұрын
Thank you dude@@ezchu574
@romamyronenko
@romamyronenko 6 ай бұрын
Thanks! This is the best django tutorial that I found!
@youngscientistacademy7689
@youngscientistacademy7689 3 жыл бұрын
Thanks Tim, this was an excellent series. Keep up the great work!
@hbk2015-r2g
@hbk2015-r2g 4 жыл бұрын
Hi Tim. Will you at some point be following up with a deployment tut?
@saarang7572
@saarang7572 4 жыл бұрын
Deployment Tutorial please? Btw great course :)
@oscarwignall9633
@oscarwignall9633 4 жыл бұрын
Hi Tim, love the videos! Any chance you could find the time for a deployment video?
@gaganjandu104
@gaganjandu104 4 ай бұрын
Glad I am introduced to django by you. It did not freak me out instead I am confident with this app template we made along with you. I am soon gonna be levelling up.
@Miggy97
@Miggy97 Жыл бұрын
Is there a way to fix this migration issue without having to delete your entire database?
@vikt0r_sha
@vikt0r_sha 4 жыл бұрын
Thank you so much. I am lucky to bump into your video, cause todolist site on django is my university's work. Thank you for explaining and showing everything!
@jackneely9404
@jackneely9404 5 жыл бұрын
I followed along without issue until this episode. "table main_todolist has no column named user_id" I don't understand why I'm getting this error.
@jackneely9404
@jackneely9404 5 жыл бұрын
Solved: Missing indentation before: "return HttpResponseRedirect("/%i" %t.id)" ============== in views.py
@jackneely9404
@jackneely9404 5 жыл бұрын
Steps taken: Deleted all instances of __pycache in directory Deleted all components of "migrations" folders in directory that were not __init__.py Deleted db.sqlite3 Performed makemigrations and migrate in command line Performed new createsuperuser in command line Side-effect: All database information lost (Users, Items, To do lists)
@GeneralBlorp
@GeneralBlorp 5 жыл бұрын
@@jackneely9404 Solved, yet missing all your data? That doesn't seem to be a great solution if you have to wipe your entire DB? A better solution is coding with an IDE so that you don't miss indentation issues!
@jackneely9404
@jackneely9404 5 жыл бұрын
@@GeneralBlorp I'm glad I coded this in Sublime, since it was my first time using Django and I'm learning, but I definitely plan on using an IDE for future projects. Which IDE would you use? Edit: I didn't realize there was an easier way to rollback migrations. "python manage.py migrate my_app ####_previous_migration" Etc.
@GeneralBlorp
@GeneralBlorp 5 жыл бұрын
@@jackneely9404 Oh I'm surprised that sublime didn't show you the indentation thing. I use PyCharm :) Great on any OS. Good point on the rollback - I'm glad you are continuing on your path and learning lots! Cheers.
@GAFM01
@GAFM01 5 жыл бұрын
When I clicked Create New... it doesn't show the added one
@rayganmudberry375
@rayganmudberry375 5 жыл бұрын
please make complete series of django tim. thank you and god bless you.
@JoeyJooste
@JoeyJooste Жыл бұрын
Thanks a lot for the intro to python. Super fun project even all 4 years later
@Eisenwächter
@Eisenwächter 4 жыл бұрын
Hey Tim.... I‘m Holger from Germany and I really like your vids. Thanks for sharing your experience. What I would really like to know more about is the deployment steps... I can‘t find good videos about how to deploy the whole package with python backend to a host/Webserver. Maybe you could make a video about it?
@tusharjain2659
@tusharjain2659 4 жыл бұрын
i am getting an error saying main_todolist has no column named user_id. Can anyone help me solving the problem?
@AnnaIsHere
@AnnaIsHere 2 жыл бұрын
OperationalError no such column: testapp_todolist.user_id Looks like now I have to delete the whole database
@markduffy3298
@markduffy3298 4 жыл бұрын
Great series thanks. Tim did you ever do a deployment vid as can’t seem to find one?
@deaglannolan8468
@deaglannolan8468 4 жыл бұрын
If you deleted the db.sqlite and pycaches and its not letting you register new users you need to do the following: I went into the terminal and typed "python manage.py shell" (after cd'ing to mysite) and then put >>> from django.contrib.auth.models import User user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') # At this point, user is a User object that has already been saved # to the database. You can continue to change its attributes # if you want to change other fields. >>> user.last_name = 'Lennon' >>> user.save()
@nilshbawiskar5998
@nilshbawiskar5998 4 жыл бұрын
Thanks Tim. You have detailed each part greatly. I was in need how to get user specific data. Thanks again.
@kylemacri7827
@kylemacri7827 4 жыл бұрын
Hey Tim, When I go to the create page and try to create new I get a 'AnonymousUser' object has no attribute 'todolist' error which then traces back to response.user.todolist.add(t). I log out and when I try to create a new user it seems fine however, when I try to login with that new user it gives me the "Please enter a correct username and password. Note that both fields may be case-sensitive." Despite just creating that user (I am definitely typing the username and password in correctly). So it seems like I am unable to login with any user including admin. You probably are unable to tell me specifically how to fix this but any help would be very appreciated.
@valeriaromanciuc1851
@valeriaromanciuc1851 4 жыл бұрын
I'm having this exact problem. Were you able to fix it? Thanks.
@valeriaromanciuc1851
@valeriaromanciuc1851 4 жыл бұрын
@Diego Yeah, I reached the same conclusion at the time and creating a new user did fix the problem. Thanks for the reply, hopefully this will help others with the same issue.
@M4RCO25
@M4RCO25 4 жыл бұрын
@@valeriaromanciuc1851 it did help me thankyou!!!!!!!
@deaglannolan8468
@deaglannolan8468 4 жыл бұрын
Heres how to fix iit. If you have successfully deleted all the pycaches and the db.sqlite then do the following: open the terminal (command prompt) and type "python manage.py shell" and then >>>from django.contrib.auth.models import User. >>>user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') # At this point, user is a User object that has already been saved # to the database. You can continue to change its attributes # if you want to change other fields. >>> user.last_name = 'Lennon' >>> user.save() This should work if you now try and enter johns details, you should also be able to register new users using the website too . Hope this helped :)
@MenegaT1337
@MenegaT1337 4 жыл бұрын
@@valeriaromanciuc1851 I'm having this same problem, can you explain what you did to solve it?
@999marigold
@999marigold 5 жыл бұрын
This tutorial was really very informative and cool :) thanks a lot!
@vanshbhardwaj4214
@vanshbhardwaj4214 4 жыл бұрын
Thanks , I was looking for this , how to get user specific objects in page.
@Alshafi
@Alshafi Жыл бұрын
Thanks Tim. At the beginning of this playlist, you said you would cover the deployment of the django website. I watched the whole playlist and that did not happen. Is there a video missing? btw, the views functions take request as an argument, not response.
@Timo-mo6or
@Timo-mo6or 5 жыл бұрын
Hey Tim, so I remember you saying in one of your previous videos you would show us how to host our website for free. Will you still get to that? If not, could you maybe point in a general direction with a link/company name? Thanks!
@ExploringThisWorld-123
@ExploringThisWorld-123 4 жыл бұрын
www.heroku.com/ this is the website he mentioned in previous videos I bet you could find tutorials online as well.
@tommy1149
@tommy1149 4 жыл бұрын
Hey Tim, I loved this tutorials. Could you make some a video on CustomUserModels? I'd love that!
@tarekhammami2350
@tarekhammami2350 5 жыл бұрын
Thanks so much, Tim, for your efforts. Wish you the best :))))
@justinlee3453
@justinlee3453 3 жыл бұрын
Hi Tim, just finished the series, gott say, I learned a lot, so thank you! If you have time, could you give a deployment tutorial! Thanks!
@hoangquyla4516
@hoangquyla4516 4 жыл бұрын
Please cover custom user models too
@quidpanic7095
@quidpanic7095 5 жыл бұрын
When do we get the deployment video?
@elikelik3574
@elikelik3574 4 жыл бұрын
Nice content. Thanks a lot for your efforts. I really appreciate it. By the way, did you do a deployment video? I could not find it.
@SoggyBagelz
@SoggyBagelz Жыл бұрын
should totally do a deployment tutorial ;)
@GeneralBlorp
@GeneralBlorp 5 жыл бұрын
Hm, I wish you would have commented on WHY you had to change those parameters, NULL=True and "related_name"... Changing your model to work around an issue you don't fully understand is often not the best solution, so why not comment on that decision and show why it's right in this case?
@AnetaGray
@AnetaGray Жыл бұрын
Is there a link for that deployment tutorial somewhere?
@mohammedfahadts
@mohammedfahadts 4 жыл бұрын
Can someone help me with this error: main_todolist has no table user_id I've tried everything but can't figure out why I keep getting this error
@nafiyad1950
@nafiyad1950 4 жыл бұрын
response.user.todolist.add(THE VARIABLE U ADJUSTED THE ToDoList to )
@mohammedfahadts
@mohammedfahadts 4 жыл бұрын
@@nafiyad1950 thanks
@adrianprofir95
@adrianprofir95 4 жыл бұрын
Thank you for this amazing tutorial!!
@mandyghadigaokar2167
@mandyghadigaokar2167 4 жыл бұрын
can you please create the tutorial for the how to share the private file to particular user. view wise codding
@moshikof7778
@moshikof7778 5 жыл бұрын
how did you learn how to code ? and how do you keep motivated with code ?
@victorlefeu
@victorlefeu 4 жыл бұрын
thanks very much! do you have a video explaining how to deploy django in IIS for instance?
@parvinkalantar2358
@parvinkalantar2358 4 жыл бұрын
Thank you so much. this video was so helpful for me.
@holimasandy2937
@holimasandy2937 2 жыл бұрын
Thank you for the tutorial. Can you please help with ecommerce, api and deployment tutorial
@ankitdtrital8666
@ankitdtrital8666 Жыл бұрын
can you create a small video on how to delete a to-do list or give me hint on how to do it. please!!!
@sarc007
@sarc007 4 жыл бұрын
Thanks for all your videos and tutorials it really helped. May god give you health wealth happiness and success in this world and here after. Ameen
@vignesh6585
@vignesh6585 4 жыл бұрын
Awesome tutorial
@hiraawan3430
@hiraawan3430 4 жыл бұрын
please upload more videos.. i want to know how to make upload files button and how to actually post and get on page?
@bikramshrestha4399
@bikramshrestha4399 4 жыл бұрын
Thanks bro Please make video on add to cart items.
@invalidsb
@invalidsb 4 жыл бұрын
Deployment Tutorial.. Sir..
@samsepoil5408
@samsepoil5408 4 жыл бұрын
Deployment tutorial
@vrl9037
@vrl9037 11 ай бұрын
Good series, thanks
@cristhiancasierra8265
@cristhiancasierra8265 4 жыл бұрын
You're awesome men!
@jordanrob4240
@jordanrob4240 4 жыл бұрын
thanks this is awesome though i wish you could show us the same concept but with class based views
@KrishnaManohar8021
@KrishnaManohar8021 4 жыл бұрын
Tim, please continue this series.
@cicadaislive9988
@cicadaislive9988 4 жыл бұрын
make more tutorials on this especially deployment and creating big E commerce websites and blog wiht Django
@dinokrivic5486
@dinokrivic5486 5 жыл бұрын
Should we delete all in those files or the whole file?
@dinokrivic5486
@dinokrivic5486 5 жыл бұрын
I think i had deleted something i shouldnt now nothing works.
@zhozhpeppa1449
@zhozhpeppa1449 5 жыл бұрын
@@dinokrivic5486 the same problem man
@dinokrivic5486
@dinokrivic5486 5 жыл бұрын
@@zhozhpeppa1449 have you solved that?
@jackneely9404
@jackneely9404 5 жыл бұрын
I shared my problem and solution in case it's relevant to yours.
@jackneely9404
@jackneely9404 5 жыл бұрын
@@zhozhpeppa1449 .
@azizallame3394
@azizallame3394 Жыл бұрын
thanks tim
@paulocarsten9216
@paulocarsten9216 5 жыл бұрын
this is what am getting - anyone 'name' is an invalid keyword argument for this function What is this 'name' parameter that he is giving in the
@ExploringThisWorld-123
@ExploringThisWorld-123 4 жыл бұрын
You have to have been following along with his videos. It is one of the columns in his database I believe. If you have something different in your database you will need to change accordingly
@ExploringThisWorld-123
@ExploringThisWorld-123 4 жыл бұрын
Hard to tell without seeing your code
@dillonbarnes232
@dillonbarnes232 3 жыл бұрын
2 years and still no deployment....
@sainco3036
@sainco3036 5 жыл бұрын
thanks.
@sayamrahmanrobin2969
@sayamrahmanrobin2969 4 жыл бұрын
good good very good
@MrElectrecity
@MrElectrecity 4 жыл бұрын
Hi Tim I really love your work but in this video it was disappointed (:
@urbainquentin1663
@urbainquentin1663 2 жыл бұрын
Hello Tim i am still having this error even after running migrations no such column: app_todolist.user_id
Django Tutorial - User Registration & Sign Up Page
25:18
Tech With Tim
Рет қаралды 111 М.
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
Django Tutorial - Custom Forms
14:33
Tech With Tim
Рет қаралды 59 М.
Please Master This MAGIC Python Feature... 🪄
25:10
Tech With Tim
Рет қаралды 86 М.
Django Authentication & User Management - Full Tutorial
2:20:03
Tech With Tim
Рет қаралды 189 М.
Django Tutorial for Beginners - Build Powerful Backends
1:02:36
Programming with Mosh
Рет қаралды 2,8 МЛН
How to Handle User Authentication in Django
26:39
Matt Freire
Рет қаралды 86 М.
Django Tutorial - Login, Logout and User Authentication
13:44
Tech With Tim
Рет қаралды 133 М.
Django Tutorial - SQLite3 DataBase Tutorial
22:49
Tech With Tim
Рет қаралды 185 М.
Django Tutorial - Simple Forms
21:56
Tech With Tim
Рет қаралды 80 М.
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН