Open
Conversation
This migration modifies several fields in the activitylog and users models, including altering field types and adding new indexes for improved query performance.
Reorganize imports and enhance admin actions for clarity.
Added docstrings to MemberSerializer and LiveConsumer classes, as well as update_activity method, to clarify their purposes and usage.
Added validators and improved model fields for Users and ActivityLog.
Refactor views in HeroHours to include type hints and improve code structure. Added rate limiting to specific views and updated variable names for consistency.
Implemented custom throttling classes for SheetPull and MeetingList APIs to limit request rates.
Refactor settings to use Path for file paths and add security settings for production.
Updated several package versions for better compatibility and security.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is my first attempt to try to clean up herohours. please don't judge me if it sucks. if its good, I take all the credit.
This pull request introduces several improvements and refactorings across the codebase, focusing on Django admin actions, code cleanup, and enhanced documentation. The most significant changes include improved handling of check-in/check-out logic with more robust time calculations, addition of helpful docstrings in WebSocket consumer code, and code cleanup to remove unnecessary print statements and clarify intent.
Django Admin Logic and Features:
HeroHours/admin.pyto use a consistentright_nowtimestamp and Django ORM expressions (F,ExpressionWrapper) for accurate and atomic updates to time-tracking fields. This also ensures that missingLast_Invalues are handled gracefully. [1] [2]enteredfield when creatingActivityLogentries during check-in, check-out, and reset actions for more complete audit logging. [1] [2] [3] [4]@admin.displaydecorator for clarity and consistency, replacing deprecatedshort_descriptionandadmin_order_fieldattributes. [1] [2]Code Cleanup and Refactoring:
HeroHours/admin.py,HeroHours/forms.py, and other files to clean up console output and improve readability. [1] [2] [3] [4]HeroHours/admin.pyandHeroHours/consumers.pyfor clarity and to remove unused or redundant imports. [1] [2]Documentation and Developer Experience:
HeroHours/consumers.pyto clarify their purpose and usage for future developers. [1] [2] [3]bulk.pymanagement command for better usability and error prevention.Other Notable Changes:
DEBUGconfiguration variable to.env.exampleto clarify default environment settings.These changes collectively improve code maintainability, reliability of time-tracking operations, and the developer experience for both current and future contributors.