Core

Overview

Core methods and functions

Functions

Assembly

from assembly import Assembly

config

from assembly import config

env

from assembly import env

ext

from assembly import ext

db

from assembly import db

models

from assembly import models

Holds all class models that have been extended by db.Model.

To use, access them via models.{ModelName}

from assembly import models

class Index(Assembly):

  def index(self):
    user = models.User.query()

views

from assembly import views

date

from assembly import date
from assembly import set_cookie
from assembly import get_cookie
from assembly import delete_cookie

url_for

from assembly import url_for

redirect

from assembly import redirect

Decorators

decorate

Applies a decorator, usually a 3rd party decoartor to all method in the class

from assembly import decorate
from flask_login import login_required

@decorate(login_required)
class Login(Assembly):
  def index(self):
    return 

app_context

from assembly import app_context