Filter Form Table Search | Django (3.0) Crash Course Tutorials (pt 12)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024

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

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

    Don't forget to check out my Complete Django course! dub.sh/NvGboTI

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

    Finally someone that is showing somewhat real world examples of a dashboard instead of the 'blog'. Really good job on this. Thank you...

  • @Esteban2812
    @Esteban2812 3 ปีที่แล้ว +6

    According to the problem in 12:32:
    You can edit the order_form.html to fix the "Update order problem". below the {% csrf_token %} tag, you must type:
    {% if formset %}
    {{ formset.management_form }}
    {% for form in formset %}
    {{ form }}
    {% endfor %}
    {% elif form %}
    {{ form }}
    {% endif %}
    Hope it helps. Thanks Dennis for your videos, regards from Colombia.

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

      You are a godsend my guy. he never covered it again.

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

      So what we did here is if we have a formeset, we render that, else we just render single form which other views are requesting? right?

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

      i created a separate update form page rendering 'form', not sure if thats the best but it works

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

    Thanx man,only coze of ur way of teaching i'm now actually able to create my own projects🙏🏻

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

    Have not even finished watching this video... and am already excited with how you are breaking things down

  • @hamza-325
    @hamza-325 4 ปีที่แล้ว +12

    For the people who want to search by the name of the product by typing, without adding the notes as he did, you can just add this line:
    product_name = CharFilter(field_name='product__name', lookup_expr='icontains')
    to the OrderFilter, and add 'product' to the list of exclude.

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

      Hello sir,can you explain why field_name should be 'product__name'? I mean I don't see any field with name 'product__name'. Have a good day sir!

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

      @Hamza Abbad could you answer him?

    • @hamza-325
      @hamza-325 3 ปีที่แล้ว

      'procduct__name' is a built-in feature in Django, it simply means the attribute 'name' of the object product.
      It has been a very long time since I put this comment so I don't remember what is in this video. I am not even programming a lot in Django these days.

    • @polarization-0
      @polarization-0 ปีที่แล้ว

      the double underscore (__) means that we are accessing a parent-chield relationship. product__name means, we are accessing through our "Order" model, but we are accessing the attribute product (from the Order model) and then accessing the "name" attribute from Product model.

  • @egwuemijerryjude7287
    @egwuemijerryjude7287 3 ปีที่แล้ว +9

    HI Dennis, your style of teaching is so amazing, your tutorials are wonderful and helpful to beginners thanks so much, this is python django made easy.. i have been following up with the tutorial sequentially, however the pagination video pt 13 is missing, pls do us a favour to upload it soon..thank you for your great work

  • @sigmadews5403
    @sigmadews5403 4 ปีที่แล้ว +3

    Hi Dennis, I just wanted to tell you that your tutorials are the most useful since almost no one is covering the enterprise-level web apps. I just started with django 2 weeks ago and learned A LOT from you. Wish you all the best, I really appreciate your effort!
    EDIT: Does anyone know how to change the expression 'contains' on the front page to something else (translation to another language/delete it...) at the field with lookup_expr='icontains' ?

    • @diegohuareza.2488
      @diegohuareza.2488 4 ปีที่แล้ว +1

      Use-> date = CharFilter(field_name="date", lookup_expr='icontains', label="ITS_######FREE_TEXT") , with label edit labeltext

  • @cesarf.7587
    @cesarf.7587 3 ปีที่แล้ว +1

    Dude! Thank u so much for this video. I've been looking for this since 3 weeks ago. You're a LIFESAVER!!!!! THANKSSS

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

    welcome back dennis. did not get the notification i had to search. anyway you rock it as always. i really appreciate you. thanks alot.

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

      Thank you Raygan! It’s good to be back :)

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

    This filtering method was amazing !!!! You explains everything perfectly. Keep it up

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

    Thanks a ton man...

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

    Thank you so much! This series is so helpful for learning django!

  • @kken8766
    @kken8766 4 ปีที่แล้ว +10

    Hi, I have been following along the tutorial and notice that part 13 is missing.
    Great Video

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

      YES!!!! WHY IS IT MISSING!?

  • @nourhacker3734
    @nourhacker3734 4 ปีที่แล้ว +44

    Hi Dennis,
    Thanks for the tutorials, they are very helpful!
    I was wondering about "lecture 13", I think you forgot to upload it. Is it so or you are still working on it?

    • @davidbrown2806
      @davidbrown2806 4 ปีที่แล้ว +3

      I looked at the future code in the repository, and it does not appear that there is any pagination code. I could be wrong, but that's how I see it.

  • @smit764
    @smit764 3 ปีที่แล้ว +5

    Hi Dennis,
    Thanks for the tutorials, it's very helpful for me
    I have a question about ModelForms How can I customize FormSet, Form & Filter by using bootstrap

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

    This was the thing I was wildly searching for. I need to implement something like a chain filtering to my project.

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

    i love the way you teach

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

    Thanks again for the series, just missing the pagination video, please consider including it

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

    built in Django filters are awesome! thanks Dennis!

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

    thank you so much, searched everywhere for this

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

    I don't know how to Thank you enough

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

    Great Video. Very expecting to next.

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

    Thanks Dennis. I have been learning a lot from you

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

    Thank you so much dear! We need more advanced projects also.

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

    Huge respect to you for this course, it allows me to have more comprehension by real practice without waisting time, all staff i learned here i can use them very well, just this part of filtring didn't work for me, i tried severel time the same thongs you do without result, so i will appreciate really if you have time to see my code. cause i really need that ( excuse my english cause here we speak frensh).

  • @sdtk9635
    @sdtk9635 5 หลายเดือนก่อน

    Thank you very much for this video, helped a lot

  • @valerapelenskiy5015
    @valerapelenskiy5015 4 ปีที่แล้ว +8

    hi, thank you for your amazing tutorials. I'd like to ask you to make a lesson about Django-Tables2 or other data tables with filtering, sorting, paginations. With the ability to select all rows and do some actions with selected rows. Imagine that you have 50,000 products or more and you need to import them into a file or change the status for everyone.

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

      i need it now

  • @polarization-0
    @polarization-0 ปีที่แล้ว

    In the lookup expression, 'icontains' does not "exclude case sensitivity". It checks whether the characters I'm searching with, are present in that particular field or not.

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

    So far, so great
    Pagination !! please😀

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

    who couldn't fix update function in the dashboard you should:
    create new update_order.html as in 10 th lessons order_form .html
    in def updateOrder() you should render it to update_order.html

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

    lookup_expr="lte", is not working as you said, it return the orders which are lesser than the date but not on that day. Do you know why is this happening.

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

    Thanks a lot!! But I'm having troubles with ForeignKey... I just can see the ID labels like Model Object (1), Model Object (2), Model Object (3)....Model Object (16). But the filter actually works.

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

    Always amazing content and easy to follow! Thanks

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

    nice sir ple give solution for the drop down that includes a "-----" replace with placeholder

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

    I'm getting error when I try to add django-filters in installed apps... Please help

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

    @1:10 you can use "python -m pip install django-filter" if you have an error when trying to run the server.
    The error is: ModuleNotFoundError: No module named 'django_filters'
    This is because the pip script you are running is not installing modules for the interpreter that the python command is using.

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

      it still not working !! any help?

  • @janbertcampos
    @janbertcampos 8 วันที่ผ่านมา

    sir it would be nice to make a tutorial about django-filter + ajax table like if filter happend the page will not refresh

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

    In this video you have told in the end that next video will be for pagination, however that video is not there, I.e video no. 13 is missing it seems.

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

    You are great. Thank you very much

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

    Such useful videos, thanks so much for making these

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

    Man, I love you so much! Thank you for that.

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

    Excellent job. Congrats!

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

    Hi Dennis what I learn form you as a beginner, I did not learn in school. Thank you. You are the CHAM

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

    0:01 Intro
    0:58 Filter Installation
    1:38 Create Filter Form
    3:36 Rendering Filter Form
    8:20 Date Range Filter
    Note: www.notion.so/12-Filter-Form-Table-Search-f6c316bdb37741c785bff1f642637056

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

      good

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

    You are a great guy. God bless you Guruji.

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

      Thank you Sager :)

  • @akinyelewilliamo.617
    @akinyelewilliamo.617 2 ปีที่แล้ว

    Hi Dennis. Thank you for this tutorial. It’s really been helpful.
    I can’t seem to find the part 13 of this series. Kindly help pls. Thank you.

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

    Hey, I have solved after reading through the documentation over and over again.
    Thanks still.

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

    Thank you dennis this is awsome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

    Excellent

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

    Thanks to Dennis

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

    Anyone else have issues importing django_filters? I can't seem to get it working, dispite pip-ing to my heart's content.
    EDIT - SOLVED!! The django_filters library doesn't work with django >3.0 so I had to downgrade to Django 3.0 by running:
    pip install "Django=3.0" --force-reinstall

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

      I have downgraded to 3.0 still not working

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

      @@RaviShankarvirat have you fixed it? I am encountering the same issue

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

      @@juliuserictuliao5212 Ya i have fixed it.Please let me know what error you are receiving

  • @JP-zq2js
    @JP-zq2js 4 ปีที่แล้ว

    wow!!!!just awesome man!!!!

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

    Thanks

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

    Thanks Dennis!

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

    Can you implement a date-picker in the date input fields?

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

      I’ll do this in its own video. Many different ways to accomplish this.

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

      @@DennisIvy Thanks Man!

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

    you are the best

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

    Wanted to notice one issue: we based "update" button on "create_order" functionality, so after this lesson when i push it it shows nothing. Because to update any order we still sending 'form' but in new template for "create_order" we don't render {{form}} any more (we render {{formset}}). So it can be fixed realy quick: we need to create "update_order.html" template (which is a copy of "create_order" but with only {{form}}). Thanx for another cool video, by the way!

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

      I noticed Dennis Ivy didn't solve the issue and I did exactly as said in this comment. But I still have an error.. On the browser the error is: TypeError at /update_order/1 returned type non-string (type NoneType)
      On the console I get the error: ProgrammingERROR: Cannot operate on a closed database.
      Pls help I'm stuck.

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

      It is working. Thanks man

  • @user-qv7rw7dq1d
    @user-qv7rw7dq1d 4 ปีที่แล้ว

    Awesome. Thank you!

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

    Great job bro

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

    this is the best

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

    My hero

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

    thanks

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

    Fetch with filters what u want and apply union function , and render them simple.😁

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

    Hi Dennis. Amazing videos. How would you apply a search for a customer ID, not just name. As it is possible that customers may have the same names

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

    Excellent course
    14/07/2020

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

    I have question, what if I wanted to filter order.product.name ? How to acces this in field_name? Maybe there is different apporach? Thanks for the video and whole series.

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

    Great Tuto! I made a quick change to the order_form.html to made into account the switch between formset (creating new orders) and forms (updating previous orders)... Im a newbie but is this a way you would do it?
    {% csrf_token %}
    {% if formset.management_form %}
    {{ formset.management_form }}
    {% for form in formset %}
    {{form}}
    {% endfor %}
    {% else %}
    {{form}}
    {% endif %}
    Thanks again for your help!!

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

    How can I change field_name contains: that comes with the {{ django_filter }} inside my html??

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

    Hello
    when I try this tutorial in my App, my all page refresh when I click on Search
    Because in my app I have a tabs, this tabs getting pages
    so What you did to don't refresh the page. ?
    thank you

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

    {{myFilter.form}} is not working for me .. it doesn't show any form ... what to do?

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

    hello I would like to filter dynamically data, as when we are in a social network it is our own data that is displayed can you help me please?

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

    You didn't mention to add forms tag initially

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

    This crash course has taught me a lot. Where can i get the source code, i have been following through but I may have missed something and i was using the tutorials to do my end of semester project. The link provided is broken. Thank you so much Dennis for the great work.

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

      you should have taken notes, then created your own project using this not just copying, that does nothing for you

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

    The form is not rendering when i give {{myFilter.form}}
    although i did cross check if i made any mistake by removing .form from myFilter and its just not rendering the form

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

    How to get multiple selection in filter

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

    Hi Dennis. Thanks for the tutorials. They are very good. I am not able to get your next Tutorial (pt 13). It seems to be lost. Can you load it again?

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

    Hi Dennis, love your videos and it helps me alot in my learning.
    However, I cant seem to find the next video (pt13) in the playlist nor in your video list..Has it been taken down already or ?

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

    Hi, Dennis! Thanks for awesome tutorial!
    Can we exclude some item from choise list in product or status form for example?

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

    hey man, how i can change the lenguaje to spanish in the 'lookup_expr' i want change the 'is greater than ' to ' es posterior a'

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

    Hi dennis Thanks a lot for this tuto, but i wanna ask how to customize the name of fields in search section and remove words added by django like Date created is greater than or equal to and Note contains.... Thank you

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

      Hi Mourad , were u able to do that? Thanks in Advance

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

      @@walterrandazzo6399 no but i changed the labels using JavaScript in the html page

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

      @@mouradboukroun2696 ok dude thx 4 the reply! I have changed them using verbose_name parameter in the model definition. I can you u the code if u want. Can u share you js code to me? Thanks in advance!

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

    SIR lecture number 13 are missing kindly sir upload it

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

    Hi Dennis, thankyou for this amazing teaching. Bro, it seems to me I can't find pt13 related to pagination. Can you share it also? Thank you again for your effort!

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

    Nice

  • @60secwithMalikHamza
    @60secwithMalikHamza 2 ปีที่แล้ว

    sir my search button not working
    or my orders not filtering plzzz kindly help

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

    idk y but the filter filed are not displaying i only see the search button please anyone tell...

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

    hi Dennis i cant seem to get the source code for the register.html. please is there anywhere i can get it?

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

    Why we are using {myfilter.form}

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

    Suprr bro helped a lot....

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

    Hi Dennis.
    I've followed your tutorial on the filtering but my filters don't have the drop down as yours do. Instead I have to type in the values of the field I want to search for. Any idea how to get the drop down select functionality??

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

      Did u get solution

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

    For all those with the attribute error, kindly ensure you use Sentencecase for the .FilterSet argument as in
    class ModelFilter(django_filters.FilterSet):
    pass

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

      That still doesn't solve the problem.

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

    hi the update does not work i dont know why can you help me this?

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

    Hi Dennis,
    Please help me solve these as I'm following your series
    1. By adding a new field into the model now I can't update them
    2. Navigating to the next page if the product count is greater than 5
    3. How can I reset the search form ???
    although I'm grateful that you thought about lectures for the latest Django version

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

    Where is 13th Tutorial, Please give me the link of 13th video if anyone have that

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

    I have a table which has nearly hundred thousand rows. Everytime a user will search, the entire database will be searched, which will consume server processing power. How can I add some sort of cache feature so that the search results are stored and lesser CPU resources are consumed? (since I expect a lot of users to be using it simultaneously)

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

    Buddy my order form is an empty object
    Could u guide plz?

  • @johnjim3741
    @johnjim3741 2 หลายเดือนก่อน

    What happened to part 13?

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

    Thanks!

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

    Muchas Gracias!!!

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

    Hi Dennis , hope you are doing well. At the end of this tutorial you mentioned about "pagination" tutorial (pt13) . I can't find that specific tutorial among all your videos. Please update regarding it. Thanks :)