Django REST API backend for the Academy Management System's "About Section".
- Leadership Management: API for academy leadership information
- Accreditations: Management of certificates and accreditations
- Organization Structure: Hierarchical organization structure
- Documents: Downloadable documents management
- Multilingual Support: Russian, Kyrgyz, and English
- REST API: Full REST API with Django REST Framework
- Interactive Documentation: Swagger UI and ReDoc
- Admin Interface: Django admin for content management
- Django 5.1.2
- Django REST Framework 3.15.2
- PostgreSQL/SQLite
- Python 3.13+
cd ac_back
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtpython manage.py migrate
python manage.py createsuperuser # Optional: for admin accesspython manage.py runserver- API Base URL: http://localhost:8000/api/v1/
- Admin Interface: http://localhost:8000/admin/
- API Documentation: http://localhost:8000/api/docs/
- ReDoc Documentation: http://localhost:8000/api/redoc/
GET /api/v1/leadership/- List all leadership membersGET /api/v1/leadership/{id}/- Get specific leadership memberGET /api/v1/leadership/directors/- Get directors onlyGET /api/v1/leadership/department-heads/- Get department heads
GET /api/v1/accreditations/- List all accreditationsGET /api/v1/accreditations/{id}/- Get specific accreditationGET /api/v1/accreditations/active/- Get valid accreditations only
GET /api/v1/organization-structure/- List all departmentsGET /api/v1/organization-structure/{id}/- Get specific departmentGET /api/v1/organization-structure/hierarchy/- Get hierarchical structure
GET /api/v1/documents/- List all downloadable documentsGET /api/v1/documents/{id}/- Get specific document
Add ?lang=en or ?lang=ky to any endpoint for localized content:
curl "http://localhost:8000/api/v1/leadership/?lang=en"
curl "http://localhost:8000/api/v1/leadership/?lang=ky"# Filter by leadership type
GET /api/v1/leadership/?leadership_type=director
# Search across multiple fields
GET /api/v1/leadership/?search=John
# Order results
GET /api/v1/leadership/?ordering=name# Custom page size
GET /api/v1/leadership/?page_size=50
# Navigate pages
GET /api/v1/leadership/?page=2Access the admin interface at http://localhost:8000/admin/ to manage:
- Leadership members
- Accreditations
- Organization structure
- Downloadable documents
ac_back/
├── ac_back/ # Main project settings
│ ├── settings.py # Django settings
│ ├── urls.py # Main URL configuration
│ └── wsgi.py # WSGI configuration
├── about_section/ # Main app
│ ├── models.py # Database models
│ ├── serializers.py # DRF serializers
│ ├── views.py # API views
│ ├── urls.py # App URL configuration
│ └── admin.py # Admin configuration
├── media/ # Uploaded files
├── static/ # Static files
├── requirements.txt # Python dependencies
└── manage.py # Django management script
- Create/modify models in
about_section/models.py - Create migrations:
python manage.py makemigrations - Apply migrations:
python manage.py migrate - Update serializers in
about_section/serializers.py - Update views in
about_section/views.py - Update URLs in
about_section/urls.py
Create a .env file for production settings:
DEBUG=False
SECRET_KEY=your-secret-key
DATABASE_URL=postgresql://user:password@localhost/dbname
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
For production, configure PostgreSQL in settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'academy_db',
'USER': 'academy_user',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '5432',
}
}python manage.py collectstaticUpdate these settings for production:
- Set
DEBUG = False - Configure
ALLOWED_HOSTS - Use strong
SECRET_KEY - Set up HTTPS
- Configure proper database
- Create a feature branch
- Make changes
- Add tests if applicable
- Update documentation
- Submit a pull request
[Your License Here]
For questions or issues, please contact the development team.