django-fastview

Build admin-style views with minimal code

Django admin is great for creating quick CRUD views for admin users, but is not suitable for end users. Fastview is inspired by Django admin - it makes writing code to manage objects quick and simple - but it uses standard generic views which can be overridden or replaced as necessary, and styled and tied into the rest of your site.

Read the documentation, install it from pypi, or grab the code from github.

Fastview adds a layer of access control to make it straightforward to manage who can access each view, and provides default templates to get you up and running quickly.

For example, build a group of CRUD views with a custom publish view, where any logged-in user can create a post, they can edit their own posts, staff can edit and publish any posts except their own, and deletion is managed using standard Django permissions:

# views.py
class BlogViewGroup(ModelViewGroup):
    model = Blog
    publish = MyPublishView  # Django view class
    permissions = {
        "index": Public(),
        "detail": Public(),
        "create": Login(),  # Allow any logged in user to create a post
        "update": Staff() | Owner("owner"),  # Allow staff or post owners to edit
        "delete": Django("delete"),  # Only users with the delete permission
        "publish": Staff() & ~Owner("owner"),  # Staff can publish but not their own
    }

# urls.py
urlpatterns = [ # ...
    url(r'^blog/', BlogViewGroup().include(namespace="blog")),
]