Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 65 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ✨

Expand All @@ -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 🚀

Expand Down Expand Up @@ -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.

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion appointment/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions docs/history/readme_v2_1_1.md
Original file line number Diff line number Diff line change
@@ -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.
79 changes: 32 additions & 47 deletions docs/migration_guides/latest.md
Original file line number Diff line number Diff line change
@@ -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.
58 changes: 58 additions & 0 deletions docs/migration_guides/v2_1_0.md
Original file line number Diff line number Diff line change
@@ -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.
Loading