Matt Segal
Matt Segal
  • 31
  • 120 660
Dynamic list views with Django and htmx
How to use htmx to make Django list views dynamic without having to write any JavaScript. If you like this video you might also like my blog at mattsegal.dev
Does you business need to launch a new Django site? I can help: mattsegal.com.au
Helpful links:
- Code: github.com/MattSegal/django-htmx-list-view
- htmx: htmx.org/
- pagination: docs.djangoproject.com/en/3.2/topics/pagination/
- fancy example: github.com/AnikaLegal/clerk/blob/develop/app/case/views/case/list.py
0:00 Intro
0:30 Problem examples
1:22 Solution examples
2:48 GitHub project
3:19 Setup
6:01 Review of project without htmx
11:40 Diagram of new architecture
16:23 Preparing HTML templates for htmx
18:42 Creating the search endpoint
21:31 Installing htmx
22:50 Adding htmx to the search bar
26:50 Adding htmx to the next page button
33:17 Conclusion
มุมมอง: 14 843

วีดีโอ

Dynamic Django forms without writing any JavaScript
มุมมอง 12K3 ปีที่แล้ว
How to use htmx to make Django forms dynamic without having to write any JavaScript. If you like this video you might also like my blog at mattsegal.dev All code examples available at github.com/MattSegal/django-htmx-intro Does you business need to launch a new Django site? I can help: mattsegal.com.au 0:00 Intro example 2:16 Intro to htmx 3:37 GitHub project 4:43 Review of project without htmx...
How to compress images for a webpage
มุมมอง 4313 ปีที่แล้ว
Often when creating a website, a client will provide you with large images that are 2-5MB and thousands of pixels wide. This video shows you a quick browser-only workflow for cropping, resizing and compressing these images so that they will load more quickly on a webpage. Photopea image editor: www.photopea.com JPEG compressor: compressjpeg.com Simple image editor: jspaint.app
How Blog Reader works
มุมมอง 4114 ปีที่แล้ว
blogreader.com.au/
How to set up Django with React
มุมมอง 7164 ปีที่แล้ว
Blog post: mattsegal.dev/django-react.html Example project GitHub: github.com/MattSegal/django-react-guide This is a guide on how to setup a Django/React webapp. The focus will be on keeping things simple, incremental and understanding each step. I'm going to assume that you know: - the basics of web development (HTML, CSS, JavaScript) - the basics of Django (views, templates, static files) - t...
An Introduction to AWS Simple Storage Service (S3)
มุมมอง 2754 ปีที่แล้ว
This video will take you through how to get started with AWS S3. Related blog post: mattsegal.dev/aws-s3-intro.html Update: AWS also ships a self-contained CLI tool that doesn't need to be installed in a virtual environment, which you can read about here: docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html Sometimes when you're running a web app you will find that you have a lot o...
How to fork a GitHub repository and make a pull request
มุมมอง 9724 ปีที่แล้ว
How to fork a GitHub repository and make a pull request
How to diagnose and fix slow queries with Django Debug Toolbar
มุมมอง 7K4 ปีที่แล้ว
blog post: mattsegal.dev/django-debug-toolbar-performance.html code on github: github.com/MattSegal/djdt-perf-demo Your Django views are running slowly and you want to make them faster, but you can't figure out what the issue is just by reading the code. Just as bad is when you're not sure if you're using the Django ORM correctly - how can you know if the code you write will be slow? This is wh...
Setting up Windows for programming
มุมมอง 7114 ปีที่แล้ว
Software development on Windows can be a pain. Not because of any issues with C#, .NET or the operating system, but simply because the tools surrounding your work can be quite clunky by default. I'm talking about the lack of a package manager, PowerShell's ugly blue terminal with no tabs and a bunch of "missing" tools (git, ssh). It's like a living room where all the furniture is perfectly posi...
Simple Django Deployment (part 22) - Setting up Cloudflare part 2
มุมมอง 3.7K4 ปีที่แล้ว
Video for the tutorial: mattsegal.dev/simple-django-deployment-6.html We're going to use Cloudflare to set up our DNS records. I've written elsewhere on why I like Cloudflare. TLDR it's pretty easy to use and provides some nice bonus features like caching your static files, SSL encryption and analytics. This is the final video in the tutorial. Thanks for watching!
Simple Django Deployment (part 21) - Setting up Cloudflare part 1
มุมมอง 4.6K4 ปีที่แล้ว
Video for the tutorial: mattsegal.dev/simple-django-deployment-6.html We're going to use Cloudflare to set up our DNS records. I've written elsewhere on why I like Cloudflare. TLDR it's pretty easy to use and provides some nice bonus features like caching your static files, SSL encryption and analytics.
Simple Django Deployment (part 20) - Buying a domain
มุมมอง 2.7K4 ปีที่แล้ว
Video for the tutorial: mattsegal.dev/simple-django-deployment-6.html We're very nearly done deploying our Django app. There's just one more thing we should take care of. Having a raw IP as our website address is kind of yucky, isn't it? You're not going to ask your friend, boss, or mum to visit 23.231.147.88 to check out your cool new Django app. You want a domain name like mycoolwebsite.xyz! ...
Simple Django Deployment (part 19) - Automating server setup
มุมมอง 8454 ปีที่แล้ว
Video for the tutorial: mattsegal.dev/simple-django-deployment-5.html You will get to a point where you want to move you app to a new server, or maybe you've broken your server really badly, or maybe you want to set your server up again slightly differently. When that time comes, you will not remember how you set this one up: that's why we want to automate our server setup.
Simple Django Deployment (part 18) - Taking database backups
มุมมอง 1.7K4 ปีที่แล้ว
Video for the tutorial: mattsegal.dev/simple-django-deployment-5.html Here I'll show you how to back up your database on the server. It's very, very simple to do with SQLite because the database is just a single file.
Simple Django Deployment (part 17) - Automating and testing the deployment
มุมมอง 7634 ปีที่แล้ว
Video for the tutorial: mattsegal.dev/simple-django-deployment-5.html Alright we're basically done with this section, now all we need to do is combine our two scripts into a master deploy script.
Simple Django Deployment (part 16) - Automating the remote installation
มุมมอง 5994 ปีที่แล้ว
Simple Django Deployment (part 16) - Automating the remote installation
Simple Django Deployment (part 15) - Automating the code upload
มุมมอง 9434 ปีที่แล้ว
Simple Django Deployment (part 15) - Automating the code upload
Simple Django Deployment (part 14) - Setting up basic logging
มุมมอง 1.2K4 ปีที่แล้ว
Simple Django Deployment (part 14) - Setting up basic logging
Simple Django Deployment (part 13) - Adding Gunicorn config
มุมมอง 1.9K4 ปีที่แล้ว
Simple Django Deployment (part 13) - Adding Gunicorn config
Simple Django Deployment (part 12) - Setting up Supervisor
มุมมอง 2.6K4 ปีที่แล้ว
Simple Django Deployment (part 12) - Setting up Supervisor
Simple Django Deployment (part 11) - Uploading and running your Django app
มุมมอง 3.4K4 ปีที่แล้ว
Simple Django Deployment (part 11) - Uploading and running your Django app
Simple Django Deployment (part 10) - Preparing our WSGI server
มุมมอง 5K4 ปีที่แล้ว
Simple Django Deployment (part 10) - Preparing our WSGI server
Simple Django Deployment (part 9): Serving static files in production
มุมมอง 32K4 ปีที่แล้ว
Simple Django Deployment (part 9): Serving static files in production
Simple Django Deployment (part 8) Preparing Django settings for production
มุมมอง 7K4 ปีที่แล้ว
Simple Django Deployment (part 8) Preparing Django settings for production
Simple Django Deployment (part 7): Creating a basic Django app
มุมมอง 1.4K4 ปีที่แล้ว
Simple Django Deployment (part 7): Creating a basic Django app
Simple Django Deployment (part 6): Setting up our Python environment
มุมมอง 1.5K4 ปีที่แล้ว
Simple Django Deployment (part 6): Setting up our Python environment
Simple Django Deployment (part 5): Uploading files
มุมมอง 1.5K4 ปีที่แล้ว
Simple Django Deployment (part 5): Uploading files
Simple Django Deployment (part 4): Setting up the server
มุมมอง 1.6K4 ปีที่แล้ว
Simple Django Deployment (part 4): Setting up the server
Simple Django Deployment (part 3): Creating the server
มุมมอง 2K4 ปีที่แล้ว
Simple Django Deployment (part 3): Creating the server
Simple Django Deployment (part 2) - Creating a SSH key
มุมมอง 2.6K4 ปีที่แล้ว
Simple Django Deployment (part 2) - Creating a SSH key

