Commit
This commit is contained in:
parent
9da22def72
commit
354f365c48
1
.gitignore
vendored
1
.gitignore
vendored
@ -69,3 +69,4 @@ migrations/*
|
|||||||
|
|
||||||
.env
|
.env
|
||||||
.idea/*
|
.idea/*
|
||||||
|
*.zip
|
||||||
|
@ -12,6 +12,7 @@ from PDMI.blueprints.admin import admin
|
|||||||
from PDMI.blueprints.api import api, api_0_0_1
|
from PDMI.blueprints.api import api, api_0_0_1
|
||||||
from PDMI.blueprints.front import front
|
from PDMI.blueprints.front import front
|
||||||
from PDMI.blueprints.documentation import documentation
|
from PDMI.blueprints.documentation import documentation
|
||||||
|
from PDMI.blueprints.external import external
|
||||||
from PDMI.models import db, Users, Roles
|
from PDMI.models import db, Users, Roles
|
||||||
from PDMI.views import main_bp
|
from PDMI.views import main_bp
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ api_0_0_1.init_app(server)
|
|||||||
|
|
||||||
server.register_blueprint(front)
|
server.register_blueprint(front)
|
||||||
server.register_blueprint(documentation)
|
server.register_blueprint(documentation)
|
||||||
|
server.register_blueprint(external)
|
||||||
|
|
||||||
# Register main blueprint
|
# Register main blueprint
|
||||||
server.register_blueprint(main_bp)
|
server.register_blueprint(main_bp)
|
||||||
|
@ -106,7 +106,8 @@ admin = Admin( # server,
|
|||||||
},
|
},
|
||||||
endpoint='administration',
|
endpoint='administration',
|
||||||
disconnect_route="security.logout",
|
disconnect_route="security.logout",
|
||||||
connect_route="security.login"
|
connect_route="security.login",
|
||||||
|
favicon="favicon.ico"
|
||||||
)
|
)
|
||||||
|
|
||||||
admin.add_view(SuperUserView(
|
admin.add_view(SuperUserView(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from flask import Blueprint, render_template, abort
|
from flask import Blueprint, render_template, abort
|
||||||
|
|
||||||
documentation = Blueprint('documentation', __name__, template_folder="templates")
|
documentation = Blueprint('documentation', __name__, template_folder="templates", url_prefix="/documentation")
|
||||||
|
|
||||||
|
|
||||||
@documentation.route("/")
|
@documentation.route("/")
|
||||||
|
13
PDMI/blueprints/external/__init__.py
vendored
Normal file
13
PDMI/blueprints/external/__init__.py
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from flask import Blueprint, render_template, abort
|
||||||
|
|
||||||
|
external = Blueprint('external', __name__, template_folder="templates")
|
||||||
|
|
||||||
|
|
||||||
|
@external.route("/external/download")
|
||||||
|
def download():
|
||||||
|
return redirect("https://moriya.zapto.org/PDBA/bot-base", code=302)
|
||||||
|
|
||||||
|
@external.route("/external/download_server")
|
||||||
|
def download_server():
|
||||||
|
return redirect("https://moriya.zapto.org/PDBA/PDMI", code=302)
|
||||||
|
|
@ -1,8 +1,13 @@
|
|||||||
from flask import Blueprint, render_template, abort
|
from flask import Blueprint, render_template, abort, send_from_directory
|
||||||
|
|
||||||
front = Blueprint('front', __name__, template_folder="templates")
|
front = Blueprint('front', __name__, template_folder="templates")
|
||||||
|
|
||||||
|
|
||||||
|
@front.route('/favicon.ico')
|
||||||
|
def favicon():
|
||||||
|
return send_from_directory('static', 'favicon.ico', mimetype='image/vnd.microsoft.icon')
|
||||||
|
|
||||||
|
|
||||||
@front.route("/")
|
@front.route("/")
|
||||||
def index():
|
def index():
|
||||||
return render_template("front/index.html")
|
return render_template("front/index.html")
|
||||||
|
0
PDMI/modules/boissons/0.0.1/__init__.py
Normal file
0
PDMI/modules/boissons/0.0.1/__init__.py
Normal file
0
PDMI/modules/boissons/0.0.1/version.json
Normal file
0
PDMI/modules/boissons/0.0.1/version.json
Normal file
@ -13,6 +13,7 @@
|
|||||||
<link href="{{ url_for('static', filename='documentation/vendor/bootstrap-4.3.1/css/bootstrap.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='documentation/vendor/bootstrap-4.3.1/css/bootstrap.css') }}" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
{% include "front/base/navbar.html" %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<link href="{{ url_for('static', filename='front/vendor/bootstrap-4.3.1/css/bootstrap.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='front/vendor/bootstrap-4.3.1/css/bootstrap.css') }}" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
{% include "front/base/navbar.html" %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
|
31
PDMI/templates/front/base/navbar.html
Normal file
31
PDMI/templates/front/base/navbar.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||||
|
<a class="navbar-brand" href="#">P.D.M.I</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||||
|
<ul class="navbar-nav mr-auto">
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="{{ url_for('front.index') }}">Home <span class="sr-only">(current)</span></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ url_for('documentation.index') }}">Documentation</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Download</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="dropdown01">
|
||||||
|
<a class="dropdown-item" href="{{ url_for('external.download') }}">Download bot</a>
|
||||||
|
<a class="dropdown-item" href="{{ url_for('external.download_server') }}">Download server</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ url_for('admin.index') }}">Gestion des modules</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<form class="form-inline my-2 my-lg-0">
|
||||||
|
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
|
||||||
|
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</nav>
|
@ -2,103 +2,68 @@
|
|||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
|
||||||
<a class="navbar-brand" href="#">Navbar</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li class="nav-item active">
|
|
||||||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">Link</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link disabled" href="#">Disabled</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdown01">
|
|
||||||
<a class="dropdown-item" href="#">Action</a>
|
|
||||||
<a class="dropdown-item" href="#">Another action</a>
|
|
||||||
<a class="dropdown-item" href="#">Something else here</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<form class="form-inline my-2 my-lg-0">
|
|
||||||
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
|
|
||||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main role="main">
|
<main role="main">
|
||||||
|
|
||||||
<!-- Main jumbotron for a primary marketing message or call to action -->
|
<!-- Main jumbotron for a primary marketing message or call to action -->
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="display-3">PDMI - Python Discord Module Index</h1>
|
||||||
|
<p>
|
||||||
|
PDMI is a part of PDBA project. PDBA is a basic discord bot which integrate possibility to install
|
||||||
|
modules.
|
||||||
|
PDMI is the website where most of modules are uploaded. If you want to create your own module you can
|
||||||
|
check
|
||||||
|
<a href="{{ url_for('documentation.create_module') }}">documentation</a>. You can also create your own
|
||||||
|
<a href="{{ url_for('documentation.create_repository') }}">repository</a>.
|
||||||
|
</p>
|
||||||
|
<p><a class="btn btn-primary btn-lg" href="{{ url_for('documentation.index') }}" role="button">Learn more
|
||||||
|
»</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="display-3">PDMI - Python Discord Module index</h1>
|
<!-- Example row of columns -->
|
||||||
<p>
|
<div class="row">
|
||||||
PDMI is a part of PDBA project. PDBA is a basic discord bot which integrate possibility to install modules.
|
<div class="col-md-4">
|
||||||
PDMI is the website where most of modules are uploaded. If you want to create your own module you can check
|
<h2>Heading</h2>
|
||||||
<a href="{{ url_for('documentation.create_module') }}">documentation</a>. You can also create your own
|
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor
|
||||||
<a href="{{ url_for('documentation.create_repository') }}">repository</a>.
|
mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna
|
||||||
</p>
|
mollis euismod. Donec sed odio dui. </p>
|
||||||
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more »</a></p>
|
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-4">
|
||||||
|
<h2>Heading</h2>
|
||||||
|
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor
|
||||||
|
mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna
|
||||||
|
mollis euismod. Donec sed odio dui. </p>
|
||||||
|
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<h2>Heading</h2>
|
||||||
|
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula
|
||||||
|
porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh,
|
||||||
|
ut fermentum massa justo sit amet risus.</p>
|
||||||
|
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<hr>
|
||||||
<!-- Example row of columns -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<h2>Heading</h2>
|
|
||||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
|
||||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<h2>Heading</h2>
|
|
||||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
|
||||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<h2>Heading</h2>
|
|
||||||
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
|
||||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
</div> <!-- /container -->#}
|
||||||
|
|
||||||
</div> <!-- /container -->
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<p>© Company 2017-2019</p>
|
<p>© Louis Chauvet 2019</p>
|
||||||
</footer>
|
</footer>
|
||||||
<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://code.jquery.com/jquery-3.3.1.slim.min.js"
|
||||||
<script>window.jQuery || document.write('<script src="/docs/4.3/assets/js/vendor/jquery-slim.min.js"><\/script>')</script><script src="/docs/4.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o" crossorigin="anonymous"></script></body>
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="/docs/4.3/assets/js/vendor/jquery-slim.min.js"><\/script>')
|
||||||
|
</script>
|
||||||
<h1>PDMI - Python Discord Module Index</h1>
|
<script src="/docs/4.3/dist/js/bootstrap.bundle.min.js"
|
||||||
<p>PDMI is a module's repository for Python Discord Bot (insert here bot name)</p>
|
integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o"
|
||||||
<div>
|
crossorigin="anonymous"></script>
|
||||||
<input>
|
{% endblock %}
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h2>Téléchargements du serveur</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Code source: <a href="https://moriya.zapto.org/PDBA/PDMI">PDMI</a></li>
|
|
||||||
</ul>
|
|
||||||
<h2>Téléchargements du gestionaire</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Code source: <a href="https://moriya.zapto.org/PDBA/PDBd">PDBd</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<a href="{{ url_for('admin.index') }}">Connection à la gestion des modules</a><br/>
|
|
||||||
{% endblock %}
|
|
||||||
|
@ -2,11 +2,9 @@ import os
|
|||||||
|
|
||||||
from flask import render_template, Blueprint, send_from_directory
|
from flask import render_template, Blueprint, send_from_directory
|
||||||
|
|
||||||
|
|
||||||
main_bp = Blueprint('', __name__)
|
main_bp = Blueprint('', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@main_bp.route('/favicon.ico')
|
@main_bp.route('/favicon.ico')
|
||||||
def favicon():
|
def favicon():
|
||||||
return send_from_directory('static','favicon.ico', mimetype='image/vnd.microsoft.icon')
|
return send_from_directory('static', 'favicon.ico', mimetype='image/vnd.microsoft.icon')
|
||||||
|
2
Pipfile
2
Pipfile
@ -19,6 +19,8 @@ flask-sqlalchemy = "*"
|
|||||||
flask-restful = "*"
|
flask-restful = "*"
|
||||||
gunicorn = "*"
|
gunicorn = "*"
|
||||||
aiohttp = "*"
|
aiohttp = "*"
|
||||||
|
pymysql = "*"
|
||||||
|
mysqlclient = "*"
|
||||||
|
|
||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
|
20
Pipfile.lock
generated
20
Pipfile.lock
generated
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "ea0d8bb7db8b76ca580aaa467b0d8986afa79a1c1fb3424f8a810489a603c602"
|
"sha256": "716ae46683112c8d3575155ca5485cf73cf9cd02c589f5fa5213b51acb3397e2"
|
||||||
},
|
},
|
||||||
"host-environment-markers": {
|
"host-environment-markers": {
|
||||||
"implementation_name": "cpython",
|
"implementation_name": "cpython",
|
||||||
@ -11,7 +11,7 @@
|
|||||||
"platform_python_implementation": "CPython",
|
"platform_python_implementation": "CPython",
|
||||||
"platform_release": "4.19.27-gentoo-r1",
|
"platform_release": "4.19.27-gentoo-r1",
|
||||||
"platform_system": "Linux",
|
"platform_system": "Linux",
|
||||||
"platform_version": "#1 SMP Wed May 1 11:50:20 CEST 2019",
|
"platform_version": "#1 SMP Sat Jun 1 19:49:57 CEST 2019",
|
||||||
"python_full_version": "3.7.3",
|
"python_full_version": "3.7.3",
|
||||||
"python_version": "3.7",
|
"python_version": "3.7",
|
||||||
"sys_platform": "linux"
|
"sys_platform": "linux"
|
||||||
@ -51,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
"babel": {
|
"babel": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==2.6.0"
|
"version": "==2.7.0"
|
||||||
},
|
},
|
||||||
"blinker": {
|
"blinker": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
@ -86,7 +86,7 @@
|
|||||||
},
|
},
|
||||||
"flask-migrate": {
|
"flask-migrate": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==2.5.1"
|
"version": "==2.5.2"
|
||||||
},
|
},
|
||||||
"flask-principal": {
|
"flask-principal": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
@ -139,7 +139,7 @@
|
|||||||
},
|
},
|
||||||
"mako": {
|
"mako": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==1.0.10"
|
"version": "==1.0.11"
|
||||||
},
|
},
|
||||||
"markupsafe": {
|
"markupsafe": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
@ -149,10 +149,18 @@
|
|||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==4.5.2"
|
"version": "==4.5.2"
|
||||||
},
|
},
|
||||||
|
"mysqlclient": {
|
||||||
|
"hashes": [],
|
||||||
|
"version": "==1.4.2.post1"
|
||||||
|
},
|
||||||
"passlib": {
|
"passlib": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==1.7.1"
|
"version": "==1.7.1"
|
||||||
},
|
},
|
||||||
|
"pymysql": {
|
||||||
|
"hashes": [],
|
||||||
|
"version": "==0.9.3"
|
||||||
|
},
|
||||||
"python-dateutil": {
|
"python-dateutil": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==2.8.0"
|
"version": "==2.8.0"
|
||||||
@ -175,7 +183,7 @@
|
|||||||
},
|
},
|
||||||
"sqlalchemy": {
|
"sqlalchemy": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
"version": "==1.3.3"
|
"version": "==1.3.4"
|
||||||
},
|
},
|
||||||
"typing-extensions": {
|
"typing-extensions": {
|
||||||
"hashes": [],
|
"hashes": [],
|
||||||
|
21
conf.sh
21
conf.sh
@ -255,7 +255,6 @@ bdd_config () {
|
|||||||
2>&1 1>&3)
|
2>&1 1>&3)
|
||||||
local exit_status=$?
|
local exit_status=$?
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
close ${exit_status}
|
|
||||||
source .env
|
source .env
|
||||||
case ${selection} in
|
case ${selection} in
|
||||||
1)
|
1)
|
||||||
@ -278,29 +277,11 @@ add_super_admin () {
|
|||||||
2>&1 1>&3)
|
2>&1 1>&3)
|
||||||
local exit_status=$?
|
local exit_status=$?
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
close ${exit_status}
|
|
||||||
source .env
|
source .env
|
||||||
pipenv run python manage.py set_superadmin -m "${utilisateur}"
|
pipenv run python manage.py set_superadmin -m "${utilisateur}"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
#configuration () {
|
|
||||||
# exec 3>&1
|
|
||||||
# local selection=$($DIALOG \
|
|
||||||
# --backtitle "Configuration" \
|
|
||||||
# --menu "Quelle variable modifier?" \
|
|
||||||
# 0 0 0 \
|
|
||||||
# "1" "DATABASE_URI" \
|
|
||||||
# 2>&1 1>&3)
|
|
||||||
# exit_status=$?
|
|
||||||
# exec 3>&-
|
|
||||||
# close $exit_status
|
|
||||||
# case $selection in
|
|
||||||
# 1)
|
|
||||||
# set_env_var "DATABASE_URI";;
|
|
||||||
# esac
|
|
||||||
#}
|
|
||||||
|
|
||||||
utilitaires () {
|
utilitaires () {
|
||||||
exec 3>&1
|
exec 3>&1
|
||||||
selection=$(${DIALOG} \
|
selection=$(${DIALOG} \
|
||||||
@ -312,7 +293,6 @@ utilitaires () {
|
|||||||
2>&1 1>&3)
|
2>&1 1>&3)
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
close ${exit_status}
|
|
||||||
case ${selection} in
|
case ${selection} in
|
||||||
1)
|
1)
|
||||||
add_super_admin;;
|
add_super_admin;;
|
||||||
@ -424,7 +404,6 @@ while true; do
|
|||||||
eend 0 "End."
|
eend 0 "End."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
close ${exit_status}
|
|
||||||
case ${selection} in
|
case ${selection} in
|
||||||
1)
|
1)
|
||||||
initialisation;;
|
initialisation;;
|
||||||
|
Loading…
Reference in New Issue
Block a user