Skip to content

Instantly share code, notes, and snippets.

@klen
Created November 14, 2012 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klen/4073967 to your computer and use it in GitHub Desktop.
Save klen/4073967 to your computer and use it in GitHub Desktop.
Expand user model in Flask-Foundation
# Somewhere in your app (Ex. foundation/base/yourapp/mixin.py
class NameMixin(object):
name = db.Column(db.String(50))
# You must enable your mixin in settings (Ex. foundation/base/config/production.py)
...
AUTH_USER_MIXINS = ['base.yourapp.mixin.NameMixin']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment