I have seen many videos on Signal, but your one is the most closest to what I intend to achieve.
@pratikrane1495 жыл бұрын
12:16 SimpleIsBetterThanComplex. That django guy rocks!
@serdalaydogmus4 жыл бұрын
amazing explanation. thank you
@abhishektripathi68 Жыл бұрын
Can you please explain little bit about foreign key relation
@HardikPatelN Жыл бұрын
Foreign key is storing multiple records for one record in other table. Parent Child - FK(parent I'd) Parent can have multiple children
@vinodkumarkopperla22176 жыл бұрын
when i try to get u.profile it showing that u object doesn't has profile attribute, anything wrong???
@chip9114 жыл бұрын
This video tell exactly what i wamted to to but Can u please make a video on M2M key change eg what ids are added and what ids are removed from that M2M field, itll be great
@chip9114 жыл бұрын
@@HardikPatelN im new at this so can u refer some thing that will help..
@hrutujaranpise84826 жыл бұрын
while saving : u.save(). am geting this error :IntegrityError: UNIQUE constraint failed: auth_user.username.........can you plz help me to fix it?
@Magistrado19144 жыл бұрын
Excellent course 02/10/2020
@ashikurrahman88745 жыл бұрын
i can't understand user=2 because user is one to one field and may be user = User().here are you assign user=User. id?
@pratikrane1495 жыл бұрын
The user.id field automatically increments when the new user is created, therefore you don't have to explicitly enter value of user.id when registering user.
@85brijesh4 жыл бұрын
Sir, Thank you for your video. I tried the code for foreign key instead of one-to-one field. Its working when any new object is created but while I am updating the object, its not working. Can you explain it in more detail. It will be very helpful for me. Thank you.
@85brijesh4 жыл бұрын
@@HardikPatelN class PlatformFabCost(models.Model): facility = models.ForeignKey(PlatformTonnage,on_delete=models.CASCADE,null=True, blank=True) jacket_fab_cost = models.PositiveIntegerField(null=True, blank=True) def save(self, *args, **kwargs): self.jacket_fab_cost = int(0 if self.facility.jacket is None else self.facility.jacket) * (StrFabRate.objects.filter(active=True,structure_id = 1).values_list('fab_rate',flat=True))[0] @receiver(post_save, sender=PlatformTonnage) def create_platform_fab_cost(sender, instance, created, **kwargs): if created: PlatformFabCost.objects.create(facility=instance) else: instance.platformfabcost_set.all()
@85brijesh4 жыл бұрын
@@HardikPatelN While updating jacket field in PlatformTonnage, jacket_fab_cost is not updating
@85brijesh4 жыл бұрын
@@HardikPatelN Thank you sir.
@azerabishov13695 жыл бұрын
When i write "if created: Profile.objects.create(user=instance)" i get error such as "class Profile has no objects member". What is a problem?
@azerabishov13695 жыл бұрын
@@HardikPatelN ibb.co/YtKTp7r
@firstnamelastname46856 жыл бұрын
User object has no attribute profile. So, the line of code, else: instance.profile.save() has some problems Could you help me
@firstnamelastname46856 жыл бұрын
i know , i didn't get any problem creating a user, but when i want to access the admin page, this error pop out, But for one to one relationship, i do think User.profile should be working , because it is the feature of one to one, right? one to one automatically give both the User and Profile an additional attribute
@firstnamelastname46856 жыл бұрын
it is very clear , thank you sir
@firstnamelastname46856 жыл бұрын
may i kindly ask you one more question? Now i know how to extend the user. But I would like the user to fill in their additional information(designation, salary) in a different form after the sign up. How to do that?
@abdull78046 жыл бұрын
Hi Hardik, I am getting the error i.e UNIQUE constraint failed: auth_user.username, while giving that c=User(first_name="hardik") c.save()
@abdull78046 жыл бұрын
Ok, Thank you
@vinaykakanuru4 жыл бұрын
Hey Aarav I have tried many times but when I'm saving u.first_name i am getting user has no attribute profile attribute error can you please help me how to resolve this error
@vinaykakanuru4 жыл бұрын
Thank you Arav for quick reply. It is working now.
@VivekKBangaru6 жыл бұрын
this video is hard to understand. can you please clarify it again with the new. I couldn't able to understand..
@satyveersingh80265 жыл бұрын
Sir Kuch video main apki awaaj clear nhi h
@AnthonyPaulT5 жыл бұрын
Can’t understand shiet
@arunsharma47097 жыл бұрын
Ist
@VivekKBangaru6 жыл бұрын
Not a list. **kwargs is the Dictionary(key value pair parameters to the function!)