Opened 6 years ago

Closed 6 years ago

#25 closed task (fixed)

use blueprint to manage views

Reported by: zhangjr Owned by: zhangjr
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:
Blocked By: Blocking:
Parent ID: Parent Tickets:
Estimated Number of Hours: 0.0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0

Description

from flask import Blueprint

xxx = Blueprint('xxx', name,)

from app.xxx import views

Subtickets

Child Tickets

Change History (8)

comment:1 Changed 6 years ago by zhangjr

app/
    errors/                             <-- blueprint package
        __init__.py                     <-- blueprint creation
        handlers.py                     <-- error handlers
    templates/
        errors/                         <-- error templates
            404.html
            500.html
    __init__.py                         <-- blueprint registration
Last edited 6 years ago by zhangjr (previous) (diff)

comment:3 Changed 6 years ago by zhangjr

my-app
├── app.py
├── models.py
├── /landing
│   ├── /templates
│   ├── /static
│   └── routes.py
├── /loggedin
│   ├── /templates
│   ├── /static
│   └── routes.py
├── /charts
│   ├── /templates
│   ├── /static
│   └── routes.py
├── config.py
├── requirements.txt
└── setup.py

comment:4 Changed 6 years ago by zhangjr

flaskblueprint-tutorial
├── /application
│   ├── __init__.py
│   ├── /admin
│   │   ├── admin_routes.py
│   │   ├── assets.py
│   │   └── /templates
│   ├── /main
│   │   ├── assets.py
│   │   ├── main_routes.py
│   │   └── /templates
│   ├── /static
│   └── /templates
│       ├── layout.html
│       ├── meta.html
│       ├── navigation-default.html
│       ├── navigation-loggedin.html
│       └── scripts.html
├── config.py
├── requirements.txt
├── start.sh
└── wsgi.py

comment:5 Changed 6 years ago by zhangjr

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 Changed 6 years ago by zhangjr

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:7 Changed 6 years ago by zhangjr

  • Owner changed from somebody to zhangjr
  • Status changed from reopened to accepted

comment:8 Changed 6 years ago by zhangjr

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.