Beispiel #1
0
from flask.ext.mail import Message, Mail# Mail: realiza la conexion con Google/ Message: es el encargado de armar el mensaje.
from flask_bootstrap import Bootstrap
import time


app = Flask(__name__)      
Bootstrap(app)

mail = Mail()

app.secret_key = 'd3v3l0pm3nt+k3y!'
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'somethingsecret@gmail.com'
app.config["MAIL_PASSWORD"] = 'somethingsecret'


mail.init_app(app)
 
@app.route('/')
def home():
  return render_template('home.html')

@app.route('/family', methods=['GET', 'POST'])
def family():
  form = ContactForm()

  if request.method == 'POST':
  	 if form.validate() == False:
  	 	flash('Algunos campos son requeridos.')
Beispiel #2
0
from flask import Flask
 
app = Flask(__name__)
 
app.secret_key = 'development key'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'contact@example.com'
app.config["MAIL_PASSWORD"] = 'your-password'
 
from routes import mail
mail.init_app(app)
 
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:123@localhost/development'
 
from models import db
db.init_app(app)


import intro_to_flask.routes
Beispiel #3
0
import os
from flask import Flask, render_template, request, flash
from forms import ContactForm
from flask.ext.mail import Message, Mail


mail = Mail()
app = Flask(__name__)

app.secret_key = os.environ['SECRET_KEY']

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = os.environ['MAIL_USERNAME']
app.config["MAIL_PASSWORD"] = os.environ['MAIL_PASSWORD']

mail.init_app(app)


#Create our index or root / route
@app.route("/")
@app.route("/index")
def index():
    return render_template("index.html")


@app.route("/contact", methods=['GET', 'POST'])
def contact():
    form = ContactForm()
Beispiel #4
0
from flask import Flask
 
app = Flask(__name__)
 
app.secret_key = 'development key'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'dyzhangweix@gmail.com'
app.config["MAIL_PASSWORD"] = 'jasonzwx123'


from routes import mail
mail.init_app(app)

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://dmonkey:123456@52.53.254.77:3306/development'
 
from models import db
db.init_app(app)

from flask.ext.qrcode import QRcode
QRcode(app)

import intro_to_flask.routes
from flask import Flask
import os
import config
 
app = Flask(__name__)
app.config.from_object(config)

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'mitzisong@gmail.com'
app.config["MAIL_PASSWORD"] = os.environ.get('MAIL_PASSWORD')
 
from routes import mail
mail.init_app(app)

import bakery_ordering_system.routes
Beispiel #6
0
from flask import Flask, render_template, request, flash
from forms import ContactForm
from flask.ext.mail import Message, Mail
 
mail = Mail()
 
app = Flask(__name__) 

app.secret_key = 'development key'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'YOur MAIL_USERNAME'
app.config["MAIL_PASSWORD"] = 'Password'
 
mail.init_app(app)   
 
@app.route('/')
def home():
  return render_template('home.html')

@app.route('/about')
def about():
  return render_template('about.html')

@app.route('/contact', methods=['GET', 'POST'])
def contact():
  form = ContactForm()
 
  if request.method == 'POST':
# Allowed extensions for image upload function
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])

# Initialize application and set upload folder
app = Flask(__name__)
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT' #Needed to have sessions
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER

# Set up mail app configurations so can send email
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_TLS"] = False
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'larissa.muramoto@gmail.com'
app.config["MAIL_PASSWORD"] = 'maminouPOOF'

# Initialize Flask Mail instance to handle sending emails
mail = Mail(app)

""" If client sends get request, then display the register template.
Otherwise, process register template information and put user in database. """
@app.route('/', methods=['GET', 'POST'])
def index():
	if request.method == 'POST':
		email = request.form['email']
		password = request.form['password']
		passwordcheck = request.form['passwordcheck']

		# Prevent users from having the same usernames; usernames should be unique.
		isExisting = model.session.query(model.User).filter_by(email=email).first()
