Git Product home page Git Product logo

django_htmx_examples's Introduction

django_htmx_examples

A collection of examples on how to do various tasks with HTMX and Django.

Setup

There is currently only one supported way to work with this repository. You will need a Linux system (WSL might work) onto wich you install the Nix package manager with Flakes enabled1 and direnv2. Afterwards you can enter the development environment with direnv allow.

After you've entered the development environment with either method you can start the development server with dev run. This will start a PostgreSQL database running and start the Django development server.

In case you want a fresh start or remove the project you can just remove the .direnv and .venv directory at the root of the project. All the data of the PostgreSQL database is stored there together with the symlinks to the Nix store.

In case you want to tweak something these are the applications use do build the development environment:

  • Nix package manager
  • direnv
  • overmind3

The dev command is a simple BASH script called dev.sh at the root of the project.

Run the dev command without an argument to see all options.

Manual way

The manual way you have to install poetry4 and then run poetry shell to enter the virtual environment. You will then need a local PostgreSQL server or modify the settings so that you can use your prefered database.

Please note that I will only use and test the first method.

Footnotes

  1. https://nixos.org/download.html

  2. https://direnv.net/

  3. https://github.com/DarthSim/overmind

  4. https://python-poetry.org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.