GithubHelp home page GithubHelp logo

djll's Introduction

DJLL

djll

DJLL is a simple system with user CRUD and authentication using Django, DRF, Fernet (cryptography.fernet (py) / fernet.js) and HTMX.

The primary purpose of writing this small system was to learn HTMX, but I also needed a JSON RESTful API due to a constraint. Looking back, I think I should've written instead using alpine.js instead of HTMX, it would make my life easier when working with json. HTMX is a great tool to work with, although the documentation is a little sparse and the community is still growing. The only downside is that it can be a bit of a hassle to work with JSON in conjunction with it, and if these two things improve, it will explode in popularity.

How to:

To test the system, you can perform all of the typical actions that you would do when running a local Django application:

git clone https://github.com/duartqx/djll.git
cd djll
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

UPDATE

The templates have been restructured, and custom JavaScript functions previously handling JSON responses have been removed. Instead, I’ve added Django views which inherit from the api views and handle all Htmx requests, including receiving JSON data and responding with rendered HTML templates. This modification has led to a significant simplification of the templates, enabling Htmx to solely manage page interactivity. Upon examining the core/templates, you’ll notice that all components are simple HTML, with declarative Htmx tags

Demo

djll.mp4

djll's People

Contributors

duartqx avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.