<reponame>harshv2013/microblog_Bluprint<gh_stars>0
import os
from dotenv import load_dotenv

basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))


class Config(object):
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
    SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
        'sqlite:///' + os.path.join(basedir, 'app.db')
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    MAIL_SERVER = os.environ.get('MAIL_SERVER')
    MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25)
    MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
    MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
    MAIL_PASSWORD = <PASSWORD>('MAIL_PASSWORD')
    ADMINS = ['<EMAIL>']
    LANGUAGES = ['en', 'es']
    MS_TRANSLATOR_KEY = os.environ.get('MS_TRANSLATOR_KEY')
    POSTS_PER_PAGE = 25

    #UNCOMMENT THE CODE WRITTEN BELOW TO SEND MAIL
    #OR CHECH ON NET WHY THIS ERROR IS COMING
    # raise SMTPServerDisconnected('please run connect() first')



    # MAIL_SERVER = 'smtp.gmail.com'
    # MAIL_PORT = 465
    # MAIL_USE_TLS = False
    # MAIL_USE_SSL = True
    # MAIL_USERNAME = '<EMAIL>'
    # MAIL_PASSWORD = '<PASSWORD>'
    # ADMINS = ['<EMAIL>']
    # POSTS_PER_PAGE = 2

import os
from dotenv import load_dotenv

basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))


class Config(object):
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
    SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
        'sqlite:///' + os.path.join(basedir, 'app.db')
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    MAIL_SERVER = os.environ.get('MAIL_SERVER')
    MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25)
    MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
    MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
    MAIL_PASSWORD = <PASSWORD>('MAIL_PASSWORD')
    ADMINS = ['<EMAIL>']
    LANGUAGES = ['en', 'es']
    MS_TRANSLATOR_KEY = os.environ.get('MS_TRANSLATOR_KEY')
    POSTS_PER_PAGE = 25

    #UNCOMMENT THE CODE WRITTEN BELOW TO SEND MAIL
    #OR CHECH ON NET WHY THIS ERROR IS COMING
    # raise SMTPServerDisconnected('please run connect() first')



    # MAIL_SERVER = 'smtp.gmail.com'
    # MAIL_PORT = 465
    # MAIL_USE_TLS = False
    # MAIL_USE_SSL = True
    # MAIL_USERNAME = '<EMAIL>'
    # MAIL_PASSWORD = '<PASSWORD>'
    # ADMINS = ['<EMAIL>']
    # POSTS_PER_PAGE = 2
#UNCOMMENT THE CODE WRITTEN BELOW TO SEND MAIL #OR CHECH ON NET WHY THIS ERROR IS COMING # raise SMTPServerDisconnected('please run connect() first') # MAIL_SERVER = 'smtp.gmail.com' # MAIL_PORT = 465 # MAIL_USE_TLS = False # MAIL_USE_SSL = True # MAIL_USERNAME = '<EMAIL>' # MAIL_PASSWORD = '<PASSWORD>' # ADMINS = ['<EMAIL>'] # POSTS_PER_PAGE = 2