https://github.com/stabldev/drf-dark-shade
A dark themed API renderer for Django rest framework. Updated version of drf-dark-theme.
https://github.com/stabldev/drf-dark-shade
dark-theme django-rest-framework djangorestframework drf
Last synced: 13 days ago
JSON representation
A dark themed API renderer for Django rest framework. Updated version of drf-dark-theme.
- Host: GitHub
- URL: https://github.com/stabldev/drf-dark-shade
- Owner: stabldev
- License: mit
- Created: 2023-11-19T17:43:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-06T23:10:47.000Z (23 days ago)
- Last Synced: 2025-06-16T01:41:32.949Z (14 days ago)
- Topics: dark-theme, django-rest-framework, djangorestframework, drf
- Language: CSS
- Homepage: https://pypi.org/project/drf-dark-shade/
- Size: 41 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drf-dark-shade
[](https://pepy.tech/project/drf-dark-shade) [](https://pypi.org/project/drf-dark-shade/)Enhance your Django Rest Framework (DRF) browsing experience with the `drf-dark-shade` package. This lightweight and easy-to-use extension bring a sleek dark theme to the DRF browsable API, reducing eye strain and providing a modern, visually appealing interface for developers.

Deep Forest Theme
## Installation:
1. Install `drf-dark-shade` package using **pip** or **poetry**
```bash
pip install drf_dark_shade
# or
poetry add drf_dark_shade
```2. Add `drf_dark_shade` to your `INSTALLED_APPS` in your Django project's settings.
```python
INSTALLED_APPS = [
# ...
"rest_framework", # django-rest-framework required
"drf_dark_shade",
]
```
3. Add `drf_dark_shade` renderer to `REST_FRAMEWORK` config
```python
REST_FRAMEWORK = {
"DEFAULT_RENDERER_CLASSES": (
"rest_framework.renderers.JSONRenderer",
"drf_dark_shade.renderers.DeepForestBrowsableAPIRenderer", # configure custom renderer
),
# ...
}
```## Override templates
To override providing templates:
1. Configure root `templates` dir in your django app
```python
TEMPLATES = [
{
# ...
# configure root templates
"DIRS": [os.path.join(BASE_DIR, "templates")],
"APP_DIRS": True,
# ...
},
]
```
2. Create template to override with name of the theme you want, like:
`templates/drf_dark_shade/deep-forest.html`Check `/examples/` for example configuration with setup guide.
All set! now run app and visit your API endpoint.
Enjoy Dark 🌃
More themes will be added later. PRs are welcome ❤️## Contribution
Contributions are welcome!\
If you encounter issues or want to add new features, feel free to open pull requests.\
Give a ⭐️ if you find this project interesting and useful!