# Path: server/models.py
# class Role(db.Model, RoleMixin):
# class User(db.Model, UserMixin, ValidationMixin):
# class Article(db.Model):
#     def set_password(self, password):
#     def check_password(self, password):
#     def check_mail_for_uniqueness(self, new_email):
#     def check_unique_username(self, new_username):
#     def import_data(self, data):
#     def __init__(self, title, text, author):
#     def author_username(self):
#     def __repr__(self):


from flask.ext.mail import Mail
from flask.ext.cors import CORS
from flask.ext.security import Security, SQLAlchemyUserDatastore
from .models import User, Role, db
from flask_jwt import JWT
from flask import abort, jsonify, current_app
from datetime import datetime
# -*- coding: utf-8 -*-
from __future__ import absolute_import


class CheckError(ValueError):
    pass


mail = Mail()


cors = CORS()



# Path: server/models.py
# class Role(db.Model, RoleMixin):
# class User(db.Model, UserMixin, ValidationMixin):
# class Article(db.Model):
#     def set_password(self, password):
#     def check_password(self, password):
#     def check_mail_for_uniqueness(self, new_email):
#     def check_unique_username(self, new_username):
#     def import_data(self, data):
#     def __init__(self, title, text, author):
#     def author_username(self):
#     def __repr__(self):


# Path: server/extensions.py
from flask.ext.mail import Mail
from flask.ext.cors import CORS
from flask.ext.security import Security, SQLAlchemyUserDatastore
from .models import User, Role, db
from flask_jwt import JWT
from flask import abort, jsonify, current_app
from datetime import datetime

# -*- coding: utf-8 -*-
from __future__ import absolute_import


class CheckError(ValueError):
    pass


mail = Mail()


cors = CORS()



datastore = SQLAlchemyUserDatastore(db, User, Role)