marcpage / scheduling

Restaurant staff scheduling website
The Unlicense
3 stars 4 forks source link

Now we can prepopulate the database by passing --test/-t #64

Closed marcpage closed 2 years ago

marcpage commented 2 years ago

To speed up testing and development, I added a way to prepopulate the database with some users and restaurants.

ghost commented 2 years ago

Can you tell me which file contains the flask code actually? I am not able to figure out which file connects with "html" files ?

On Mon, 3 Jan 2022 at 02:35, Marc Page @.***> wrote:

Merged #64 https://github.com/marcpage/scheduling/pull/64 into main.

— Reply to this email directly, view it on GitHub https://github.com/marcpage/scheduling/pull/64#event-5833047382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7PRY5I47HYZR6KT7WLMCDUUC42LANCNFSM5LECB3OA . You are receiving this because your review was requested.Message ID: @.***>

marcpage commented 2 years ago

There are five python files at the moment.

  1. src/scheduling.py The flask app, all web server connection handling
  2. src/model.py The SQLAlchemy database management code
  3. src/tests/test_model.py The unit tests for model.py
  4. src/tests/prepopulate.py Code that will prepopulate the database to make it easier to work with (if you pass --test)
  5. src/tests/__init__.py A file needed to get the unit tests to run

src/scheduling.py is the code that starts the web server. I do have a bug in serving static (files that do not change) that I will put up with the pull request I'm working on now.