33 lines
965 B
Python
33 lines
965 B
Python
from flask import Flask
|
|
from config import Config
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
from flask_migrate import Migrate
|
|
from flask_login import LoginManager
|
|
|
|
app = Flask(__name__)
|
|
app.config.from_object(Config)
|
|
db = SQLAlchemy(app)
|
|
migrate = Migrate(app, db)
|
|
login = LoginManager(app)
|
|
|
|
# There is the dictionnary, which can be usefull when you want to change the language.
|
|
words = {
|
|
'nameApp' : 'Pycloud',
|
|
'nameHome' : 'Home',
|
|
'nameUpload' : 'Upload',
|
|
'nameLogin' : 'Login',
|
|
'nameRegister' : 'Register',
|
|
'termLogout' : 'Logout',
|
|
'termChoose' : 'Choose a directory',
|
|
'termSubmit' : 'Submit',
|
|
'termUsername' : 'Username',
|
|
'termPassword' : 'Password',
|
|
'termRepeatPassword' : 'Repeat Password',
|
|
'termRememberMe' : 'Remember Me',
|
|
'termIsAdmin' : 'Is Admin?',
|
|
'termRegistered' : 'Registered: ',
|
|
'ErrorInvalid' : 'Invalid Password or Username',
|
|
'ErrorUsername' : 'Username already used'
|
|
}
|
|
|
|
from app import routes, models |