Skip to main content

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

Installation:

  1. Install drf-dark-shade package using pip or poetry
pip install drf_dark_shade
  1. Add drf_dark_shade to your INSTALLED_APPS in your Django project's settings.
INSTALLED_APPS = [
    # other packages
    'rest_framework', # drf required
    'drf_dark_shade',
]
  1. Add drf_dark_shade renderer to REST_FRAMEWORK config
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
TEMPLATES = [
    {
        ...
        # configure root templates
        'DIRS': [os.path.join(BASE_DIR, "templates")],
        'APP_DIRS': True,
        ...
    },
]
  1. 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!

Metadata

Release files for drf-dark-shade 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drf-dark-shade 0.1.5
File Size Uploaded
drf_dark_shade-0.1.5.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drf-dark-shade 0.1.5
File Interpreter ABI Platform
drf_dark_shade-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / drf_dark_shade-0.1.5.tar.gz

Download URL drf_dark_shade-0.1.5.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d48e5738f103e3a8b046ca62c6ce68086e782dce7a3f013264ada806155833bf
BLAKE2b-256 checksum
How to use checksums
72b7a484623b1b93544ed0933baf0e0a641369d20ca91c67a3cf584308ca642b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.0 CPython/3.11.6 Linux/6.1.71-1-MANJARO

Release files / drf_dark_shade-0.1.5-py3-none-any.whl

Download URL drf_dark_shade-0.1.5-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52dbe448b3ad17a7c33eebdf1f1e023b645e0532115b2b589f04721d04dba7d9
BLAKE2b-256 checksum
How to use checksums
72b12ce00660767cd587b34143e516ac406fe2cd44a455d52ed69ca95f9d7451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.0 CPython/3.11.6 Linux/6.1.71-1-MANJARO

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page