Skip to main content

View Django Settings at a URL

Project description

# django-settings-view-as-json

View Django Settings via URL

[![Latest PyPI version](https://img.shields.io/pypi/v/django-settings-view-as-json.svg)](https://crate.io/packages/django-settings-view-as-json/)
[![Number of PyPI downloads](https://img.shields.io/pypi/dm/django-settings-view-as-json.svg)](https://crate.io/packages/django-settings-view-as-json/)

![](/screenshot.png?raw=true)

## Why

Because sometimes its confusing what settings are in use in your staging environments etc.

## Features

* Recursively nulls out any sensitive key values (eg passwords)

## Install

```python
pip install django-settings-view-as-json
```

## Usage

```python
from django_settings_view_as_json import settings_view

url(r'^settings/$', settings_view.as_view(), name='settings'),
```

## Security Warning

I highly recommend limiting this URL to either non production environments or at least Super user's. Eg

```python
from django.contrib.auth.decorators import user_passes_test
from django_settings_view_as_json import settings_view

url(r'^settings/$', user_passes_test(lambda u: u.is_superuser)(settings_view.as_view()), name='settings'),

```

## JSON In Browser

I recommend [Chrome JsonView Plugin](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc)

## TODO

* Make sensitive key list a setting

## Changelog

* 0.0.8 pip 10 compatibility
* 0.0.7 Fix serialisation of classes
* 0.0.6 Fix issue with deep cloning (fallback to shallow)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-settings-view-as-json-0.0.9.tar.gz (38.8 kB view details)

Uploaded Source

File details

Details for the file django-settings-view-as-json-0.0.9.tar.gz.

File metadata

File hashes

Hashes for django-settings-view-as-json-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c12fdda1f7a9868ca6be068bb18678319e42121490f06162d4f7bb932d357885
MD5 6e2d4afde0832058790819ff31fee9a7
BLAKE2b-256 e9021c1e7f4525484d26d66658c08bb95b06823b43c002736705d577bc2d94c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page