# Path: template_maker/users/models.py
# class User(UserMixin, SurrogatePK, Model):
# 
#     __tablename__ = 'users'
#     email = Column(db.String(80), unique=True, nullable=False)
#     created_at = Column(db.DateTime, nullable=False, default=dt.datetime.utcnow)
#     first_name = Column(db.String(30), nullable=True)
#     last_name = Column(db.String(30), nullable=True)
#     active = Column(db.Boolean(), default=False)
#     is_admin = Column(db.Boolean(), default=False)
# 
#     def __init__(self, email, **kwargs):
#         db.Model.__init__(self, email=email, **kwargs)
# 
#     @property
#     def full_name(self):
#         return "{0} {1}".format(self.first_name, self.last_name)
# 
#     def __repr__(self):
#         return '<User({email!r})>'.format(email=self.email)


import json
import urllib
import urllib2
from flask import (
    Blueprint, render_template, request, flash,
    current_app, abort, redirect, url_for
)
from flask.ext.login import current_user, login_user, logout_user
from template_maker.users.models import User


blueprint = Blueprint(
    'users', __name__, url_prefix='/users',
    template_folder='../templates'

# Path: template_maker/users/models.py
# class User(UserMixin, SurrogatePK, Model):
# 
#     __tablename__ = 'users'
#     email = Column(db.String(80), unique=True, nullable=False)
#     created_at = Column(db.DateTime, nullable=False, default=dt.datetime.utcnow)
#     first_name = Column(db.String(30), nullable=True)
#     last_name = Column(db.String(30), nullable=True)
#     active = Column(db.Boolean(), default=False)
#     is_admin = Column(db.Boolean(), default=False)
# 
#     def __init__(self, email, **kwargs):
#         db.Model.__init__(self, email=email, **kwargs)
# 
#     @property
#     def full_name(self):
#         return "{0} {1}".format(self.first_name, self.last_name)
# 
#     def __repr__(self):
#         return '<User({email!r})>'.format(email=self.email)


# Path: template_maker/users/views.py
import json
import urllib
import urllib2
from flask import (
    Blueprint, render_template, request, flash,
    current_app, abort, redirect, url_for
)
from flask.ext.login import current_user, login_user, logout_user
from template_maker.users.models import User



blueprint = Blueprint(
    'users', __name__, url_prefix='/users',
    template_folder='../templates'

)