This pull request focuses on improving the handling of datetime objects by ensuring they are naive (i.e., not timezone-aware) across various functions and modules. Additionally, it includes some minor changes to the HTML templates and imports.
Key Changes:
Datetime Handling Improvements:
Added a make_naive function to ensure start_time and end_time are naive datetimes in parse_database.py and views.py. [1][2]
Updated add_event_markers to ensure start_time and end_time are naive datetimes.
Modified generate_heatmap to remove the timezone parameter and ensure naive datetime handling.
Updated filter_events to apply make_naive to events.
Applied make_naive in various functions in views.py to ensure consistent datetime handling. [1][2][3]
Documentation Removal:
Removed detailed docstrings from functions in generate_map.py and parse_database.py to streamline the code. [1][2][3][4][5]
HTML Template Update:
Updated the default event image URL in home.html to a new link.
Import Cleanup:
Removed unused imports from views.py and parse_database.py. [1][2]
These changes collectively ensure better datetime handling and improve code maintainability by removing unnecessary documentation and imports.
This pull request focuses on improving the handling of datetime objects by ensuring they are naive (i.e., not timezone-aware) across various functions and modules. Additionally, it includes some minor changes to the HTML templates and imports.
Key Changes:
Datetime Handling Improvements:
make_naive
function to ensurestart_time
andend_time
are naive datetimes inparse_database.py
andviews.py
. [1] [2]add_event_markers
to ensurestart_time
andend_time
are naive datetimes.generate_heatmap
to remove thetimezone
parameter and ensure naive datetime handling.filter_events
to applymake_naive
to events.make_naive
in various functions inviews.py
to ensure consistent datetime handling. [1] [2] [3]Documentation Removal:
generate_map.py
andparse_database.py
to streamline the code. [1] [2] [3] [4] [5]HTML Template Update:
home.html
to a new link.Import Cleanup:
views.py
andparse_database.py
. [1] [2]These changes collectively ensure better datetime handling and improve code maintainability by removing unnecessary documentation and imports.