Add FullCalendar CRUD API with DRF authentication#572
Open
daym wants to merge 9 commits intollazzaro:developfrom
Open
Add FullCalendar CRUD API with DRF authentication#572daym wants to merge 9 commits intollazzaro:developfrom
daym wants to merge 9 commits intollazzaro:developfrom
Conversation
Contributor
Author
|
Requires the RuleParam commit. So it cannot be split off. Requires timezone field of Event commit. So it cannot be split off. Requires pytz already be removed. So it cannot be split off. Please just apply this one last (on top of PR #570 ). |
3beaa94 to
9fcaa31
Compare
Add RuleParam and RuleParamVariant models to enable UI-driven recurrence rule creation instead of manually editing the opaque params text field. - Add RuleParam model (name, display_string) - Add RuleParamVariant model (param FK, value, value_display_string) - Add Rule.repeats ManyToManyField to RuleParamVariant - Make Rule.name unique with max_length=255 - Add Rule.ensure_rule() classmethod for find-or-create - Add RuleAdmin fields and filter_horizontal for repeats - Update tests for unique Rule.name constraint
Add updater ForeignKey field to Event model for audit trail in collaborative editing. Also update creator related_name to created_events for consistency.
Add color_event CharField to Calendar model for FullCalendar display colors. Add CalendarForm with ColorInput widget, update CalendarAdmin fieldsets, and add ordering by name to Calendar.Meta.
Add timezone CharField to Event for DST-correct recurrences. Refactor rrule generation to use event-local naive datetimes. Add _localize() helper. Add event_tzinfo property using ZoneInfo. Add database-level CheckConstraint ensuring end >= start. Update tests for new timezone handling and occurrence hash/equality semantics.
Replace pytz with stdlib datetime.timezone.utc in _normalize_timezone_to_utc. Use utc_start/utc_end for occurrence filtering in Period class. Add rule__repeats to prefetch_related for O(1) query count. Remove pytz from project dependencies.
Switch models/__init__.py to relative imports.
Replace pytz with stdlib datetime.timezone.utc in _normalize_timezone_to_utc. Use utc_start/utc_end for occurrence filtering in Period class. Add rule__repeats to prefetch_related for O(1) query count. Fix CalendarNode to resolve content_object before context assignment.
Add api_delete, api_set_props, api_calendars, api_ruleparams endpoints. Add drfize decorator for DRF permission enforcement. Enhance api_select_create with recurrence support. Enhance api_occurrences with calendar filtering and recurrence info. Add security fixes: replace HttpResponseBadRequest(e) with JsonResponse, fix bool() on string POST values, add transaction.atomic blocks, add select_for_update for concurrent safety, add calendar ownership validation.
Contributor
|
@daym These are really interesting - a good view fixes (and some things I also built in separately), but is it necessary to add |
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.
Add api_delete, api_set_props, api_calendars, api_ruleparams endpoints. Add drfize decorator for DRF permission enforcement. Enhance api_select_create with recurrence support. Enhance api_occurrences with calendar filtering and recurrence info. Add security fixes: replace HttpResponseBadRequest(e) with JsonResponse, fix bool() on string POST values, add transaction.atomic blocks, add select_for_update for concurrent safety, add calendar ownership validation.