Using the JSONField in Django

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

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

  • @mohnark
    @mohnark 2 ปีที่แล้ว +3

    This is a pretty decent tutorial at the basic level. However, there are many things that may have been addressed a bit more in depth. It wouldve been awesome if you could guide with how to set a default dictionary for this field and return values in OPTIONS request

  • @kentu747
    @kentu747 4 ปีที่แล้ว

    Very cool, thanks for putting this out so quickly.

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

      You're welcome! Thanks for watching.

  • @yetanothername1131
    @yetanothername1131 4 ปีที่แล้ว +2

    thanks for the videos.. how do you read this data directly in django templates? could you please make a video to explain the steps?

  • @saludbella
    @saludbella 2 ปีที่แล้ว

    How to create json field whit a form in django.
    In my application I have a jquery dynamic field and the data that is generated with those fields, I would like to save it in json format.

  • @professionalfacepuncher8361
    @professionalfacepuncher8361 4 ปีที่แล้ว +7

    please make an example video on the new async views and middleware features in django 3.1
    people don't understand how big this thing is now we have fully async views,
    or at least that what i understand from the documentation, i could be wrong though.
    an explanation video will help alot of people,
    thanks in advance !!

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

    Hey, I'm not able to migrate the model with JSONField, its saying "SQLite does not support JSONFields." any suggestions?
    Thanks for ur time.

  • @alisherxujanov2100
    @alisherxujanov2100 3 ปีที่แล้ว

    good work bro, thanks for teaching

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

    How to update the jsonfield data?

  • @i701Dev
    @i701Dev 3 ปีที่แล้ว

    suppose lets say i had json data like
    {
    "reactions" : ["reaction1", "reaction2", "reaction3"]
    }
    how would i append a reaction to this and do .save() on a model?
    i have tried model[0].reactions["reactions"].append("new reaction")
    model[0].save()
    but it does not update

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

    can you explain encoder=DjangoJSONEncoder || and it's options?

  • @gabrielm7916
    @gabrielm7916 3 ปีที่แล้ว

    Thank you, helped me a lot!

  • @azurbizzz
    @azurbizzz 3 ปีที่แล้ว

    Nicely explained

  • @uzotammynwokoro
    @uzotammynwokoro 3 ปีที่แล้ว

    Lovely tutorial made easy. 🥂

  • @sany2k8
    @sany2k8 3 ปีที่แล้ว

    For postgresql it makes JSONB instead of JSON. So how can I do that?

  • @kardano.6114
    @kardano.6114 3 ปีที่แล้ว

    thanks bro, it's very useful .

  • @drennapete
    @drennapete 4 ปีที่แล้ว

    I have a JSONField in my DB, but my nested JSON queries don't seem to work. Is there a way to test whether the DB iis storing the data as JSONB vs regular JSON?

  • @randomclips3778
    @randomclips3778 3 ปีที่แล้ว

    Can i save an array in database without json?

  • @rangabharath4253
    @rangabharath4253 4 ปีที่แล้ว

    Awesome as always 👍😀

  • @omarhasan7622
    @omarhasan7622 3 ปีที่แล้ว

    thanks for the tutorial.

  • @ChrisHalden007
    @ChrisHalden007 4 ปีที่แล้ว

    Great video. Thank you!

  • @classicguy7813
    @classicguy7813 4 ปีที่แล้ว

    Can we assign a default value Sie?

  • @karthickkumar8371
    @karthickkumar8371 4 ปีที่แล้ว

    I want to learn flask but there many videos where to start plzz help me

  • @djvenkeyrao4923
    @djvenkeyrao4923 3 ปีที่แล้ว

    nice sir tq, sir can u make video on convert date into words in django

  • @ryan.aquino
    @ryan.aquino 4 ปีที่แล้ว

    its not auto suggesting on my end ?

  • @shahnwazhusain9967
    @shahnwazhusain9967 4 ปีที่แล้ว

    Hey Anthony,
    I've been struggling with django forms and ajax. If i submit a form with ajax i cannot validate it with django and there is alot of confusion regarding it. Can you please make a detailed video... I think I'm missing something...
    Must include the following points in video
    1. Form submission using ajax ie without reloading page
    2. How to validate form while submitting with ajax
    3. If I'm leaving anything must include it.

  • @TheAremoh
    @TheAremoh 4 ปีที่แล้ว

    Does this mean you can skip defining more fields in django? I mean instead of defining name, occupation, addresses. Would defining a field and call JSONify on it replace defining individual field?

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว

      Right, what Linh said. If you don't want to define regular fields, I recommend just using a NoSQL database. This JSONField should be used sparingly.

  • @rangabharath4253
    @rangabharath4253 4 ปีที่แล้ว

    Hi Anthony. I think it will be useful to develop simple api's easily. Is it correct. Please clarify. Thank u.

  • @sinancetinkaya
    @sinancetinkaya 4 ปีที่แล้ว

    Is this equivalent to a NoSQL database?

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว

      Not at all. It just emulates one feature of a NoSQL database. You still get all the advantages of working with a regular relational database.

  • @taihatranduc8613
    @taihatranduc8613 3 ปีที่แล้ว

    quality content

  • @Niloctronic
    @Niloctronic 4 ปีที่แล้ว

    The queries probably will be slow right ?

    • @prettyprinted
      @prettyprinted  4 ปีที่แล้ว

      Yes, depending on how you use it. That's why your data should be structured instead of random in the column. I recommend limiting querying the columns directly completely if possible.

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

    good mic

  • @jbray250
    @jbray250 3 ปีที่แล้ว

    This is awesome, although I'm having issues with using the JSONField in the form. I'll post an update if I figure it out, or I'd appreciate any input. Liked and subbed.

  • @aashayamballi
    @aashayamballi 4 ปีที่แล้ว

    Thank you!!!