CleanUp before Update

This commit is contained in:
App Generator
2023-06-06 10:56:09 +03:00
parent bc4d5dc6d9
commit 3e51831eab
228 changed files with 0 additions and 35147 deletions

View File

@ -1,12 +0,0 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from flask import Blueprint
blueprint = Blueprint(
'home_blueprint',
__name__,
url_prefix=''
)

View File

@ -1,53 +0,0 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from apps.home import blueprint
from flask import render_template, request
from flask_login import login_required
from jinja2 import TemplateNotFound
@blueprint.route('/index')
@login_required
def index():
return render_template('home/index.html', segment='index')
@blueprint.route('/<template>')
@login_required
def route_template(template):
try:
if not template.endswith('.html'):
pass
# Detect the current page
segment = get_segment(request)
# Serve the file (if exists) from app/templates/home/FILE.html
return render_template("home/" + template, segment=segment)
except TemplateNotFound:
return render_template('home/page-404.html'), 404
except:
return render_template('home/page-500.html'), 500
# Helper - Extract current page name from request
def get_segment(request):
try:
segment = request.path.split('/')[-1]
if segment == '':
segment = 'index'
return segment
except:
return None