mirror of
https://github.com/TakeusV1/flask_ipam.git
synced 2026-10-13 17:15:33 +02:00
V1.0
This commit is contained in:
1 parent
0980efcd24
commit
f11aa2d6c6
22 files changed
+491
No files matched your search
@@ -0,0 +1,23 @@
|
||||
from datetime import datetime
|
||||
from flask import Blueprint, request, render_template, flash, redirect, url_for
|
||||
from flask_login import login_required, current_user
|
||||
|
||||
from app._config import app_version
|
||||
|
||||
from app.extensions import *
|
||||
from app.models import *
|
||||
|
||||
base = Blueprint('base', __name__)
|
||||
|
||||
@base.route('/',methods=['GET','POST'])
|
||||
def home():
|
||||
if current_user.is_authenticated:
|
||||
return redirect(url_for('base.dashboard'))
|
||||
else:
|
||||
return redirect(url_for('auth.login'))
|
||||
|
||||
@base.route('/dashboard',methods=['GET','POST'])
|
||||
@login_required
|
||||
def dashboard():
|
||||
|
||||
return render_template('panel/dashboard.html', title="Dashboard", is_dash=True, app_version=app_version)
|
||||
Reference in new issue
Block a user