https://htmx.org logo
Join Discord
Powered by
# πŸ”₯-django-htmx
  • r

    refined-waiter-90422

    02/10/2022, 4:36 PM
    Also yeah settled on "/thing/index.py" for base routes, but I might switch over to that "/thing.py + /thing/*" method you've described in darkstar.
  • r

    refined-waiter-90422

    02/10/2022, 4:38 PM
    Retrospect is 20:20- index.py is more organized, but your method seems more intuitive.
  • b

    bland-coat-6833

    02/10/2022, 4:58 PM
    I'm trying to do the Real World app in it to shake out any issues.
  • b

    bland-coat-6833

    02/10/2022, 4:59 PM
    I did have an
    index.html
    file to be the root template but I've just changed that to
    index.py
    as then we're consistent.
  • b

    bland-coat-6833

    02/10/2022, 5:00 PM
    Part of me wanted
    /path/index.py
    to handle the
    /path/
    URL. But then I realised I could have
    /path.py
    instead and still have things under
    /path/
    . It actually seems to work, which is a nice surprise.
  • r

    refined-waiter-90422

    02/10/2022, 5:01 PM
    Yeah.
  • b

    bland-coat-6833

    02/10/2022, 5:02 PM
    And it now has a whole 1 (one) star, which makes it officially my most successful piece of open source. πŸ˜€
  • b

    bland-coat-6833

    02/10/2022, 5:05 PM
    (though I did have the top 15 vim plugin about 18 years ago)
  • r

    refined-waiter-90422

    02/10/2022, 5:06 PM
    honestly it's great dude to see people such as yourself on the starlette / fastapi stack. I've always found the relationship of fastapi to be pretty funny. It's the perfect example of hacker news hype putting the "branded verison" overtop of the original.
  • r

    refined-waiter-90422

    02/10/2022, 5:06 PM
    but tbh, whatever grows starlette, it's all good.
  • r

    refined-waiter-90422

    02/10/2022, 5:08 PM
    And to be fair, there's been a large number of usability improvements that may not have made it into starlette without pressure from the fastapi folks.
  • r

    refined-waiter-90422

    02/10/2022, 5:09 PM
    As much as I love the starlette team keeping crap out of the framework, it's a fine balance.
  • r

    refined-waiter-90422

    02/10/2022, 5:11 PM
    recent example:
  • b

    bland-coat-6833

    02/10/2022, 5:27 PM
    Starlette does seem like it's all been well thought through. It's interesting to see various FastAPI-like things start to pop up (Starlite, Xpresso). The idea with Dark Star was to get close to something PHP-like (template and code together) but being able to have all the modern magic of ASGI if you want it. If nothing else, I've finally managed to play with the
    ast
    module, which I wanted an excuse to use for a while.
  • b

    bland-coat-6833

    02/10/2022, 5:29 PM
    I think it should work well for htmx. Want to ship a small piece of HTML to the browser? Just stick it in a file.
  • r

    refined-waiter-90422

    02/10/2022, 5:40 PM
    Yeah. It's been my experience thus far as well.
  • r

    refined-waiter-90422

    02/10/2022, 5:41 PM
    Funny thing, I toyed with Go recently, first thing I implement is always file-based routing. Go as a platform is really attractive to me (single binary deploys).
  • r

    refined-waiter-90422

    02/10/2022, 5:42 PM
    the AST is super flexible, so you can get pythonic, brace-less style out of Go.
  • r

    refined-waiter-90422

    02/10/2022, 5:42 PM
    But just couldn't get around the inconveniences of not having optional parameters.
  • r

    refined-waiter-90422

    02/10/2022, 5:43 PM
    All the solutions just add so many extra lines (optional parameters, config structs, etc).
  • r

    refined-waiter-90422

    02/10/2022, 5:43 PM
    My libraries are sooo much shorter with optional/named params available in Python.
  • r

    refined-waiter-90422

    02/10/2022, 5:44 PM
    I really hope they reconsider these things for Go 2.
  • b

    bland-coat-6833

    02/10/2022, 5:52 PM
    Well it looks like we have #941388608290574336 now.
  • h

    hundreds-library-87450

    02/11/2022, 10:02 AM
    Hello, I've created a quickstart repository on github with instructions which includes Django, HTMX and Tailwind CSS. It is pre-configured and has instructions to get you guys up and running very quickly. https://github.com/code-kasha/htmx-dj-tw-start
  • b

    bland-coat-6833

    02/11/2022, 10:27 AM
    Tailwind has a stand-alone CLI these days. I like that for when I don’t want to do the full npm dance. (It does stop you using other Tailwind plugins though.)
  • b

    blue-gold-89534

    02/11/2022, 10:32 AM
    Great idea! Thanks! Is there a chance to get a full standalone, which does not require npm?
  • h

    hundreds-library-87450

    02/11/2022, 10:34 AM
    well, what we do with npm here is, get tailwind and build it via the classes in our html file
  • h

    hundreds-library-87450

    02/11/2022, 10:35 AM
    it would still work if you just include a cdn of tailwind and htmx
  • h

    hundreds-library-87450

    02/11/2022, 10:35 AM
    but you will be limited
  • b

    blue-gold-89534

    02/11/2022, 10:36 AM
    I often develope for offline systems on local servers, and always wanted to give tailwind a shot, but so far bootstrap is just so easy - only 2 files to copy.
1...474849...100Latest