Creating Users, Profiles, & Follows - Django Wednesdays Twitter #2

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024

ความคิดเห็น • 30

  • @Codemycom
    @Codemycom  ปีที่แล้ว

    ▶ Watch Django Wednesdays Twitter Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/3BA5c6i 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 50% off with coupon code: youtube50 bit.ly/2VC9WUN
    ▶ Get The Code
    bit.ly/3PrSIDy

  • @collinslife7021
    @collinslife7021 ปีที่แล้ว +1

    Tutorial is so so helpful. Your amazing man.
    Really means a lot with your django lessons

  • @nickkirdev
    @nickkirdev ปีที่แล้ว +1

    Thanks for your video!:) Waiting for the next one!

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      Happy to hear it!

  • @mrdapoyo
    @mrdapoyo 8 หลายเดือนก่อน

    Great video! Totally worth the sub. Gotta replicate twitter, sirs >:3

  • @joerobinson8339
    @joerobinson8339 ปีที่แล้ว

    Still excited that Django Wednesday is back. I am hoping that there will be some HTMX coming in on this one 🤞

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      Sorry, don't know what HTMX is

  • @prakharkulshrestha8467
    @prakharkulshrestha8467 ปีที่แล้ว +1

    When i am unregistering the group model it is showing me the error stating that it is not register
    Can you help me with this?

  • @tanmaypatro1266
    @tanmaypatro1266 7 หลายเดือนก่อน

    Hey John, this video was very helpful.
    Although, I have a question... How do you convert the user = models.OneToOneField(User, on_delete=models.CASCADE) to be used with ForeignKey.

    • @Codemycom
      @Codemycom  7 หลายเดือนก่อน

      That is the foreign key. the onetoonefield.

    • @tanmaypatro1266
      @tanmaypatro1266 7 หลายเดือนก่อน

      ​@@Codemycom See I'm trying to make a to-do list website and link the to-dos to the user...When I replace the OneToOneField with ForeignKey and set null to False, it gives me an error saying that null can't be False or something

  • @Sandeshpd
    @Sandeshpd 7 หลายเดือนก่อน

    @4:30, how do you show Email column along with username? I tried fields = ['username', 'email']. No success..

  • @christian37ism
    @christian37ism ปีที่แล้ว

    Thank you I always learn so much from your videos. Do you happen to know how to retrieve a Django quersyset and grab its field values in JSON format?

    • @Codemycom
      @Codemycom  ปีที่แล้ว +1

      I don't have any videos on that

  • @zeeshanhaider3706
    @zeeshanhaider3706 ปีที่แล้ว +1

    love from pakistan

  • @amancharahul5008
    @amancharahul5008 7 หลายเดือนก่อน

    Sir I want to build an real time social media application(as linkedin)using frontend(html,css,js), backend(django,python),postgre SQL. Is it possible and does it run in real time if yes how?

    • @Codemycom
      @Codemycom  7 หลายเดือนก่อน

      Sure it's possible, using the normal functions of those things. Just learn Django.

  • @amaurirodrigues8798
    @amaurirodrigues8798 ปีที่แล้ว

    If I use Ubuntu, how to replace winpty?

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      just use the regular terminal

  • @symb0l248
    @symb0l248 ปีที่แล้ว

    where is the souce code there is no pin comment :(

    • @Codemycom
      @Codemycom  ปีที่แล้ว +1

      Check again

    • @symb0l248
      @symb0l248 ปีที่แล้ว

      @@Codemycom thanks

  • @akifakif6031
    @akifakif6031 ปีที่แล้ว +1

    Thank you for this tutorial series. I wanted to add a method to Profile class to prevent a user to be able to follow himself/herself. Is it ok?
    class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    follows = models.ManyToManyField('self', related_name="followed_by", symmetrical=False, blank=True)
    def save(self, *args, **kwargs):
    # Prevent the user from following themselves
    if self.pk:
    if self.follows.filter(pk=self.pk).exists():
    raise ValueError("A user cannot follow themselves.")
    super().save(*args, **kwargs)

  • @dakoderii4221
    @dakoderii4221 ปีที่แล้ว

    Does this line get executed every time I start the server? Or does Django see no reason to run it again so it bypasses it?
    # Unregister initial User
    admin.site.unregister(User)

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      yeah, all the code always gets executed.

  • @Codemycom
    @Codemycom  ปีที่แล้ว

    ▶ Watch Django Wednesdays Twitter Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/3BA5c6i 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 50% off with coupon code: youtube50 bit.ly/2VC9WUN
    ▶ Get The Code
    bit.ly/3PrSIDy