Django REST API project for a dental clinic or стоматology website backend. The project exposes structured endpoints for services, doctors, blog posts, company information, testimonials, appointment booking, and callback requests, with built-in OpenAPI documentation through drf-spectacular.
This repository looks like a practical study project focused on:
- building a content API with Django REST Framework
- structuring models, serializers, and class-based API views
- exposing clinic-related resources such as doctors, services, and locations
- handling user actions like booking and callback requests
- generating interactive API documentation
- Public API endpoints for clinic services
- Doctor listing with filter support
- Blog post listing and detail endpoints
- Company info and company location endpoints
- Public comments listing endpoint
- Appointment booking creation endpoint
- Callback request creation endpoint
- Swagger and ReDoc documentation pages
- CORS support for frontend integration
core/: Django project configuration and global settingsapi/: main application with models, serializers, filters, views, routes, and admin registrationapi/views/: API endpoints for services, posts, doctors, company info, comments, booking, and callback requestsapi/models/: domain models for clinic content and user requestsapi/serializers/: DRF serializers for API responses and write operationsapi/filters/: queryset filter definitions for API endpointsmanage.py: Django management entry point
- Public read endpoints expose content such as services, posts, doctors, and company details.
- The doctors endpoint supports filtering through
django-filter. - Write endpoints accept booking submissions and callback requests.
- API schemas are generated through
drf-spectacular. - Swagger UI and ReDoc provide interactive documentation for exploring the API.
- Python
- Django
- Django REST Framework
drf-spectaculardjango-filterdjango-cors-headers- Pillow
- SQLite by default
git clone <repository-url>
cd Dentist
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtIf you are using Windows PowerShell:
.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtApply migrations:
python manage.py migrateStart the development server:
python manage.py runserverIf you want to manage content through Django admin:
python manage.py createsuperuser/api/services/: list services/api/services/<id>/: service detail/api/posts/: list posts/api/posts/<id>/: post detail/api/doctors/: list doctors/api/company-info/: clinic/company overview/api/company-locations/: list clinic locations/api/comments/: list comments/api/booking/: create booking request/api/callback/: create callback request
/schema/: OpenAPI schema/schema/swagger-ui/: Swagger UI/schema/redoc/: ReDoc
Service: detailed treatment or clinic service information with images, benefits, and media blocksDoctor: doctor profiles, biography, education, and social linksPost: blog-style content entries with image galleriesCompanyInfo: main clinic/company information and shared contact detailsCompanyLocation: clinic branch or office locationsComment: public testimonial or feedback entriesBooking: appointment request linked to a service and officeCallBackRequest: callback request entry keyed by email
Important settings live in core/settings.py.
Things you will likely want to review before real use:
SECRET_KEYDEBUGALLOWED_HOSTS- CORS settings
- API schema metadata
- The project uses SQLite by default through
db.sqlite3. CallBackRequest.emailis unique, so duplicate callback requests for the same email will not be accepted.- The doctors endpoint uses
django-filter, so frontend integrations can build filtered staff views on top of it. - The API is configured with open permissions and no default authentication classes, which is convenient for development but should be reviewed before public deployment.
Use this project as a learning base or backend starter, and review validation, permissions, rate limiting, CORS policy, and deployment security carefully before exposing it publicly.