This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A CRUD like manager for Flask.

Is Flexible

Save in a hello.py:

from flask import Flask
from flask_manager import crud, controller, rules as rules_

all_items = {
    i: {'id': i, 'title': 'Title - {}'.format(i)}
    for i in range(100)
}
next_id = 100

class Controller(controller.Controller):
    def get_items(self, page=1, order_by=None, filters=None):
        return all_items, len(all_items)

    def get_item(self, pk):
        return all_items[pk]

    def create_item(self, form):
        # wtforms does not support dicts :( (I think:P)
        global next_id
        all_items[next_id] = {
            'id': next_id, 'title': 'Title - {}'.format(next_id)}
        next_id += 1

    def update_item(self, item, form):
        # wtforms does not support dicts :( (I think:P)
        pass

    def delete_item(self, pk):
        del all_items[pk]


class Crud(crud.Crud):
    controller = Controller()
    # you may merge read/update to "form" if using the same columns
    rules = {
        'list': rules.ColumnSet(['title']),
        'create': rules.FormFieldSet(['title']),
        'read': rules.DataFieldSet(['title']),
        'update': rules.FormFieldSet(['title']),
        'delete': rules.DataFieldSetWithConfirm(['title']),
    }

if __name__ == '__main__':
    app = Flask(__name__)
    admin = crud.Index('My Admin', url='', items=[
        Crud('My Crud'),
    ])
    app.register_blueprint(admin.create_blueprint())

Then execute:

$ pip install flask-manager
$ python hello.py
Release History

Release History

0.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1a0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting