Modified UserAppointmentStatsView to accept POST requests instead of GET
and retrieve email from request body rather than from authenticated user.
This allows querying appointment statistics for any email address instead
of being limited to the current user's email.
Changes:
- Changed HTTP method from GET to POST
- Added email parameter extraction from request.data
- Updated filter to use provided email instead of request.user.email
- Install and configure drf-spectacular for OpenAPI/Swagger documentation
- Add Swagger UI endpoints at /api/schema/ and /api/docs/
- Configure SPECTACULAR_SETTINGS with API metadata
- Refactor meetings views from function-based to class-based views
(ScheduleAppointmentView, RejectAppointmentView, AvailableDatesView,
UserAppointmentsView, AppointmentStatsView, UserAppointmentStatsView)
- Update URL patterns to use new class-based views
- Simplify ALLOWED_HOSTS configuration to accept all hosts
This improves API discoverability through interactive documentation
and modernizes the codebase by using class-based views for better
code organization and reusability.
```
refactor: update settings and Docker config for production
- Configure ALLOWED_HOSTS and CORS from environment variables for better security
- Switch default database from PostgreSQL to SQLite3 (PostgreSQL config commented)
- Simplify DEBUG environment variable handling
- Update Dockerfile to use Python 3.11 and gunicorn for production
- Add static file collection in Docker build process
- Add user appointment statistics endpoint (user_apointment_stats)
- Add .dockerignore to exclude unnecessary files from build
These changes improve production readiness by making critical settings
configurable via environment variables and using production-grade WSGI
server (gunicorn) instead of Django development server.
Add comprehensive API documentation for user management endpoints including profile updates, user listing, and admin user management features. Update appointment model to include additional status options (completed, cancelled) and add max_length constraint to email field. Change appointment creation endpoint to require user authentication instead of being public.
Changes:
- Add API docs for update_profile, get_profile, all-users endpoints
- Add API docs for activate-deactivate-user and delete-user admin endpoints
- Update appointment creation to require authentication
- Add 'completed' and 'cancelled' status options to Appointment model
- Add max_length constraint to EncryptedEmailField
- Regenerate initial migration with updated model definitions
- Enable meetings app in INSTALLED_APPS and add URL routing
- Switch from PostgreSQL to SQLite for default database configuration
- Remove meetings directory from .gitignore
- Move API root endpoint from users app to main URL configuration
- Remove HIPAA-specific email and compliance settings (EMAIL_ENCRYPTION_KEY, HIPAA_EMAIL_CONFIG, BAA_VERIFICATION)
- Add SITE_NAME and ENCRYPTION_KEY environment variables
- Regenerate initial user migrations
These changes simplify the development setup by using SQLite as the default database and removing complex compliance configurations while enabling the core meetings functionality.