mod file readme and main for linux and windows
This commit is contained in:
parent
8d47268690
commit
5f4eaee672
28
README.md
28
README.md
@ -1,5 +1,5 @@
|
||||
|
||||
1) Copiar el proyecto y moverlo a la carpeta de Apache:
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
git clone gitea@192.168.10.40:dix/sict_csic.git
|
||||
@ -9,6 +9,7 @@ sudo su
|
||||
```
|
||||
|
||||
2) Instalar dependencias:
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
@ -19,3 +20,28 @@ exit
|
||||
|
||||
- 2.1) Habilita módulos de [CACHE](https://xala.dev/section/apache/tema/36)
|
||||
|
||||
3) Checar la versión de python:
|
||||
|
||||
```bash
|
||||
python3 --version
|
||||
```
|
||||
|
||||
- 3.1) Si aplica, actualiza la versión en el archivo conf.
|
||||
```bash
|
||||
sudo nano sictApp.wsgi
|
||||
```
|
||||
|
||||
4) Movemos el archivo conf:
|
||||
|
||||
```bash
|
||||
sudo mv sict-csic.page.conf /etc/apache2/sites-available/
|
||||
cd /etc/apache2/sites-available/
|
||||
```
|
||||
|
||||
- 4.1) Este sitio se despliega en el puerto 80, por lo que debes desactivar el archivo defaul:
|
||||
```bash
|
||||
sudo a2dissite 000-default.conf
|
||||
sudo a2ensite sict-csic.page.conf
|
||||
sudo systemctl restart apache2
|
||||
ip a | grep "inet 192.168.10"
|
||||
```
|
BIN
help_files/__pycache__/db_cls.cpython-312.pyc
Normal file
BIN
help_files/__pycache__/db_cls.cpython-312.pyc
Normal file
Binary file not shown.
8
main.py
8
main.py
@ -2,12 +2,16 @@ from flask import Flask, render_template, url_for, jsonify, send_file, send_from
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, PasswordField
|
||||
from wtforms.validators import DataRequired, InputRequired
|
||||
|
||||
import platform
|
||||
import json
|
||||
import os
|
||||
from help_files.db_cls import DBSQLite
|
||||
|
||||
db_path = os.path.join(os.getcwd(), "help_files/sict_csic.db")
|
||||
|
||||
if 'microsoft' in platform.uname().release.lower():
|
||||
db_path = os.path.join(os.getcwd(), "help_files/sict_csic.db")
|
||||
elif platform.system() == "Linux":
|
||||
db_path = "/var/www/sict_csic/help_file/sict_csic.db"
|
||||
|
||||
DB = DBSQLite(db_path)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user