Ajout du ReadMe
This commit is contained in:
parent
ab40850816
commit
d4d248ac79
|
@ -0,0 +1,22 @@
|
|||
# Pycloud
|
||||
## How to install your 'Pycloud' with development environment:
|
||||
- Install python3 (need python3 in PATH) and virtualenv (`pip3 install virtualenv`).
|
||||
- Create your cloud directory and enter in it.
|
||||
- Create a virtual environment (`python -m venv venv` or `python3 -m venv venv`).
|
||||
- Set your virtual environment (`virtualenv venv`).
|
||||
- Activate it (Windows: `venv\Script\activate`, others: `venv/bin/activate`).
|
||||
- Download all others packages (`pip3 install python-dotenv, flask, flask-wtf, flask-sqlalchemy, flask-migrate, flask-login` ).
|
||||
- Paste 'Pycloud' project on the directory.
|
||||
- Create a '.flaskenv' file and write in it:
|
||||
```
|
||||
FLASK_APP=Pycloud.py
|
||||
FLASK_ENV=development
|
||||
SECRET_KEY='key'
|
||||
```
|
||||
(And change the secret key value)
|
||||
- Initialize your Data Base (`flask db init`)
|
||||
- Initialize tables of your data base (`flask db migrate -m "users table"`, `flask db upgrade`, `flask db migrate -m "file table"`, `flask db upgrade`)
|
||||
- Create an admin account (`python3` or `python`, `from app.database import *`, `u = User(username = 'Admin', isAdmin = True)`, `u.set_password('Pass')`, `db.session.add(u)`, `db.session.commit()`)
|
||||
- Start Pycloud ('flask run').
|
||||
- Go on `127.0.0.1:5000/`
|
||||
- Enjoy!
|
Loading…
Reference in New Issue