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

Flask-Views is a Flask extension which provides a set of class-based views, inspired by the Django class based views.

Currently this package contains a set of views for rendering (template and JSON) responses dispatched by HTTP request method, views for handling (WTForms) form submission and a collection of database views for creating and updating objects (currently MongoDB is supported by using Mongoengine).

Installation

Flask-Views can be installed by executing pip install flask-views. The source is available at: http://github.com/brocaar/flask-views

Examples

Contact form

from flask_views.edit import FormView

class ContactFormView(FormView):
    # For creating forms classes, see the WTForms documentation
    form_class = ContactForm
    template_name = 'contact_form.html'

    def form_valid(self, form):
        # Do something with the submitted form data
        return super(ContactFormView, self).form_valid(form)

    def get_success_url(self):
        return url_for('contact.form')

app.add_url_rule(
    '/contact/',
    view_func=ContactFormView.as_view('contact')
)

Article view

from flask_views.db.mongoengine.detail import DetailView

class ArticleView(DetailView):
    get_fields = {
        'category': 'category',
        'slug': 'slug',
    }
    # For creating document classes, see the Mongoengine documentation
    document_class = Article
    template_name = 'article_detail.html'

app.add_url_rule(
    '/articles/<category>/<slug>/',
    view_func=ArticleView.as_view('article')
)
Release History

Release History

0.2.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.2

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

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

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Flask-Views-0.2.1.tar.gz (24.9 kB) Copy SHA256 Checksum SHA256 Source Feb 26, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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