# `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!
Raw data
{
"_id": null,
"home_page": "https://github.com/tokitouq/drf-dark-shade",
"name": "drf-dark-shade",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "python, drf, drf-dark-theme",
"author": "tokitouq",
"author_email": "tokitousan2005@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/72/b7/a484623b1b93544ed0933baf0e0a641369d20ca91c67a3cf584308ca642b/drf_dark_shade-0.1.5.tar.gz",
"platform": null,
"description": "# `drf-dark-shade`\nEnhance 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.\n\n###### Deep Forest Theme:\n![Screenshot from 2023-11-21 12-45-09](https://github.com/tokitouq/drf-dark-shade/assets/114811070/c1f79290-f692-4eaf-bcbd-7b619bcc7962)\n\n\n\n## Installation:\n1. Install `drf-dark-shade` package using **pip** or **poetry**\n```bash\npip install drf_dark_shade\n```\n\n2. Add `drf_dark_shade` to your `INSTALLED_APPS` in your Django project's settings.\n```bash\nINSTALLED_APPS = [\n # other packages\n 'rest_framework', # drf required\n 'drf_dark_shade',\n]\n```\n3. Add `drf_dark_shade` renderer to `REST_FRAMEWORK` config\n```bash\nREST_FRAMEWORK = {\n 'DEFAULT_RENDERER_CLASSES': (\n 'rest_framework.renderers.JSONRenderer',\n 'drf_dark_shade.renderers.DeepForestBrowsableAPIRenderer',\n )\n}\n```\n\n## Override templates\nTo override providing templates:\n1. Configure root `templates` dir in your django app\n```bash\nTEMPLATES = [\n {\n ...\n # configure root templates\n 'DIRS': [os.path.join(BASE_DIR, \"templates\")],\n 'APP_DIRS': True,\n ...\n },\n]\n```\n2. Create template to override with name of the theme you want, like: \n `templates/drf_dark_shade/deep-forest.html`\n\nAll set! now run app and visit your API endpoint. \nEnjoy Dark \ud83c\udf03\n\n## Contribution\n\nContributions are welcome!\\\nIf you encounter issues or want to add new features, feel free to open pull requests.\\\nGive a \u2b50\ufe0f if you find this project interesting and useful!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A dark theme for django rest framework browsable api",
"version": "0.1.5",
"project_urls": {
"Documentation": "https://github.com/tokitouq/drf-dark-shade",
"Homepage": "https://github.com/tokitouq/drf-dark-shade",
"Repository": "https://github.com/tokitouq/drf-dark-shade"
},
"split_keywords": [
"python",
" drf",
" drf-dark-theme"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "72b12ce00660767cd587b34143e516ac406fe2cd44a455d52ed69ca95f9d7451",
"md5": "605f49356bd4d38d846e2d25c78e9a6f",
"sha256": "52dbe448b3ad17a7c33eebdf1f1e023b645e0532115b2b589f04721d04dba7d9"
},
"downloads": -1,
"filename": "drf_dark_shade-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "605f49356bd4d38d846e2d25c78e9a6f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 4723,
"upload_time": "2024-03-27T12:34:28",
"upload_time_iso_8601": "2024-03-27T12:34:28.533675Z",
"url": "https://files.pythonhosted.org/packages/72/b1/2ce00660767cd587b34143e516ac406fe2cd44a455d52ed69ca95f9d7451/drf_dark_shade-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "72b7a484623b1b93544ed0933baf0e0a641369d20ca91c67a3cf584308ca642b",
"md5": "8eb77eb38d25b0c576051e5f8d0f5662",
"sha256": "d48e5738f103e3a8b046ca62c6ce68086e782dce7a3f013264ada806155833bf"
},
"downloads": -1,
"filename": "drf_dark_shade-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "8eb77eb38d25b0c576051e5f8d0f5662",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 3701,
"upload_time": "2024-03-27T12:34:30",
"upload_time_iso_8601": "2024-03-27T12:34:30.650423Z",
"url": "https://files.pythonhosted.org/packages/72/b7/a484623b1b93544ed0933baf0e0a641369d20ca91c67a3cf584308ca642b/drf_dark_shade-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-27 12:34:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tokitouq",
"github_project": "drf-dark-shade",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "drf-dark-shade"
}