Horizon Django tools.
Project description
horizon-django contrib
Library built on top of Django and Horizon(part of OpenStack Dashboard) for building modern web applications.
With this toolkit is building applications blazingly fast and easy !
This library provide generic implementation most of Horizon components, add more tools for easily scaffolding applications and preserves support for complex customizations.
Short story
Horizon is pretty package for fast creating UI for everything. But is designed for model-less applications like an OpenStack Dashboard. If we connect Horizon with typical Django application we must create same pieces of same components and this is realy suck ! We want more declarative and less imperative code. For this purpose we create this library which compose common stuff in one place.
Features
With Django and Conent Types
Views - PaginatedIndex, Create, Update, Delete in Angular modal’s
Tables with inline-ajax update =>
Graphs and statistics
no implementation required, all Django stuff is generated automatically like an admin, but in more customizeable form.
Model -> Table -> bound actions(CRUD with Filter) -> View -> Pagination
Rest API Dashboards
APIModel
ClientBase - simple implementation which uses requests
and plus all features defined under Django because if we have model most of things works well without any modification.
Manager -> Model -> Table -> bound actions(CRUD with Filter) -> View -> Pagination
Manager has all responsibilty for get data from remote API. It`s simple object which has similar methods with django model managers. And it’s bound to Abstract model.
See [Documentation] !
Requires
Horizon - part of OpenStack Dashboard
Tested with
Horizon Icehouse, Juno, Kilo
Django 1.5 .. 1.8
Python 2.6 .. 3.4
Installation
This project depends on Horizon library, but isn’t installed automatically !
If you haven’t installed Horizon, do something like this in your virtualenv:
(env)majklk@horizon:~# pip install horizon-contrib
(env)majklk@horizon:~# pip install git+https://github.com/michaelkuty/horizon-contrib.git@develop
or clone and add to $PYTHONPATH.
Configuration
INSTALLED_APPS += ('horizon_contrib',)
url(r'^contrib/', include('horizon_contrib.urls', namespace='horizon'), ),
If used horizon, contrib urls will be included automatically.
Manually include horizon_contrib.urls with namespace='horizon' is simple.
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
...
url(r'^contrib/', include('horizon_contrib.urls', namespace='horizon'), ),
...
)
For more code see [Documentation].
Read more
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.