Skip to main content
django-dev-protector
====================
https://github.com/ElusiveSpirit/django-dev-protector

The app for freelance developers, that blocks site if needed.

It can be used in situations when a client don't want to pay your work. The app blocks all requests to the site and shows a message of this situation.

Installation

pip install django-dev-protector

settings.py
```
INSTALLED_APPS = [
...

# import django_dev_protector
'django_dev_protector',
]


MIDDLEWARE = [
# set middleware class
'django_dev_protector.middleware.ControlMiddleware',

...
]
```

Settings
--------
```
# render a simple template
PROTECT_TEMPLATE_NAME = 'django_dev_protector/index.html'

# if redirect url is set, then default template would be
# redirects person after 10 sec
PROTECT_REDIRECT_URL = 'http://your_client_opponent_site.com/'
```
By default server is unblocked

Usage
-----
You need to save your django SECRET_KEY from settings first
```
SECRET_KEY = '...
```
After you are able to block or unblock site with POST requests
```
{
"key": <SECRET_KEY>,
"status": true
}
POST to http://<your_domain>/django_dev_protector/
```
An example
```
curl \
-H "Content-Type: application/json" \
-X POST -d '{"key": "<SECRET_KEY>", "status": true}' \
http://<your_domain>/django_dev_protector/
```

Localize
--------
The app template support Russian. You only need to switch Russian in settings.
```
LANGUAGE_CODE = 'ru-ru'

USE_I18N = True
```

Metadata

Release files for django-dev-protector 0.3

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

Source distribution (sdist)

Source distribution for django-dev-protector 0.3
File Size Uploaded Provenance
django-dev-protector-0.3.tar.gz 4.5 kB Without provenance Details

Release files / django-dev-protector-0.3.tar.gz

Download URL django-dev-protector-0.3.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
95c65bd20a5dd7c186b6f0fe537843ba3b9c7fc718ed12a129a6658c67d7e97d
BLAKE2b-256 checksum
How to use checksums
9915103d2e791cb5798f3babcf8caf04ce0b89039a5ed97d726005abcc8b61cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-dev-protector 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file No provenance

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