Fufushke / simple-python-website

This is a simple website project for service prototyping
0 stars 0 forks source link

Simple Python Website Project

General

This is a Simple Python Website Project that can be used for prototyping modern web services. This application is not very scalable nor data secure and thus should not be used in production.

The project uses

Requirements

Install dependencies

$ cd simple-python-website
$ python3 -m venv venv/
$ source venv/bin/activate
$ python3 -m pip install -r requirements.txt

Update dependencies (if you make changes)

$ cd simple-python-website
$ source venv/bin/activate
$ pip freeze > requirements.txt

Install Ngrok

First register an Ngrok account and verify your email

$ snap install ngrok
$ ngrok authtoken .... 

Configuration

Using environment variables (while developing edit data/config.py)

Note: If environment variables are set, they override any / all default values

Running the application

Terminal 1

$ ngrok http 9999

Terminal 2

$ python3 main.py

Terminal 3

$ python3 test/import_test_data.py

Browser1

http://localhost:9999

Browser2

http://some-random-url.ngrok.io

Defaults

Default admin credentials

Default password should be changed before publishing (only present in the test data now)

admin / admin-password

Todo

There are still thing to do: