Skip to content

Optega/admin-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Change the data in the file to Flask

Getting started

.env

  1. Create .env from .evn example;
  2. Update the data in .env

A secret key should be as random as possible. Your operating system has ways to generate pretty random data based on a cryptographic random generator. Use the following command to quickly generate a value for FLASK_SECRET_KEY:

python -c 'import secrets; print(secrets.token_hex())'

recipients.json

You need to create a file recipients.json with the data template in the root folder

[
  {
    "id": 1,
    "phone": "+380987654321",
    "name": "John"
  },
  {
    "id": 2,
    "phone": "+380123456789",
    "name": "Jane"
  },
  {
    "id": 3,
    "phone": "+380918273645",
    "name": "Jack"
  },
  {
    "id": 4,
    "phone": "+380192837465",
    "name": "Jill"
  }
]

The program is created to edit the recipients.json file. In docker, the recipients.json file is used by volume, it can be used in other code.

I am using code as an admin to change message recipients. I have a script that sends messages to recipients in the recipients.json file

Run in Development Mode

cd admin
flask run --debug

Run Container in Production Mode

docker compose -f docker/docker-compose.yml up -d

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published