27 lines
560 B
Python
27 lines
560 B
Python
__author__ = 'RemiZOffAlex'
|
|
__copyright__ = '(c) RemiZOffAlex'
|
|
__license__ = 'MIT'
|
|
__email__ = 'remizoffalex@mail.ru'
|
|
__url__ = 'https://remizoffalex.ru'
|
|
|
|
from flask import render_template, escape, request, session, redirect
|
|
|
|
from .. import app, lib, models
|
|
|
|
|
|
@app.route('/login')
|
|
def login():
|
|
"""
|
|
Логин
|
|
"""
|
|
pagedata = {}
|
|
body = render_template('login.html', pagedata=pagedata)
|
|
return body
|
|
|
|
|
|
@app.route('/logout')
|
|
def logout():
|
|
session.pop('logged_in', None)
|
|
session.pop('user_id', None)
|
|
return redirect("/", code=302)
|