Add index file - / route
This commit is contained in:
@@ -62,6 +62,8 @@ def register_extensions(app):
|
|||||||
def register_blueprints(app):
|
def register_blueprints(app):
|
||||||
from .views.user_views import user_bp
|
from .views.user_views import user_bp
|
||||||
app.register_blueprint(user_bp)
|
app.register_blueprint(user_bp)
|
||||||
|
from .views.basic_views import basic_bp
|
||||||
|
app.register_blueprint(basic_bp)
|
||||||
|
|
||||||
|
|
||||||
def register_api(app):
|
def register_api(app):
|
||||||
|
|||||||
@@ -1,27 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" itemscope itemtype="http://schema.org/WebPage">
|
<html lang="en" itemscope itemtype="http://schema.org/WebPage">
|
||||||
|
|
||||||
<head>
|
{% include 'head.html' %}
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<link rel="apple-touch-icon" sizes="76x76" href="{{url_for('static', filename='assets/img/apple-icon.png')}}">
|
|
||||||
<link rel="icon" type="image/png" href="{{url_for('static', filename='./assets/img/favicon.png')}}">
|
|
||||||
<title>
|
|
||||||
{% block title %}{% endblock %}
|
|
||||||
</title>
|
|
||||||
<!-- Fonts and icons -->
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
|
|
||||||
<!-- Nucleo Icons -->
|
|
||||||
<link href="{{url_for('static', filename='/assets/css/nucleo-icons.css" rel="stylesheet')}}" />
|
|
||||||
<link href="{{url_for('static', filename='/assets/css/nucleo-svg.css" rel="stylesheet')}}" />
|
|
||||||
<!-- Font Awesome Icons -->
|
|
||||||
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
|
|
||||||
<!-- Material Icons -->
|
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
|
||||||
<!-- CSS Files -->
|
|
||||||
<link id="pagestyle" href="{{url_for('static', filename='/assets/css/material-kit-pro.css')}}" rel="stylesheet" />
|
|
||||||
<link id="pagestyle" href="{{url_for('static', filename='/assets/css/eveai.css')}}" rel="stylesheet" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="presentation-page bg-gray-200">
|
<body class="presentation-page bg-gray-200">
|
||||||
{% include 'navbar.html' %}
|
{% include 'navbar.html' %}
|
||||||
@@ -69,14 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
{# {% include 'footer.html' %}#}
|
{% include 'footer.html' %}
|
||||||
|
{% include 'scripts.html' %}
|
||||||
<!-- Optional JavaScript -->
|
|
||||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
|
||||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
|
||||||
{% block scripts %}
|
|
||||||
{%- endblock scripts %}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
0
eveai_app/templates/footer.html
Normal file
0
eveai_app/templates/footer.html
Normal file
21
eveai_app/templates/head.html
Normal file
21
eveai_app/templates/head.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" href="{{url_for('static', filename='assets/img/apple-icon.png')}}">
|
||||||
|
<link rel="icon" type="image/png" href="{{url_for('static', filename='./assets/img/favicon.png')}}">
|
||||||
|
<title>
|
||||||
|
{% block title %}{% endblock %}
|
||||||
|
</title>
|
||||||
|
<!-- Fonts and icons -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
|
||||||
|
<!-- Nucleo Icons -->
|
||||||
|
<link href="{{url_for('static', filename='/assets/css/nucleo-icons.css" rel="stylesheet')}}" />
|
||||||
|
<link href="{{url_for('static', filename='/assets/css/nucleo-svg.css" rel="stylesheet')}}" />
|
||||||
|
<!-- Font Awesome Icons -->
|
||||||
|
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
|
||||||
|
<!-- Material Icons -->
|
||||||
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
|
||||||
|
<!-- CSS Files -->
|
||||||
|
<link id="pagestyle" href="{{url_for('static', filename='/assets/css/material-kit-pro.css')}}" rel="stylesheet" />
|
||||||
|
<link id="pagestyle" href="{{url_for('static', filename='/assets/css/eveai.css')}}" rel="stylesheet" />
|
||||||
|
</head>
|
||||||
55
eveai_app/templates/index.html
Normal file
55
eveai_app/templates/index.html
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" itemscope itemtype="http://schema.org/WebPage">
|
||||||
|
|
||||||
|
{% include 'head.html' %}
|
||||||
|
|
||||||
|
<body class="presentation-page bg-gray-200">
|
||||||
|
{% include 'navbar.html' %}
|
||||||
|
{% include 'header.html' %}
|
||||||
|
<hr>
|
||||||
|
<div class="card card-body blur shadow-blur mx-3 mx-md-4 mt-n6 mb-4">
|
||||||
|
<!-- -------- START Features w/ 4 cols w/ colored icon & title & text -------- -->
|
||||||
|
<section class="py-md-7">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-md-4 ms-md-auto me-md-4">
|
||||||
|
<div class="text-start">
|
||||||
|
<div class="icon icon-md icon-shape bg-gradient-primary shadow-primary text-center border-radius-xl mt-n4">
|
||||||
|
<i class="material-icons opacity-10">payment</i>
|
||||||
|
</div>
|
||||||
|
<h5 class="mt-3">Enhanced User Interaction</h5>
|
||||||
|
<p>Interact with your customers in a modern and futureproof way, using the latest technololgie.</p>
|
||||||
|
</div>
|
||||||
|
<div class="primary text-start border-radius-lg mt-6">
|
||||||
|
<div class="icon icon-md icon-shape bg-gradient-primary shadow-primary text-center border-radius-xl mt-n4">
|
||||||
|
<i class="material-icons opacity-10">insights</i>
|
||||||
|
</div>
|
||||||
|
<h5 class="mt-3">Modern Technology</h5>
|
||||||
|
<p>Use the latest Large Language Models (think ChatGPT) to expose your knowledge and information.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 me-md-auto ms-md-4">
|
||||||
|
<div class="primary text-start border-radius-lg">
|
||||||
|
<div class="icon icon-md icon-shape bg-gradient-primary shadow-primary text-center border-radius-xl mt-n4">
|
||||||
|
<i class="material-icons opacity-10">access_alarms</i>
|
||||||
|
</div>
|
||||||
|
<h5 class="mt-3">Based on Your Information</h5>
|
||||||
|
<p>Ensure your virtual assistant is up to date with your information.</p>
|
||||||
|
</div>
|
||||||
|
<div class="primary text-start border-radius-lg mt-6">
|
||||||
|
<div class="icon icon-md icon-shape bg-gradient-primary shadow-primary text-center border-radius-xl mt-n4">
|
||||||
|
<i class="material-icons opacity-10">sentiment_satisfied</i>
|
||||||
|
</div>
|
||||||
|
<h5 class="mt-3">Enrich Your Information</h5>
|
||||||
|
<p>If required, enrich your information with the general knowledge of the world.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
{% include 'footer.html' %}
|
||||||
|
{% include 'scripts.html' %}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
7
eveai_app/templates/scripts.html
Normal file
7
eveai_app/templates/scripts.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<!-- Optional JavaScript -->
|
||||||
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
{% block scripts %}
|
||||||
|
{%- endblock scripts %}
|
||||||
@@ -3,6 +3,6 @@ from ..models.user import User, Tenant
|
|||||||
|
|
||||||
|
|
||||||
# Definition of Trigger Handlers
|
# Definition of Trigger Handlers
|
||||||
def set_tenant_session_data(sender, user):
|
def set_tenant_session_data(sender, user, **kwargs):
|
||||||
tenant = Tenant.query.filter_by(id=user.tenant_id).first()
|
tenant = Tenant.query.filter_by(id=user.tenant_id).first()
|
||||||
session['tenant'] = tenant
|
session['tenant'] = tenant
|
||||||
|
|||||||
14
eveai_app/views/basic_views.py
Normal file
14
eveai_app/views/basic_views.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
from flask import request, redirect, url_for, flash, render_template, Blueprint, session
|
||||||
|
from flask_security import hash_password, roles_required, roles_accepted
|
||||||
|
|
||||||
|
from ..models.user import User, Tenant, Role
|
||||||
|
from ..extensions import db
|
||||||
|
from .user_forms import TenantForm, CreateUserForm, EditUserForm
|
||||||
|
from ..utils.database import Database
|
||||||
|
|
||||||
|
basic_bp = Blueprint('basic_bp', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
@basic_bp.route('/', methods=['GET', ])
|
||||||
|
def index():
|
||||||
|
return render_template('index.html')
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime as dt, timezone as tz
|
from datetime import datetime as dt, timezone as tz
|
||||||
from flask import request, redirect, url_for, flash, render_template, Blueprint, session
|
from flask import request, redirect, url_for, flash, render_template, Blueprint, session
|
||||||
from flask_security import hash_password, current_user, login_required, roles_required, roles_accepted
|
from flask_security import hash_password, roles_required, roles_accepted
|
||||||
|
|
||||||
from ..models.user import User, Tenant, Role, RolesUsers
|
from ..models.user import User, Tenant, Role
|
||||||
from ..extensions import db
|
from ..extensions import db
|
||||||
from .user_forms import TenantForm, CreateUserForm, EditUserForm
|
from .user_forms import TenantForm, CreateUserForm, EditUserForm
|
||||||
from ..utils.database import Database
|
from ..utils.database import Database
|
||||||
|
|||||||
Reference in New Issue
Block a user