mail = Mail()

app = Flask(__name__)

app.register_blueprint(website,url_prefix="/")
app.register_blueprint(posts,url_prefix="/posts")
app.register_blueprint(admin,url_prefix="/admin")

app.secret_key = "development key"

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = "lanigouws@gmail.com"
app.config["MAIL_PASSWORD"] = "LeeGordonMcKillop1968"

mail.init_app(app)

@app.route("/")
def index():
	return render_template("layout.html")
	
@app.route("/home")
def home():
	return render_template("home.html")
	
@app.route("/about")
def about():
	return render_template("about.html")
	
Beispiel #9
0
from flask import Flask, render_template, request, flash
from forms import ContactForm
from flask.ext.bootstrap import Bootstrap
from flask.ext.mail import Message, Mail

mail = Mail()

app = Flask(__name__)
app.secret_key = ""

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = ""
app.config["MAIL_PASSWORD"] = ""

mail.init_app(app)


bootstrap = Bootstrap(app)


def get_images():
    images = []

    for i in os.listdir(os.path.split(os.path.realpath(__file__))[0] + "/static/gallery"):
        if i != ".DS_Store":
            images.append("gallery/" + i)
    return images
Beispiel #10
0
import os
from flask import Flask
 
app = Flask(__name__)
 
app.secret_key = 'development key'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'joze.emajler@gmail.com'
app.config["MAIL_PASSWORD"] = 'KtfM7D3lGw'
 
from routes import mail
mail.init_app(app)

#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://geo1:geo1@localhost/geo1_development'
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://geo1:geo1@' + os.environ['DB_PORT_3306_TCP_ADDR'] + '/geo1_development'

from models import db
db.init_app(app)
 
import geo1.routes

from flask import Flask
 
app = Flask(__name__)
 
app.secret_key = 'development key'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'klabeau@gmail.com'
app.config["MAIL_PASSWORD"] = 'syD10gabY14'
 
