GithubHelp home page GithubHelp logo

fluendo / flumes-django Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 165 KB

Django integration for Flumes

License: GNU Lesser General Public License v2.1

Python 86.24% HTML 13.54% CSS 0.22%
django python

flumes-django's Introduction

flumes-django

Django application to manage the flumes database

Features

  • Seamless integration between Django and flumes
  • Possiblity to upload files directly through the admin interface

Setup

In order to integrate flumes-django into your Django application, you need to:

Add flumes-django as an installed application in your settings.py

INSTALLED_APPS = (
    ...,
    "flumes_django",
)

Add the flumes database to your settings.py, you can do it manually or use the flume_django.config.FlumesDjangoConfig helper

from flumes_django.config import FlumesDjangoConfig
config = FlumesDjangoConfig()
DATABASES = {
    "flumes": {
        "ENGINE": config.get_django_database_engine(),
        "NAME": config.get_database_database(),
    },
}

Add the flumes-django router in your settings.py

DATABASE_ROUTERS = ["flume_django.router.Router"]

In case the discovery of the files happens in another machine, you can override the path where the files are stored by setting

FLUMES_DJANGO_ROOT = "/your/own/local/path"

Demo

The project has a demo folder, in order to run locally, make sure you have a flumes configuration in $HOME/.flumes or /etc/flumes and simply run

poetry run python manage_demo.py runserver

After entering into the admin site, you will see something like this: Admin Video

Development

The project is based in poetry dependency management and packaging system. The basic steps are

Install poetry

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

Install the dependencies

poetry install

Install your development pre-commit hooks

poetry run pre-commit install

References

flumes-django's People

Contributors

turran avatar

Stargazers

 avatar

Watchers

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