Skip to content

Add FullCalendar CRUD API with DRF authentication#572

Open
daym wants to merge 9 commits intollazzaro:developfrom
daym:fullcalendar
Open

Add FullCalendar CRUD API with DRF authentication#572
daym wants to merge 9 commits intollazzaro:developfrom
daym:fullcalendar

Conversation

@daym
Copy link
Copy Markdown
Contributor

@daym daym commented Feb 18, 2026

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.

@daym
Copy link
Copy Markdown
Contributor Author

daym commented Feb 18, 2026

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 ).

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 18, 2026

Coverage Status

coverage: 85.859%. first build
when pulling 64c2b16 on daym:fullcalendar
into bcb48e3 on llazzaro:develop.

@daym daym force-pushed the fullcalendar branch 2 times, most recently from 3beaa94 to 9fcaa31 Compare February 18, 2026 20:22
daym added 4 commits February 18, 2026 21:28
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.
daym added 5 commits February 20, 2026 09:31
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.
@dwasyl
Copy link
Copy Markdown
Contributor

dwasyl commented Apr 2, 2026

@daym These are really interesting - a good view fixes (and some things I also built in separately), but is it necessary to add restframework as a dependency here? It's a heavy-ish dependency if people aren't using it for anything else and the views are simple enough to work without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants