adamspd / django-appointment

A Django app for managing appointment scheduling with ease and flexibility.
Apache License 2.0
87 stars 29 forks source link

use a form for available slots #165

Closed deronnax closed 2 months ago

deronnax commented 3 months ago

A proof of concept on how forms can make life simpler (and safer).

Currently the difference is not mind-blowing because for the start, I try to be minimalist in my changes and keep django-appointments' existing behavior (the errorCode and the message string), but with a few changes we could slash a truckload of code.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.96970% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.33%. Comparing base (65ea1d5) to head (db269f3).

Files Patch % Lines
appointment/views.py 93.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #165 +/- ## ========================================== + Coverage 95.19% 95.33% +0.13% ========================================== Files 49 50 +1 Lines 5828 5784 -44 ========================================== - Hits 5548 5514 -34 + Misses 280 270 -10 ``` | [Flag](https://app.codecov.io/gh/adamspd/django-appointment/pull/165/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adams+Pierre+David) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/adamspd/django-appointment/pull/165/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adams+Pierre+David) | `95.33% <96.96%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Adams+Pierre+David#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

adamspd commented 3 months ago

I agree.

deronnax commented 3 months ago

I plan to do the whole views.py file, more to come

deronnax commented 2 months ago

I will actually stop here for this one. Adams, you can merge if you are fine with the changes.

adamspd commented 2 months ago

I will actually stop here for this one. Adams, you can merge if you are fine with the changes.

Thanks for the work. I'm fine with them.