This is a simple web application for a staff member at Hogwarts School. It allows you to create and store documents and necessary records.
- python 3.6.8
- Flask
- SQLAlchemy
- bootstrap 4
- PostgreSQL 11.4
- Amazon S3 - AWS
First, you need to clone the repository using git
$ git clone https://github.com/Quastrado/project_o_mail_service.git
Then create a virtual environment in the project folder using the venv tool
$ python3 -m venv env
And activate the virtual environment
$ source env/bin/activate
Using file requirements.txt, install neсessary modules and packages
$ pip install -r requirements.txt
Add to the root of application folder file config.py, which will contain:
- Secret key
- PostgreSQL parameters
- AWS keys, region, bucket name
Something like:
class BaseConfig:
SECRET_KEY = "your secret key"
DEBUG = True
AWS_ACCESS_KEY_ID = 'your aws_access_key_id'
AWS_SECRET_ACCESS_KEY = 'your aws_secret_access_key'
AWS_REGION = 'your aws region'
AWS_BUCKET_NAME = 'your bucket name'
POSTGRES = {
'user': 'xxx',
'password': 'xxx',
'host': 'localhost',
'database': 'xxx'
}
SQLALCHEMY_DATABASE_URI = 'postgresql://%(user)s:%(password)s@%(host)s/%(database)s' % POSTGRES
Create tables in your database
$ python create_db.py
Create user for application
$ python create_admin.py
Open the terminal in the application folder and aсctivate virtual environment
$ source env/bin/activate
Launch the application
$ sh run.sh
And just click on the link terminal
Log in using login and password which you that you specified when creating the user. This project still in development. But you can create documents now. Choose "Write" in menu and start create a document
In development