Code Monkey home page Code Monkey logo

huey_django_orm's Introduction

PyPI version license Donate

huey_django_orm

A module to use Django ORM for storage with huey

This project originally started because I wanted to just update huey-pg. That proved to be more of a full rewrite than just an update.

Anyway, I didn't want to use SqliteHuey, or FileHuey, since I already have a perfectly good data store in my Django project.

So, I took a copy of SqliteHuey, and re-implemented the class functionality using Django ORM.

Huey doesn't do anything too crazy, so it should work with any database backend supported by Django. We also don't use any non-standard Django stuff, so it should work with any modern Django version.

Installation

Install with pip

pip install huey-django-orm

settings.py

Add to INSTALLED_APPS

INSTALLED_APPS = [
    "...",
    "huey_django_orm",
    "...",
]

Configure Huey to use DjangoORMHuey

from huey_django_orm.storage import DjangoORMHuey

HUEY = DjangoORMHuey()

or if you need other options

HUEY = {
    "...": "...",
    'huey_class': 'huey_django_orm.storage.DjangoORMHuey',
    "......": "...",
}

Run Migrations

python manage.py migrate huey_django_orm

That's it! Now you can use Huey just like you normally would.

Admin

Since this project is specific to Django, and will likely never be used without it, you get a few Django goodies rolled right in.

  • Each Model has a ModelAdmin
  • There is an auto_now_add field in each model so we can see when an object was created within the admin
  • Ordering is defined at the model level, so objects will appear in the admin in the same way they will be processed.

huey_django_orm's People

Contributors

avryhof 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.