Metadata-Version: 2.1
Name: drf-dark-shade
Version: 0.1.5
Summary: A dark theme for django rest framework browsable api
Home-page: https://github.com/tokitouq/drf-dark-shade
License: MIT
Keywords: python,drf,drf-dark-theme
Author: tokitouq
Author-email: tokitousan2005@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: djangorestframework (>=3.14.0,<4.0.0)
Project-URL: Documentation, https://github.com/tokitouq/drf-dark-shade
Project-URL: Repository, https://github.com/tokitouq/drf-dark-shade
Description-Content-Type: text/markdown

# `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:
![Screenshot from 2023-11-21 12-45-09](https://github.com/tokitouq/drf-dark-shade/assets/114811070/c1f79290-f692-4eaf-bcbd-7b619bcc7962)



## Installation:
1. Install `drf-dark-shade` package using **pip** or **poetry**
```bash
pip install drf_dark_shade
```

2. Add `drf_dark_shade` to your `INSTALLED_APPS` in your Django project's settings.
```bash
INSTALLED_APPS = [
    # other packages
    'rest_framework', # drf required
    'drf_dark_shade',
]
```
3. Add `drf_dark_shade` renderer to `REST_FRAMEWORK` config
```bash
REST_FRAMEWORK = {
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework.renderers.JSONRenderer',
        'drf_dark_shade.renderers.DeepForestBrowsableAPIRenderer',
    )
}
```

## Override templates
To override providing templates:
1. Configure root `templates` dir in your django app
```bash
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`

All set! now run app and visit your API endpoint.    
Enjoy Dark 🌃

## 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!