ความคิดเห็น

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

    tell me where to find ip address

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

    thanks you so much

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

    Great!!

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

    This helped a lot! Thank you!

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

    This is an awesome service. I've been using it for at least last 2-3 years.

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

    i'm still getting error 404 on railway. on local it works fine

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

    Thank you

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

    Great! Appreciated!

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

    does whitenoise support http_range requests for video? I think it's one of many reasons why django won't care about static files? ^^

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

    Nice playlist. Thank you!

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

    Great stuff Matt, thanks much!

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

    Matt, hello, what is the best practice with version of whitenoise? I mean shall the version you install to your venv/docker/whatever be specific? I am asking because it seams you have left just 'whitenoise' in requirements without putting ==5.0.1. So next time you build your app on another machine you might download a newer version. I see potential problems with that. Shall we keep it in mind or 'whitenoise' devs make sure newer versions work exactly the same with an older Django versions?

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

    Hi Matt, thanks a lot for your work. I'm glad I have stumbled upon your videos. It's extremely useful, please continue. I recommend you to make a fancy cover for a video... mb with some image AI or smth - because your current one is not really picky :( One more think is the font size, if you could make it larger by changing display resolution or something.. it will really improve the content itself :D I have also, one question about the video - do I actually need to change anything if I work from Linux machine.. can I use a default prompt or shall I install gitbash?

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

    Thanks for doing not overwhelming videos :D good luck with your channel

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

    Thank you very much

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

    Thanks for the tutorial my dude it was very useful.

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

    Wow, what an amazing tutorial. Thank you and hopefully we'll see more from you.

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

    great tutorial, helped me a ton you say quis really funny at one part and made me laugh, so thanks

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

    Obrigado amigo, vc é um amigo!

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

    Hey Matt. This was an exceptional playlist. Extremely valuable. We’re a few years in the future though, would you recommend docker deployments over this?

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

    It actually helped me. Thx for your video!

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

    Dont know how to thank you... but you came to my rescue after 7 hours of toil

  • @ВіталійЛило-о8ъ
    @ВіталійЛило-о8ъ ปีที่แล้ว

    Що сидиш лабу робиш ?)

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

    Lol, you very funny!

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

    Underrated video

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

    Hi mate, what happens if I format the PC and lose my private key 🗝️ ( stored on the disk) will I lose access to my deployed project?

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

    Just what I was looking for, thank you! Worked perfectly.

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

    I am impressed of your Linux skill😮 , why do you use windows tho?

  • @JoaoAntonio-sd1nr
    @JoaoAntonio-sd1nr ปีที่แล้ว

    Super useful, man, continue the work, helps a lot!

  • @JoaoAntonio-sd1nr
    @JoaoAntonio-sd1nr ปีที่แล้ว

    Very good, thanks!

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

    Him: "It's a shit-ton. 27 queries." Me: Hmm, what's mine? <looks> 142. *sigh*

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

    Thanks for this Matt, just working through it now. Will go through the rest when it is hopefully connected tomorrow. Just wondering where you got the server ip address from as I can't find mine.. If it's going to the same ip address as before on my hosting platform, all good, its already setup

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

    do you have anything for postgres?

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

    Best tutorial on TH-cam! The swearing makes it even better!

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

    shouldn't we need to bind port 8000?

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

    Thanks for this, but as soon I up it on my production, I get an internal server 500 error :(

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

    Might sound weird but your mouse click and keyboard sounds cool.....

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

    Can you show a video to optimize Django app for passing a good number of requests? Thanks.

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

    Thank you Sir. Great video. Subscribed.

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

    how to add spinner while loading the data from database. because on production sometimes data takes times to return. and one more thing how to keep these endpoints secure so only within site they are used not directly.

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

    thank you, you deserve likes.

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

    amazing

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

    I like this so much, everyone is teaching Django, but there are so few people talking about the deployment. Thanks alot

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

    Dude! Matt! You have such a big gift 🎁! Your explanations are superb 👏 2 minutes in and I had already subscribed! Thank you so much for this. It will help me so much in the making of my very first project!!!

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

    Matt...Thanks Dude.....this has made my day and wkend....sending htmx seamlessly to my app.......Thanks for taking the time ..appreciated.

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

    Perfect, thanks you very much mate

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

    I have a problem where my site loads just fine in production but for a second, it shows html without css

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

    Really great tutorial you just saved me thx.

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

    Dude, this is the most clear tutorial on this I've seen! Thanks ,my g.

  • @snex-techprogrammer5110
    @snex-techprogrammer5110 2 ปีที่แล้ว

    Hello, Am getting server error when the DEBUG=FALSE

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

      False and True are boolean values as correctly spelt.(False)