from intro_to_flask.routes import mail
mail.init_app(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:GABY6SYD2@localhost/development'

from intro_to_flask.models import db
db.init_app(app)
import intro_to_flask.routes
Beispiel #12
0
from flask import Flask
 
app = Flask(__name__)

app.secret_key = 'thisisthetestkey'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'echotest245@gmail.com'  
app.config["MAIL_PASSWORD"] = 'Apple123456'
 
 
from routes import mail
mail.init_app(app)
 
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:@127.0.0.1:3306/milk'
 
from models import db
db.init_app(app)
 
import Milk.routes
Beispiel #13
0
from flask import Flask, render_template, request, flash



app = Flask(__name__)

app.secret_key = 'development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'moovonjkm@gmail.com'
app.config["MAIL_PASSWORD"] = 'frenkel2'



@app.route('/')
def home():
  return render_template('home.html')

@app.route('/profiles')
def profiles():
  return render_template('profiles.html')

@app.route('/aboutme')
def aboutme():
  return render_template('aboutme.html')

@app.route('/skills/languages')
def languages():
  return render_template('languages.html')
Beispiel #14
0
from flask import Flask
from app import mail


app = Flask(__name__, template_folder='template')
app.config.from_object(__name__)

app.secret_key = 'development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'hub25flow@gmail.com'
app.config["MAIL_PASSWORD"] = 'thehub254'


mail.init_app(app)

Beispiel #15
0
app = Flask(__name__, template_folder='views')
app.secret_key = "super secret key"
mysql = MySQL()
app.config['UPLOAD_FOLDER'] = 'uploads/'
app.config['ALLOWED_EXTENSIONS'] = set(['png', 'jpg', 'jpeg', 'gif'])
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = ''
app.config['MYSQL_DB'] = 'project'
mysql.init_app(app)

mail = Mail()
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'umsiwebdesign@gmail.com'
app.config["MAIL_PASSWORD"] = '105sstate'
mail.init_app(app)

@app.before_request
def init_session():
    session.permanent = True
    app.permanent_session_lifetime = timedelta(minutes=5)

@app.route('/uploads/<filename>')
def uploaded_file(filename):
    return send_from_directory(app.config['UPLOAD_FOLDER'],
                               filename)
def allowed_file(filename):
    return '.' in filename and \
           filename.rsplit('.', 1)[1] in app.config['ALLOWED_EXTENSIONS']
Beispiel #16
0
# Initialize the Flask application
mail = Mail()

app = Flask(__name__)

app.secret_key = 'mega secret open source development key 008'

with open('conf.txt', 'r') as f:
    data = f.readlines()

app.config["MAIL_SERVER"] = data[2].strip()
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = data[0].strip()
app.config["MAIL_PASSWORD"] = data[1].strip()

#max word amount permitted
app.config["MAX_WORDS"] = 15

mail.init_app(app)

@app.route('/')
def form():
    return render_template('form_submit.html', maxwords=app.config["MAX_WORDS"])

@app.route('/contact', methods=['GET', 'POST'])
def contact():
  form = ContactForm()

  if request.method == 'POST':
Beispiel #17
0
from jinja2.ext import do
from flask.ext.mail import Message, Mail
from datetime import datetime
import os

mail = Mail()
app = Flask(__name__)
Bootstrap(app)
app.jinja_env.add_extension('jinja2.ext.do')
app.debug = True   # need this for autoreload as well as stack trace
app.secret_key = 'luthercollege'
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'norseconfessions@gmail.com'
app.config["MAIL_PASSWORD"] = 'n0rs3c0nf3ssi0ns'
mail.init_app(app)


#app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/mydata.db'
basedir = os.path.abspath(os.path.dirname(__file__))

SQLALCHEMY_DATABASE_URI ='postgres://lyuutoxmemiolf:B9vTpATk6DfDJAmocb_iZWuHZp@ec2-54-225-101-119.compute-1.amazonaws.com:5432/d5jrjkt5lrtb1s'

db = SQLAlchemy(app)

class Post(db.Model):
    __tablename__ = 'post'
    post_id = db.Column(db.Integer, primary_key=True,autoincrement=True)
    post_des = db.Column(db.Text)
    posts = db .relationship('Comment',backref='post',lazy='dynamic')
Beispiel #18
0
from flask import Flask
from flask import render_template, jsonify, request
from flask_mail import Mail, Message

app = Flask(__name__)
# app.debug = True
mail = Mail()

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'ritairwin4clerk@gmail.com'
app.config["MAIL_PASSWORD"] = '433BeverlyIslandDrive'

mail.init_app(app)

@app.route('/')
def hello_world():
    # msg = Message("Hello",
    #               sender="from@example.com",
    #               recipients=["ahwolf@umich.edu"])
    # mail.send(msg)
    return render_template('index.html')


@app.route('/_contact', methods=['GET', 'POST'])
def contact():
    msg = Message("Phone: {phone}\tName: {name}".format(**request.json),
                  sender=request.json["email"],
                  recipients=["ritalynn1756@aol.com",'ritairwin4clerk@gmail.com']
        )
Beispiel #19
0
from flask import Flask

from flask.ext.stormpath import StormpathManager
 
app = Flask(__name__, static_folder = 'static')

app.debug = True
app.config['SECRET_KEY'] = 'ilovecookies'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USERNAME"] = 'ascanio.guarini'
app.config["MAIL_PASSWORD"] = 'Scanscan34'
app.config["MAIL_USE_SSL"] = True
app.config['MAIL_USE_TLS'] = False 

app.config["ADMINS"] = ['ascanio.guarini@gmail.com']

#import pygeoip

app.config['STORMPATH_API_KEY_ID'] = 'WDECSEWR5ZRXCS5G748IJUZ2X'
app.config['STORMPATH_API_KEY_SECRET'] = '4v6z2bLKzcNHaY6r6N8nMASxJ1FiOyZjt2XfDSuZcTI'
app.config['STORMPATH_APPLICATION'] = 'flaskapp'

stormpath_manager = StormpathManager(app)
stormpath_manager.login_view = '.login'

from routes import mail
mail.init_app(app)

# configure and initialize Sentry logging
Beispiel #20
0
mail = Mail()

app = Flask(__name__,
        static_folder="static", # match with your static folder
        static_url_path="/static" # you can change this to anything other than static, its your URL
      )
# set secret key for csrf
app.secret_key = 'development key'

# mail config

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = "sopier@gmail.com"
app.config["MAIL_PASSWORD"] = "somepassword"

mail.init_app(app)


from app import views

# logging tools
# author: https://gist.github.com/mitsuhiko/5659670
# monitor uwsgi access / error :: output di nohup.out

import sys
from logging import Formatter, StreamHandler
handler = StreamHandler(sys.stderr)
handler.setFormatter(Formatter(
    '%(asctime)s %(levelname)s: %(message)s '
Beispiel #21
0
import sys
sys.path.append('../')

from flask import Flask
from honeyvault_config import *

app = Flask(__name__)

app.secret_key = 'development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'rchat@cs.wisc.edu'
app.config["MAIL_PASSWORD"] = '1233456'

from routes import mail
mail.init_app(app)

import intro_to_flask.routes
Beispiel #22
0
    from settings_local import MAIL_PORT
    from settings_local import MAIL_USE_TLS
    from settings_local import MAIL_USERNAME
    from settings_local import MAIL_PASSWORD
    from settings_local import DEFAULT_MAIL_SENDER
except ImportError:
    MAIL_SERVER = "localhost"
    MAIL_PORT = 25
    MAIL_USE_TLS = False
    MAIL_USERNAME = MAIL_PASSWORD = DEFAULT_MAIL_SENDER = None

rsvp_app.config["MAIL_SERVER"] = MAIL_SERVER
rsvp_app.config["MAIL_PORT"] = MAIL_PORT
rsvp_app.config["MAIL_USE_TLS"] = MAIL_USE_TLS
rsvp_app.config["MAIL_USERNAME"] = MAIL_USERNAME
rsvp_app.config["MAIL_PASSWORD"] = MAIL_PASSWORD
rsvp_app.config["DEFAULT_MAIL_SENDER"] = DEFAULT_MAIL_SENDER

mail = Mail(rsvp_app)

basedir = os.path.abspath(os.path.dirname(__file__))
rsvp_app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///" + os.path.join(basedir, "rsvp.db")  # 'sqlite:////tmp/test.db'
rsvp_app.config["SQLALCHEMY_MIGRATE_REPO"] = os.path.join(basedir, "db_repository")

db = SQLAlchemy(rsvp_app)
# CORS(rsvp_app)  # allow all origins

# LOGGING

logging.basicConfig(
    filename="/tmp/aniairadek.log",
Beispiel #23
0
from flask import Flask

app = Flask(__name__)

app.secret_key = 'development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'alfie.2012@gmail.com'
app.config["MAIL_PASSWORD"] = 'masquerader'

from routes import mail
mail.init_app(app)

import intro_to_flask.routes
Beispiel #24
0
# import redis

mail = Mail()

csrf = CsrfProtect()
 
app = Flask(__name__)
csrf.init_app(app)

app.secret_key = key

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = email
app.config["MAIL_PASSWORD"] = password
 
mail.init_app(app)

# connect to redis data store
#r = redis.StrictRedis(host='localhost',port=6379,db=0)

 

@app.route('/', methods=['GET', 'POST'])
def index():
	form = ContactForm(request.form)

	if request.method == 'POST' and form.validate() == True:
		msg = Message(subject='Web Mail', sender=form.email.data, recipients=['jordantkrueger@gmail.com'])
		msg.body = """
Beispiel #25
0
from flask import Flask
app = Flask(__name__)
 
app.secret_key = 'your_secret_key'
 
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'your_email_id@gmail.com'
app.config["MAIL_PASSWORD"] = 'Your_password'

from flasked.routes import mail
mail.init_app(app)

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://username:password@localhost/database_name'
from flasked.models import db
db.init_app(app)
Beispiel #26
0
from flask import Flask, render_template, request, flash, jsonify
from forms import ContactForm
from flask.ext.mail import Message, Mail

mail = Mail()

app = Flask(__name__)

app.secret_key = 'development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'noel.mcgrath@gmail.com'
app.config["MAIL_PASSWORD"] = 'TODO'

mail.init_app(app)

@app.route('/')
def home():
  return render_template('home.html')

@app.route('/about')
def about():
  #return jsonify("hello")
  return jsonify(message=str('hello'))
  #return render_template('about.html')

@app.route('/contact', methods=['GET', 'POST'])
def contact():
  form = ContactForm()
Beispiel #27
0
from flask import Flask
from datetime import timedelta

app = Flask(__name__, static_url_path='')

app.secret_key = 'ndapp development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'contact@dinerscode.com'
app.config["MAIL_PASSWORD"] = 'DinersCode2015'
# session lifetime to keep user logged in
app.config["PERMANENT_SESSION_LIFETIME"] = timedelta(1000)

import nd_app.models
#import nd_app.forms
import nd_app.routes

from nd_app.routes import mail
mail.init_app(app)


app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://neurod_devuser:devpwd@166.62.40.36/neurod_database'
#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://neurod_devuser:devpwd@166.62.40.36/neurod_webappdev'
#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://ndsitedev:devpwd@mysql.server/ndsitedev$NeuroDining_2015'
#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://devuser:devpwd@localhost/NeuroDining'
app.config['SQLALCHEMY_POOL_RECYCLE'] = 499
app.config['SQLALCHEMY_POOL_TIMEOUT'] = 20

from nd_app.models import db
Beispiel #28
0
from flask.ext.mail import Message, Mail

mail = Mail()


#from flaskapp import app as application

app = Flask(__name__, static_url_path='')

app.secret_key = 'ndapp development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'contact@neurodining.com'
app.config["MAIL_PASSWORD"] = 'NeuroDining'

mail.init_app(app)

#error message
@app.errorhandler(404)
def page_not_found(error):
    return "Sorry, this page was not found."

@app.route("/test")
def test():
    return "<strong>It's Alive!</strong>"

@app.route("/news")
def news():
    return render_template("news.html")
Beispiel #29
0
import os
from flask import Flask
from werkzeug import secure_filename


UPLOAD_FOLDER = './uploads/'
ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])

app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.secret_key = 'development key'

app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'joeterskine@gmail.com'
app.config["MAIL_PASSWORD"] = 'Pavilion12'

from routes import mail
mail.init_app(app)

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:password@localhost/development'

from models import db
db.init_app(app)

import creighton.routes
Beispiel #30
0
from flask.ext.mail import Message, Mail
from functools import wraps
from models import Base, User, Tareas
from flask.ext.sqlalchemy import SQLAlchemy
 
#CONFIGURACIÓN
 
app = Flask(__name__)
app.secret_key = '\x84\xed\xca\xe36\x8d\x17\xd4\xb3X\xfd1\xdfJx\xc6\xe9\xcf\x00\xdf\x9e \xa9l'

#mail
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'dragost11@gmail.com'
app.config["MAIL_PASSWORD"] = '' # Cambiar

#SQLite
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///tareas.db'

#captcha
app.config["RECAPTCHA_PUBLIC_KEY"] = '6LeJmeoSAAAAAGAv9mSzRk-mKEE3I8i1LoqjClcA'
app.config["RECAPTCHA_PRIVATE_KEY"] = '6LeJmeoSAAAAAG38d7TBJqN5TPumnh80pVYwORL3'

#mail 
mail = Mail()
mail.init_app(app)

# SQL Alchemy
db = SQLAlchemy(app)
db.Model = Base