drafter-edu / drafter

A simple Python library for making websites
https://drafter-edu.github.io/drafter/
MIT License
0 stars 1 forks source link

Make MAIN_SERVER properly replaceable #23

Open acbart opened 2 weeks ago

acbart commented 2 weeks ago

We now provide get_main_server and set_main_server functions. However, they will not actually replace the MAIN_SERVER in previously imported packages' default function arguments. Those need to be refactored into more dynamically accessed arguments (i.e, None as the default value and then a get_main_server call inside if the value is None, or perhaps an additional helper function that simplifies it into a one-liner.