diff --git a/README.md b/README.md index 02c1212..ae6d34e 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,9 @@ [![GitHub pull requests](https://img.shields.io/github/issues-pr/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/pulls) [![GitHub contributors](https://img.shields.io/github/contributors/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/graphs/contributors) -⚠️ **IMPORTANT**: Version 2.1.0 introduces significant database changes. Please read -the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guides/latest.md) before +⚠️ **IMPORTANT**: If upgrading from a version before 2.0.0, please note significant database changes were introduced in +Version 2.0.0 introduces significant database changes. Please read +the [migration guide](https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/v2_1_0.md) before updating. Django-Appointment is a Django app engineered for managing appointment scheduling with ease and flexibility. It enables @@ -21,9 +22,9 @@ provided. This app proficiently manages conflicts and availability for appointme experience. Detailed documentation can be found in -the [docs' directory](https://github.com/adamspd/django-appointment/tree/main/docs). +the [docs' directory](https://github.com/adamspd/django-appointment/tree/main/docs/README.md). For changes and migration information, please refer to the [release -notes](https://github.com/adamspd/django-appointment/tree/main/release_notes/latest.md). +notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md). ## Features ✨ @@ -33,31 +34,56 @@ notes](https://github.com/adamspd/django-appointment/tree/main/release_notes/lat 4. User-friendly interface for viewing available time slots and scheduling appointments. 5. Capability to send email notifications to clients upon scheduling an appointment. -## Added Features in version 2.0.0 +## Key features introduced in previous versions. -- **Database Changes ⚠️**: Significant modifications to the database schema. Before updating, ensure you follow the - migration steps outlined in - the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guides/latest.md). +- For more information, please refer to + this [documentation](https://github.com/adamspd/django-appointment/tree/main/docs/history/readme_v2_1_1.md). -1. Introduced a staff feature allowing staff members in a team or system to manage their own appointments. -2. Implemented an admin feature panel enabling staff members and superusers (admins) to manage the system. -3. Added buffer time between the current time and the first available slot for the day. -4. Defined working hours for each staff member, along with the specific days they are available during the week. -5. Specified days off for staff members to represent holidays or vacations. -6. Staff members can now define their own configuration settings for the appointment system, such as slot duration, - working hours, and buffer time between appointments. However, only admins have the privilege to add/remove services. +## Added Features in version 2.1.2 -### Breaking Changes in version 2.1.0: +This release of Django Appointment brings a series of improvements and updates aimed at enhancing the overall +functionality and user experience: -- None +1. **Dynamic Label Customization in Appointment Pages (#19)**: + - Added a new configuration option `app_offered_by_label` to the `Config` model. + - This feature allows for dynamic labeling in the appointment HTML page to showcase the staff members or services + offering the appointment. + - The default value is "Offered by", which can be customized to fit different contexts, such as "Provided by" or " + Choose Photographer" for photography services. + +2. **Updated Documentation and Workflow Enhancements (#25, #26, #27)**: + - Improved clarity and consistency in the project's documentation, making it more accessible and user-friendly. + - Updated workflow processes to streamline development and issue tracking. + +3. **Community Engagement and Standards (#21, #22, #23, #24)**: + - Introduced a `CODE_OF_CONDUCT.md` to foster a respectful and inclusive community environment. + - Created `CONTRIBUTING.md` to guide contributors through the process of making contributions to the project. + - Established a `SECURITY.md` policy to address security protocols and reporting. + - Refined issue templates for bug reports and feature requests, enhancing the efficiency of community contributions + and feedback. + +4. **Library Updates and Security Patches (#14, #15, #18)**: + - Updated dependencies such as `phonenumbers` and `django` to their latest versions, ensuring better performance and + security. + +5. **Enhanced Project Visibility (#16)**: + - Added GitHub Badges to the README for better visibility and quick access to project metrics like build status, + versioning, and contribution activities. + +6. **Translation Refinements (#31)**: + - Removed inconsistencies in translations, improving the internationalization aspect of the application. + +These updates collectively contribute to the robustness and versatility of the Django Appointment package, aligning with +our commitment to providing a high-quality and user-friendly appointment management solution. -### New Features 🆕 +### Breaking Changes in version 2.1.2: -See the [release notes](docs/release_notes/latest.md#Updates) for more information. +- None -### Fixes 🆕 +### New Features & Bug Fixes 🆕 -See the [release notes](docs/release_notes/latest.md#Bug-Fixes) for more information. +See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md) +for more information. ## Quick Start 🚀 @@ -136,7 +162,8 @@ See the [release notes](docs/release_notes/latest.md#Bug-Fixes) for more informa ## Customization 🔧 1. In your Django project's `settings.py`, you can override the default values for the appointment scheduler. More - information regarding available configurations can be found in the [documentation](docs/README.md#configuration). + information regarding available configurations can be found in + the [documentation](https://github.com/adamspd/django-appointment/tree/main/docs/README.md#configuration). 2. Modify these values as needed for your application, and the app will adapt to the new settings. 3. For further customization, you can extend the provided models, views, and templates or create your own. @@ -145,6 +172,22 @@ See the [release notes](docs/release_notes/latest.md#Bug-Fixes) for more informa For support or inquiries regarding the Appointment Scheduler app, please refer to the documentation in the "docs" directory or visit the GitHub repository for more information. +## Contributing 🤝 + +Contributions are welcome! Please refer to +the [contributing guidelines](https://github.com/adamspd/django-appointment/tree/main/CONTRIBUTING.md) for more +information. + +## Code of Conduct 📜 + +Please refer to the [code of conduct](https://github.com/adamspd/django-appointment/tree/main/CODE_OF_CONDUCT.md) for +more information. + +## Security policy 🔒 + +Please refer to the [security policy](https://github.com/adamspd/django-appointment/tree/main/SECURITY.md) for more +information. + ## Notes 📝⚠️ Currently, the application does not send email reminders yet. diff --git a/appointment/models.py b/appointment/models.py index 892020a..a2b0d26 100644 --- a/appointment/models.py +++ b/appointment/models.py @@ -557,7 +557,7 @@ class Config(models.Model): default="", help_text=_("Name of your website."), ) - app_offered_by_label = models.CharField(max_length=255, default=_("Offered by"), + app_offered_by_label = models.CharField(max_length=255, default=_("Offered by"), null=True, blank=True, help_text=_("Label for `Offered by` on the appointment page")) # meta data diff --git a/docs/history/readme_v2_1_1.md b/docs/history/readme_v2_1_1.md new file mode 100644 index 0000000..ce62065 --- /dev/null +++ b/docs/history/readme_v2_1_1.md @@ -0,0 +1,39 @@ +# This is the documentation for Django Appointment version 2.1.1 📦 + +⚠️ **IMPORTANT**: If upgrading from a version before 2.0.0, please note significant database changes were introduced in +Version 2.0.0 introduces significant database changes. Please read +the [migration guide](https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/latest.md) before +updating. + +Detailed documentation can be found in +the [docs' directory](https://github.com/adamspd/django-appointment/tree/main/docs/README.md). +For changes and migration information, please refer to the [release +notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/v2_1_1.md). + +## Added Features in version 2.0.0 + +- **Database Changes ⚠️**: Significant modifications to the database schema. Before updating, ensure you follow the + migration steps outlined in + the [migration guide](https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/v2_1_1.md). + +1. Introduced a staff feature allowing staff members in a team or system to manage their own appointments. +2. Implemented an admin feature panel enabling staff members and superusers (admins) to manage the system. +3. Added buffer time between the current time and the first available slot for the day. +4. Defined working hours for each staff member, along with the specific days they are available during the week. +5. Specified days off for staff members to represent holidays or vacations. +6. Staff members can now define their own configuration settings for the appointment system, such as slot duration, + working hours, and buffer time between appointments. However, only admins have the privilege to add/remove services. + +### Breaking Changes in version 2.1.2: + +- None + +### New Features 🆕 + +See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/v2_1_1.md#Updates) +for more information. + +### Fixes 🆕 + +See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/v2_1_1.md#Bug-Fixes) +for more information. diff --git a/docs/migration_guides/latest.md b/docs/migration_guides/latest.md index f9cb655..153c506 100644 --- a/docs/migration_guides/latest.md +++ b/docs/migration_guides/latest.md @@ -1,58 +1,43 @@ -## Migration Guide for Version 2.1.0 🚀 +## Migration Guide for Version 2.1.2 🚀 -Version 2.1.0 introduces significant changes to the database schema. Before upgrading, please review the changes below -and follow the recommended steps to ensure a smooth migration. +Version 2.1.2 of django-appointment is focused on enhancing functionality, documentation, and internationalization, with +no significant database schema changes introduced. This guide provides the steps to ensure a smooth upgrade from version +2.1.1 or any earlier versions post 2.0.0. -### Changes in Version 2.1.0: +### Steps for Upgrading to Version 2.1.2: -1. **New Fields**: - - A non-nullable `staff_member` field has been added to the `appointmentrequest` model. - - The `created_at` and `updated_at` fields have been added to the `config` model. - - A `background_color` field has been added to the `service` model. +1. **Backup Your Database**: + - As a best practice, always back up your current database before performing an upgrade. This precaution ensures you + can restore your application to its previous state if needed. -2. **Field Modifications**: - - The `phone` field in the `appointment` model has been modified to be non-nullable. +2. **Update Package**: + - Upgrade to the latest version by running: + ```bash + pip install django-appointment==2.1.2 + ``` -3. **New Models**: - - Three new models have been introduced: `StaffMember`, `DayOff`, and `WorkingHours`. +3. **Run Migrations** (if any): + - Although no new migrations are expected for this release, it's always a good idea to run: + ```bash + python manage.py makemigrations + python manage.py migrate + ``` + - This ensures your database schema is up-to-date with the latest package version. -### Recommended Migration Steps: +4. **Review and Test**: + - After upgrading, thoroughly test your application to ensure all functionalities are working as expected with the + new version. + - Pay special attention to features affected by the updates in version 2.1.2, as detailed in the release notes. -1. **Backup**: Before attempting to migrate, make sure to backup your current database. This will allow you to restore - the previous state in case anything goes wrong. +### Troubleshooting: -2. **Review New Fields**: - - Ensure that there are no rows in the `appointmentrequest` table with a NULL `staff_member`. - - Ensure that the `phone` field in all rows of the `appointment` table is not NULL. If there are any, you may need - to manually update them or set a default value. - -3. **Run Migrations**: - - After reviewing and making necessary data adjustments, run the migrations using the - command: `python manage.py migrate appointment`. - -4. **Post-Migration Checks**: - - Verify that all new fields and models have been correctly added to the database. - - Check the application functionality related to the modified models to ensure data integrity and correct behavior. - -### If You Mistakenly Upgraded Without Preparations: - -1. **Restore Backup**: If you have a backup of your database, restore it to revert to the previous state before the - migration attempt. - -2. **Manual Field Adjustments**: If you don't have a backup: - - When prompted about the `staff_member` field, you can set a default value by selecting option 1 and - inputting `None`. - - For the `created_at` and `updated_at` fields, set the default value to `timezone.now`. - - For the `phone` field in the `appointment` model, set a default value by selecting option 1 and inputting an empty - string `""`. - -3. **Retry Migration**: After making the necessary adjustments, you can then attempt the migration again using the - command: `python manage.py migrate appointment`. +- **Issues Post Migration**: + - If you encounter issues after migration, consult the release notes for version 2.1.2 for specific updates that + might affect your setup. + - Check the Django logs for any error messages that can provide insights into issues. ### Important Notes 📝: -- The migration process described above has the potential to disrupt your application if not executed correctly. Ensure - thorough testing before deploying these changes to a live environment. - -- Make sure to read the error messages during migration. They provide valuable insights into potential issues and how to - address them. +- No database schema changes were introduced in version 2.1.2, so the migration process should be straightforward. +- As with any upgrade, testing in a development or staging environment before applying changes to your production + environment is highly recommended. diff --git a/docs/migration_guides/v2_1_0.md b/docs/migration_guides/v2_1_0.md new file mode 100644 index 0000000..f9cb655 --- /dev/null +++ b/docs/migration_guides/v2_1_0.md @@ -0,0 +1,58 @@ +## Migration Guide for Version 2.1.0 🚀 + +Version 2.1.0 introduces significant changes to the database schema. Before upgrading, please review the changes below +and follow the recommended steps to ensure a smooth migration. + +### Changes in Version 2.1.0: + +1. **New Fields**: + - A non-nullable `staff_member` field has been added to the `appointmentrequest` model. + - The `created_at` and `updated_at` fields have been added to the `config` model. + - A `background_color` field has been added to the `service` model. + +2. **Field Modifications**: + - The `phone` field in the `appointment` model has been modified to be non-nullable. + +3. **New Models**: + - Three new models have been introduced: `StaffMember`, `DayOff`, and `WorkingHours`. + +### Recommended Migration Steps: + +1. **Backup**: Before attempting to migrate, make sure to backup your current database. This will allow you to restore + the previous state in case anything goes wrong. + +2. **Review New Fields**: + - Ensure that there are no rows in the `appointmentrequest` table with a NULL `staff_member`. + - Ensure that the `phone` field in all rows of the `appointment` table is not NULL. If there are any, you may need + to manually update them or set a default value. + +3. **Run Migrations**: + - After reviewing and making necessary data adjustments, run the migrations using the + command: `python manage.py migrate appointment`. + +4. **Post-Migration Checks**: + - Verify that all new fields and models have been correctly added to the database. + - Check the application functionality related to the modified models to ensure data integrity and correct behavior. + +### If You Mistakenly Upgraded Without Preparations: + +1. **Restore Backup**: If you have a backup of your database, restore it to revert to the previous state before the + migration attempt. + +2. **Manual Field Adjustments**: If you don't have a backup: + - When prompted about the `staff_member` field, you can set a default value by selecting option 1 and + inputting `None`. + - For the `created_at` and `updated_at` fields, set the default value to `timezone.now`. + - For the `phone` field in the `appointment` model, set a default value by selecting option 1 and inputting an empty + string `""`. + +3. **Retry Migration**: After making the necessary adjustments, you can then attempt the migration again using the + command: `python manage.py migrate appointment`. + +### Important Notes 📝: + +- The migration process described above has the potential to disrupt your application if not executed correctly. Ensure + thorough testing before deploying these changes to a live environment. + +- Make sure to read the error messages during migration. They provide valuable insights into potential issues and how to + address them. diff --git a/docs/release_notes/latest.md b/docs/release_notes/latest.md index 748d027..b6b143b 100644 --- a/docs/release_notes/latest.md +++ b/docs/release_notes/latest.md @@ -1,76 +1,56 @@ # django-appointment 📦 -**v2.1.0 🆕** +**v2.1.2 🆕** -## ___Release Notes for Version 2.1.0___ +## ___Release Notes for Version 2.1.2___ ## Introduction 📜 -Version 2.1.0 brings significant enhancements to the django-appointment package, with major features such as staff -member management, working hours, and days off, alongside improvements in the configuration settings for added -flexibility. This release not only refines the user experience but also provides administrators and staff with more -control and customization. - -⚠️ **Important Note**: This version introduces significant database schema changes. Before updating, ensure you follow -the migration steps outlined in -the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guide_v2.1.0.md). +Version 2.1.2 of django-appointment introduces a series of refinements and updates, enhancing both the functionality and +the user experience. This release focuses on improving documentation, workflow, community engagement, and +internationalization, alongside some crucial library updates and new dynamic features. ## New Features ✨ -### Staff Member Management 🧑‍💼 - -- Introduced a new `StaffMember` model linked to a user, representing a staff member offering services, detailing their - services, working hours, and weekend availability. -- Admin features allowing for creating, removing, and converting superusers to staff members. -- Provided the ability for staff members to view and update their profiles, including email change verification for - added security. +### Dynamic Label Customization in Appointment Pages (#19) -### Service Management 🛠 +- Added a new configuration option `app_offered_by_label` in the `Config` model. +- Enables dynamic labeling in the appointment HTML page, showcasing the staff members or services offering the + appointment. +- Default label is "Offered by", customizable to suit different service contexts. -- Superusers can now add, update, or delete services from the system, ensuring the list of services remains relevant and - up-to-date. +### Updated Documentation and Workflow Enhancements (#25, #26, #27) -### Days Off and Working Hours Management 🕰 +- Documentation has been made more user-friendly and clearer. +- Workflow processes updated for more streamlined development and issue tracking. -- Implemented `DayOff` and `WorkingHours` models to manage staff availability. -- Staff members can specify days they're not available and define their standard working hours, providing more accurate - availability information for appointment scheduling. -- Superusers have the capability to manage these settings for any staff member. +### Community Engagement and Standards (#21, #22, #23, #24) -### Enhanced Configuration Settings ⚙️ +- `CODE_OF_CONDUCT.md` introduced to foster a respectful and inclusive community environment. +- `CONTRIBUTING.md` created to guide contributors through the contribution process. +- `SECURITY.md` established for addressing security protocols and reporting. +- Issue templates for bug reports and feature requests refined for better community feedback and contributions. -- New configurations added to customize buffer time between the current time and the first available slot for the day. -- Staff members can now define their own configuration settings for slot duration, working hours, and buffer time. - However, only superusers have the privilege to add/remove services. -- Deprecated the `APPOINTMENT_CLIENT_MODEL` setting in favor of a more flexible approach with `AUTH_USER_MODEL`. +### Library Updates and Security Patches (#14, #15, #18) -### Continued Integration and Responsiveness 🌐 +- Dependencies like `phonenumbers` and `django` updated to their latest versions for enhanced performance and security. -- Continued integration of the django-phonenumber-field for efficient phone number handling. -- Improved responsiveness of the client information request page for better user experience across devices. +### Enhanced Project Visibility (#16) -## Bug Fixes +- GitHub Badges added to the README for improved project metrics visibility like build status and versioning. -- Redirect to the service adding page after service addition, rather than the user profile. -- Resolved the issue where images were not being saved during service creation. -- Improved the appointment page for mobile: - - Adjusted the month size. - - Resized the button. - - Optimized the calendar dimensions. - - Corrected the slots and container sizes. +### Translation Refinements (#31) -## Updates +- Inconsistencies in translations removed, improving the internationalization aspect. -- Introduced a view to get all the services defined. -- Defined a new URL to add a new staff member. +### Breaking Changes 🚨 - ### Deprecations/Removals 🆕 - - Modified the existing URL that only allowed staff member updates. +- None -## Previous Version Highlights (1.1.2) 🔙 +## Previous Version Highlights (2.1.1) 🔙 -Please refer to the release notes for version 1.1.2 for details on username handling fixes, email template updates, -testing enhancements, and other core features. +- For details on the previous version's features and updates, please refer + to [release notes for version 2.1.1](docs/release_notes/v2_1_1.md). ## Getting Started 🚀 @@ -96,9 +76,5 @@ please refer to the provided resources. ## Conclusion 🎉 -Version 2.1.0 introduces comprehensive features and enhancements to make the appointment scheduling process more robust, -user-friendly, and customizable. With the addition of staff management capabilities, more precise working hours, and -day-off settings, this release guarantees a refined experience for both administrators and end-users. - -For detailed documentation and instructions on how to use the package, please refer to the accompanying README files and -online resources. +Version 2.1.2 continues our commitment to providing a robust and user-friendly appointment management solution. With +these updates, Django Appointment becomes more adaptable, secure, and community-focused. diff --git a/docs/release_notes/v2_1_1.md b/docs/release_notes/v2_1_1.md new file mode 100644 index 0000000..d350f68 --- /dev/null +++ b/docs/release_notes/v2_1_1.md @@ -0,0 +1,82 @@ +# django-appointment 📦 + +**v2.1.0 🆕** + +## ___Release Notes for Version 2.1.0___ + +## Introduction 📜 + +Version 2.1.0 brings significant enhancements to the django-appointment package, with major features such as staff +member management, working hours, and days off, alongside improvements in the configuration settings for added +flexibility. This release not only refines the user experience but also provides administrators and staff with more +control and customization. + +⚠️ **Important Note**: This version introduces significant database schema changes. Before updating, ensure you follow +the migration steps outlined in +the [migration guide](https://github.com/adamspd/django-appointment/tree/main/migration_guide_v2.1.0.md). + +## New Features ✨ + +### Staff Member Management 🧑‍💼 + +- Introduced a new `StaffMember` model linked to a user, representing a staff member offering services, detailing their + services, working hours, and weekend availability. +- Admin features allowing for creating, removing, and converting superusers to staff members. +- Provided the ability for staff members to view and update their profiles, including email change verification for + added security. + +### Service Management 🛠 + +- Superusers can now add, update, or delete services from the system, ensuring the list of services remains relevant and + up-to-date. + +### Days Off and Working Hours Management 🕰 + +- Implemented `DayOff` and `WorkingHours` models to manage staff availability. +- Staff members can specify days they're not available and define their standard working hours, providing more accurate + availability information for appointment scheduling. +- Superusers have the capability to manage these settings for any staff member. + +### Enhanced Configuration Settings ⚙️ + +- New configurations added to customize buffer time between the current time and the first available slot for the day. +- Staff members can now define their own configuration settings for slot duration, working hours, and buffer time. + However, only superusers have the privilege to add/remove services. +- Deprecated the `APPOINTMENT_CLIENT_MODEL` setting in favor of a more flexible approach with `AUTH_USER_MODEL`. + +### Continued Integration and Responsiveness 🌐 + +- Continued integration of the django-phonenumber-field for efficient phone number handling. +- Improved responsiveness of the client information request page for better user experience across devices. + +## Bug Fixes + +- Redirect to the service adding page after service addition, rather than the user profile. +- Resolved the issue where images were not being saved during service creation. +- Improved the appointment page for mobile: + - Adjusted the month size. + - Resized the button. + - Optimized the calendar dimensions. + - Corrected the slots and container sizes. + +## Updates + +- Introduced a view to get all the services defined. +- Defined a new URL to add a new staff member. + + ### Deprecations/Removals 🆕 + - Modified the existing URL that only allowed staff member updates. + +## Previous Version Highlights (1.1.2) 🔙 + +Please refer to the release notes for version 1.1.2 for details on username handling fixes, email template updates, +testing enhancements, and other core features. + +## Conclusion 🎉 + +Version 2.1.0 introduces comprehensive features and enhancements to make the appointment scheduling process more robust, +user-friendly, and customizable. With the addition of staff management capabilities, more precise working hours, and +day-off settings, this release guarantees a refined experience for both administrators and end-users. + +For detailed documentation and instructions on how to use the package, please refer to the accompanying README files and +online resources. diff --git a/requirements.txt b/requirements.txt index a0b5a46..88089ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ Pillow==10.1.0 phonenumbers==8.13.25 django-phonenumber-field==7.2.0 babel==2.13.1 -setuptools==69.0.0 +setuptools==69.0.1 pytz~=2023.3.post1 \ No newline at end of file