···77The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8899THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1010-
···11__version__ = "0.1.0"
22-__version_info__ = tuple(
33- [
44- int(num) if num.isdigit() else num
55- for num in __version__.replace("-", ".", 1).split(".")
66- ]
77-)
22+__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".")])
···77 class Meta:
88 model = Facility
99 fields = ["name", "district", "address", "oxygen_capacity", "phone_number"]
1010- labels = {"name": "Enter the name of your hospital", "district": "Pick your District",
1111- "address": "Enter Hospital Address",
1212- "phone_number": "Enter emergency contact number of your hospital","oxygen_capacity":"Enter the total oxygen capacity of your hospital (in litres)"}
1010+ labels = {
1111+ "name": "Enter the name of your hospital",
1212+ "district": "Pick your District",
1313+ "address": "Enter Hospital Address",
1414+ "phone_number": "Enter emergency contact number of your hospital",
1515+ "oxygen_capacity": "Enter the total oxygen capacity of your hospital (in litres)",
1616+ }
131714181519class FacilityCapacityCreationForm(ModelForm):
1620 class Meta:
1721 model = FacilityCapacity
1822 fields = ["room_type", "total_capacity", "current_capacity"]
1919- labels = {"room_type": "Bed Type", "total_capacity": "Total Capacity",
2020- "current_capacity": "Currently Occupied"}
2323+ labels = {"room_type": "Bed Type", "total_capacity": "Total Capacity", "current_capacity": "Currently Occupied"}
212422252326class DoctorsCountCreationForm(ModelForm):
···991010<p>We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.</p>
1111{% endblock content %}
1212-1313-
-1
care/templates/account/account_inactive.html
···991010<p>{% trans "This account is inactive." %}</p>
1111{% endblock %}
1212-
···23232424 <p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
2525{% endblock %}
2626-
-1
care/templates/account/password_reset_done.html
···14141515 <p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
1616{% endblock %}
1717-
···991010<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
1111{% endblock %}
1212-
-1
care/templates/account/verification_sent.html
···1010 <p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
11111212{% endblock %}
1313-
···20202121# This allows easy placement of apps within the interior
2222# care directory.
2323-app_path = os.path.abspath(
2424- os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
2525-)
2323+app_path = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir))
2624sys.path.append(os.path.join(app_path, "care"))
2725# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
2826# if running multiple sites in the same mod_wsgi process. To fix this, use
+1-3
merge_production_dotenvs_in_dotenv.py
···1212DOTENV_FILE_PATH = os.path.join(ROOT_DIR_PATH, ".env")
131314141515-def merge(
1616- output_file_path: str, merged_file_paths: Sequence[str], append_linesep: bool = True
1717-) -> None:
1515+def merge(output_file_path: str, merged_file_paths: Sequence[str], append_linesep: bool = True) -> None:
1816 with open(output_file_path, "w") as output_file:
1917 for merged_file_path in merged_file_paths:
2018 with open(merged_file_path, "r") as merged_file:
+6
setup.cfg
···11[flake8]
22max-line-length = 120
33exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules
44+extend-ignore =
55+ # See https://github.com/PyCQA/pycodestyle/issues/373
66+ E203, E231,
4758[pycodestyle]
69max-line-length = 120
···2124[mypy-*.migrations.*]
2225# Django migrations should not produce any errors:
2326ignore_errors = True
2727+2828+[isort]
2929+known_third_party = allauth,crispy_forms,django,django_filters,drf_extra_fields,drf_yasg,environ,location_field,pytest,rest_framework,rest_framework_simplejwt,sentry_sdk