Please make a video about multi user login and sign up. And protecting different routes from different user types.
@DanielFeldroy4 жыл бұрын
That's a great idea! Thanks for the suggestion!
@clervilmilly87514 жыл бұрын
Thanks Daniel ! Icant wait for that video
@paulocarsten92164 жыл бұрын
Am still waiting for thais
@Filmmshorts4 жыл бұрын
@@DanielFeldroy just subbed. Would be super interested in this topic as well and thank you for all your help. Loved django crash course
@giomsc3 жыл бұрын
still waiting too
@georgesmith30223 жыл бұрын
This video is a pure gold. Please make more videos for multiple user types
@rupeshchaulagain92993 жыл бұрын
I don't why why but the intro music made me hit the like button instantly.
@xamifour68503 жыл бұрын
Fantastic! you speak clear and moderate for beginners to understand. Kindly come out with video to explain multiple user types, that allow user to be buyer or seller, or both. Thanks, and regards to Uma.
@djtoon8412 Жыл бұрын
It s a long ago but it is still worth in 2023.Please make a video on how to handle Multiple User types for a single user as you insited in last part of this video.
@melissatamplin4 жыл бұрын
Thanks so much - and great intro by Audrey :D This is great content, I will definitely come back to see what other surprises Django has for me. Your book is great too btw :)
@mohsenhassani4952 жыл бұрын
Thank you Daniel, both for this video and Multiple user types video
@fabricejaouen42523 жыл бұрын
Thank you very much: you have such an attractive pedagogy ! What I just miss is how to set permissions with your approach, however one of the very best videos on Django I've ever watched. I'm enthousiastic.
@amtawfiq3 жыл бұрын
I've been looking for this for days. Thank you so much.
@ezekielminja5713 Жыл бұрын
Thank you so much...can you also make a video for multiple users as you suggested, i d really appreciate it
@the_street_coder44332 жыл бұрын
great tutorial Sir, I have been seated here wondering why you are using type as a field when type is a python built in function, you will be breaking the naming convention and overwritting the built in `type` function.
@lionelmuskwe2 жыл бұрын
Thank you so so much. I subbed straight away. This was lucid and concise
@abhishektayal4802 жыл бұрын
Thank you so much sir. I had a hard time understanding proxy models. Now I have a clear idea about them. Great explanation.
@bentwite30934 жыл бұрын
Thanks for this helpful video :) Can you please make a tutorial that talks about multiple type choices?
@tyrisnolam3 жыл бұрын
hi! I'd love to learn more about the implementation using ArrayField. Great video, very clear explanations, thank you! subscribed
@remy85874 жыл бұрын
"type" is reserved in python that is why it is highlighted differently than "name" for example. Many people advice against using that, do you think it's not important?
@michaelhays4 жыл бұрын
It should be fine, see this answer: stackoverflow.com/a/10516154/3414529 And also the most upvoted comment on that answer: "Django creates a field named id and id() is a Python build-in function. Nobody confuses the two."
@DanielFeldroy4 жыл бұрын
Because it's an attribute it's okay. If it were a function or variable name at the root scope it would be a problem.
@mosalam2083 жыл бұрын
please upload a video about the multiple user types using this same method and if possible how to connect them in a permission , thanks alot
@djangodeveloper29734 жыл бұрын
OH MAN YOU'RE AMAZING. BE BLESSED.
@DanielFeldroy4 жыл бұрын
Thank you! You too!
@IqbalArain-io3du8 ай бұрын
Thanks Seniore :) You are such a lovely person.
@CaseyFahey10 ай бұрын
Just what i needed, thank you!
@abdullahsifat91564 жыл бұрын
I used proxy models for multiple user types... I've seen people always complicates like you've said in the earlier phase of video
@DanielFeldroy4 жыл бұрын
Great minds think alike!
@konakziyaemre2 жыл бұрын
Loved your videos. Can you also do a video about how should be a product and variant models in Django. I’m struggling doing it because a variant should take a dynamic attributes and values. Which means user should be able to add a attribute by himself such as color or size and also user also should be able to add values to these attributes such as small, medium or black, blue. I really don’t know how to do it and I believe you definitely have an idea.
@gerryfrank17864 жыл бұрын
Please make a video implementing multi login and signup.
@eduardolucas3914 жыл бұрын
Brilliant! Well done and keep up this wonderful work.
@ohidotg4 жыл бұрын
Hi Daniel, thank you so much for this.
@DanielFeldroy4 жыл бұрын
Glad you like it! Your channel looks good!
@bixber44318 ай бұрын
How I make additional fields for any type of User? It need me for Online School with profiles of Users.
@agustinsabas Жыл бұрын
Hi! I have a problem in my code.. Django doesn't send the email activation when i create a user with proxy model. Do you know why?? Help me 🙏 Thanks for this videos!!
@alaatahakhoja67843 жыл бұрын
Very useful and elaborative. THANK YOU.
@Sharmazan4 жыл бұрын
Thanks a lot for the explanation. It's crystal clear now!!!
@joshuahadap23733 жыл бұрын
Thank you so much, perfect for my capstone.
@ankitkumar-mv9bw3 жыл бұрын
Hey, I'm getting ValueError: Cannot force both insert and updating in model saving.
@phoexer4 жыл бұрын
Be grateful you weren't stuck in an awkward position like mid-fall or making an "expression".
@DanielFeldroy4 жыл бұрын
Ha ha ha!
@Apoorvpandey6 ай бұрын
How to add spy and driver specific data fields? For example I want SPY to have a mission = charField and driver to have a rating = integerField , these fields should not be there in User table
@mohhammadmohhammadi58483 жыл бұрын
I laughed a lot and was happy. Thank you, man
@natanfelipedefreitassouza8703 жыл бұрын
Thank you! This tutorial is awesome.
@kashaxx3 жыл бұрын
Danny, I'm confused about this. I see a subclass to AbstractUser but doesn't it imply that there are authentication fields built-in i.e username, password with their defaults set, (also the clumsy first_name, last_name) right? the way these models are created I don't see you providing either username/password and create user records, or maybe it is only a requirement for using Django admin? and what about making instances at runtime.. do I need entirely different forms or model forms that can adapt. I'm curious will try this and comment back
@nimda2sdfsdfsd2 жыл бұрын
Great Video, Clear talk, fantastic explanation. Also put a video on Django built in Groups, Another question is if we have groups, cant we achieve with groups whatever you have done with proxy models.
@inselmanu2 жыл бұрын
This i want to ask, too
@abhishektayal4802 жыл бұрын
We can but we won't be able to user different methods like 'whisper' and 'accelerate' for different users. Proxy models are used to define different characteristics from a single model without created a new table in db.
@meuhmeuhmeuhify4 жыл бұрын
Hey. Thanks for your work and your videos ! I've bought almost all of your Django books and happy to see you streaming now. If I would have done this before, i would probably have used an Abstract user Model and inherits from it. Would a Proxy model be the best choice if all the children models have the same attributes ? Should I switch to an abstract parent model if my children have different attributes ? Thanks and keep the good work.
@DanielFeldroy4 жыл бұрын
If all the types have the same data, use Proxy models. If there's a difference in data, use OneToOne model relations. I've got a follow up video coming out later this week that will explain how. :-)
@Snowflake012103 жыл бұрын
Hello, Thank you for your good video tutorials. Can you create a video tutorial on a School Management System's user types (Admin, Teacher, Student, Parent which they will have different fields) with different access permissions and views and dashboards.
@phiberjenz4 жыл бұрын
Hey Daniel, Thank you for this enlightening video! Would it be straight-forward to apply the same concept of proxy models but using an ArrayField in order for a user to have multiple types? Any pitfalls to know about? Would love to see a video about that as well.
@bazwa6a2 жыл бұрын
very valiable info.. thanks
@sauravadhikari22853 жыл бұрын
Great Video man, thanks !!
@wadleo4 жыл бұрын
Awesome video sir
@DanielFeldroy4 жыл бұрын
Much appreciated? How are you doingv these days?
@wadleo4 жыл бұрын
@@DanielFeldroy I'm doing great sir
@IqbalArain-io3du8 ай бұрын
I am working this exact same situation, where I need Teacher, Admins, Students and Parents. 4 models
@whichdude4204 жыл бұрын
Interesting way to implement multi user into a system. Thanks for sharing! Do you mind making a tutorial on how to implement push notification with django rest framework? Thanks in advance..
@namwanzaronald9436 Жыл бұрын
Learnt something very interesting to use in my project, thanks for the wonderful presentation. However, I have one question to ask here, let's say under Spy in the User model we have got other roles eg writer, viewer, commentor etc [list of other roles] - can this be achieved just like we created a whisper method ? , how would the spy class that inherits from the User class look like? Thanks.
@thegrowers4204 жыл бұрын
How bad would it be to just use bool and char fields to differentiate between users and their permissions? Thanks for sharing your knowledge by the way, I'm self taught and it hasn't been easy to figure out the best way to do things. Really need to read your book
@DanielFeldroy4 жыл бұрын
That works, but more fields means more stuff to remember. I like keeping things simple and with just one field. Either a choice, ForeignKey, or ManyToMany field. That's arguably more normalized too.
@thegrowers4204 жыл бұрын
@@DanielFeldroy thanks for the reply. I was worried I was just being stupid by doing that lol. I worry that my code is sloppy or just plain crappy and I won't know the verdict until someone tells me how my code is, I code with scalability, other programmers and future me in mind but I can't know if I'm doing it the right way lol. Thanks again for imparting your knowledge!
@arields274 жыл бұрын
With handlers declared that way, the StackedInline in the admin throws an error. How can I fix that? Thanks.
@thomas-sinkala4 жыл бұрын
New to Django and building events with admin(the user who creates the events) and participants. Any idea how to structure the Model. Any user can be an admin if they created the event or a participant if they were invited to join.
@DanielFeldroy4 жыл бұрын
class Event(models.Model): admins = models.ManyToMany(settings.AUTH_USER_MODEL, related_name="admins") attendees = models.ManyToMany(settings.AUTH_USER_MODEL, related_name="attendees") That's a straight-forward approach that with some debugging of my pseudocode should workl. I don't believe you have two user types, rather two different ways for people to participate in an event. Does that help?
@thomas-sinkala4 жыл бұрын
@@DanielFeldroy Thank you very much Daniel. You're a lifesaver
@DanielFeldroy4 жыл бұрын
@@thomas-sinkala I'm happy I could help!
@infinitx13303 жыл бұрын
Is it possible to create a custom user that authenticates only using a password ( and doesn't require a second field like email etc) ??
@TheRedEnt3 жыл бұрын
Hi Daniel Feldroy you are just awesome your tutorials are amazing. Daniel can you make a video like amazon has two type of users one Customer and another Seller how we can differentiate them both have the same User Model for authentication but signup process and permissions will be different same like amazon. Please make it if you have time.
@johnrperry58973 жыл бұрын
I'm halfway through the video so I'm sorry if you mention this in the second half, but what's the difference between setting the `abstract` parameter to True (in class Meta) vs setting the `proxy` parameter to True?
@Julio-cz9cg4 жыл бұрын
Does this approach work to create users such as a SPY (and their custom fields) with a single POST request? Instead of first a request for User and then a request for Spy? I'm using DRF.
@FabioCaritasBarrionuevodaLuz4 жыл бұрын
Good work. Thanks
@ThukuWakogi3 жыл бұрын
so, is shell_plus inbuilt in django or one makes it
@amircodes4 жыл бұрын
Thanks Daniel, It was great. Can you please offer me a book/resource to understand django in depth?
@slawikus19823 жыл бұрын
I wonder how one can use this approach to actually log in users of different type and get them info self.request.user - because by default it'll log in using the base class User, so it will not be possible to call "more" method of the child classes
@anonymoustroll80624 жыл бұрын
Hello sir? I know python 3 for almost half a year I just want to try some web frameworks so.. two scoops with Django 3 was good for beginner like me? If it is not good for beginner. Kindly send some links for Django book for beginner.
@DanielFeldroy4 жыл бұрын
Try this tutorial: www.feldroy.com/products/django-crash-course
@pranavichandra64394 жыл бұрын
It's a great video hoping to see more in the future :) I am new to Django and still trying to wrap my head around it. here are a few queries I got type change in database could swap their roles completely, is it a good thing to keep different users in same table? In my case I have Customers, B2B Users, Admin user types. Is it possible to achieve different authentication mechanisms with the proxy approach eg: login with email for SPY, login with registered id for Driver? SPY, Driver can both login as Admin since both are auth.User, How can we stop it?
@deobyeol80833 жыл бұрын
Can I add fields in Spy and Driver model?
@RiskyCoder4 жыл бұрын
Great job. when 2nd part is coming?
@DanielFeldroy4 жыл бұрын
I hope to roll it out this weekend.
@RiskyCoder4 жыл бұрын
@@DanielFeldroy I see that GitHub repository has been updated but still did not get any video on it. When we will have it ? I have recommended someone this video to manage multiple user types in Django and they are waiting for the 2nd part.
@caringangels124 жыл бұрын
With this implementation can I display different forms for different user types ?
@siyapandey87992 жыл бұрын
Thank you so much
@bitchain3 жыл бұрын
Stumbled across an issue with saving a user in Admin because normalize_email was not a method which is expected on an AbstractUser subclass - solved by e.g. SpyManager extending from django.contrib.auth.models import UserManager
@zakchips4 жыл бұрын
Can I use this approach if spy can be one time a spy, and another time a driver. and visa versa another time. the same for a driver. Thanks in advance.
@DanielFeldroy4 жыл бұрын
You mean have a ManyToMany relationship? Absolutely!
@danielcardenas90044 жыл бұрын
Hi Daniel, I have been following this tutorial, first of all, very nice job, second when I try to create a Driver from the admin panel I get the following error: 'DriverManager' object has no attribute 'normalize_email' It is very odd and haven't been able to reproduce it, I'd love some insight (I literally took the github source code and paste it on my models to fully understand the workflow but I got that error) Thanks
@quizy1014 жыл бұрын
Same here, whenever I try to create from the admin site I get the "object has no attribute 'normalize_email'". Anyone else know how to work around this?
@DanielFeldroy4 жыл бұрын
Weird, I don't get that. Can either of you share your repo?
@quizy1014 жыл бұрын
@@DanielFeldroy I figured it out, instead of the manager inheriting `models.Manager` I changed it to be `class DriverManager(BaseUserManager)` and that cleared it right up! Thank you for the videos!
@visheshmangla26503 жыл бұрын
what is the use of `not self.pk`?
@skumpuntele89414 жыл бұрын
What if different user types have some different attributes? What would be the best approach in that scenario?
@DanielFeldroy4 жыл бұрын
I'll be recording that exact scenario in my live stream at twitch.tv/danielfeldroy. I'll take the recording of that and post it here on my channel later this week. :-)
@django38613 жыл бұрын
@@DanielFeldroy Thank you so much
@roficakep4 жыл бұрын
Please make a video from scratch, step by step django project using multi user login with custom user model. thanks.
@surajthapafc4 жыл бұрын
Thanks sir
@DanielFeldroy4 жыл бұрын
You 're welcome! Tell me what I can do better!
@karelantonioverdeciaortiz56184 жыл бұрын
Hi, what software did you use to record this lesson?
@DanielFeldroy4 жыл бұрын
Streamlabs OBS
@vincentroye Жыл бұрын
Hi Daniel, What would be the easiest way to allow a user to be a spy and a driver? or eventually 10 different user types?
@maxkeogh11 ай бұрын
I too would like to know how best to implement multiple user types per user. In this video you mentioned using an array. Are there any clues to do this in Two Scoops? If you don't have time to do a separate video do you know of good resources that explain this? Cheers.
4 жыл бұрын
Powerful!
@DanielFeldroy4 жыл бұрын
Glad you liked it!
@LiaAdzumi4 жыл бұрын
Hi, Thanks for showing multi users. But please put it in real world simple app. Thanks again. BR, Nyoman
@jhoniemusic4 жыл бұрын
may i know what is the meaning of _('Type"). thank you
@bikerboy5824 жыл бұрын
translation
@lessentiel2212 жыл бұрын
Example with AbstractBaseUser
@rafaeldiasmartins4369 Жыл бұрын
Yeah, boy! Look, it great, but if the user is a driver and a spy? Could you give a hand with taht?
@nischalstha94 жыл бұрын
Great!!
@jhoniemusic4 жыл бұрын
raise TypeError("%s cannot proxy the swapped model '%s'." % (name, base_meta.swapped)) TypeError: Rider cannot proxy the swapped model 'Accounts.Account'.
@jhoniemusic4 жыл бұрын
don't worry about this. i got it. its my mistake
@kimkimathi23123 жыл бұрын
User has no attribute name 'Types ' what might be the problem with your code
@kimkimathi23123 жыл бұрын
This is after I implement the code by AbstractBaseUser
@thatsenoughdixit4 жыл бұрын
I just want admin and user 🤣
@mmkmmk99454 жыл бұрын
create job
@DanielFeldroy4 жыл бұрын
Thank you!
@Demtri-mp1oc11 ай бұрын
Lets gather here spies. :)
@dennielluissadian50264 жыл бұрын
Hi? Who is she? What's her nationality?
@DanielFeldroy4 жыл бұрын
That's my wife, Audrey Feldroy. She is also a programmer, writer, mother, went to MIT, and is very smart. If you ever use Cookiecutter or djangopackages.org you can thank her. 🙂
@DanielFeldroy4 жыл бұрын
She is Filipina/Indian.
@dennielluissadian50264 жыл бұрын
@@DanielFeldroy OMG! I'm a Filipino! Both of you are so cool!