Skip to content

Commit e8a6450

Browse files
committed
Update readme
1 parent 60df68a commit e8a6450

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
django-dev-protector
1+
django-dev-protector [![Build Status](https://travis-ci.org/ElusiveSpirit/django-dev-protector.svg?branch=master)](https://travis-ci.org/ElusiveSpirit/django-dev-protector)
22
====================
33
The app for freelance developers, that blocks site if needed.
44

@@ -54,5 +54,6 @@ An example
5454
```
5555
curl \
5656
-H "Content-Type: application/json" \
57-
-X POST -d '{"key": "<SECRET_KEY>", "status": true}' \ http://<your_domain>/django_dev_protector/
57+
-X POST -d '{"key": "<SECRET_KEY>", "status": true}' \
58+
http://<your_domain>/django_dev_protector/
5859
```

README.rst

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ django-dev-protector
22
====================
33
The app for freelance developers, that blocks site if needed.
44

5-
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 template.
5+
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.
66

77
Installation
88
------------
@@ -32,21 +32,28 @@ PROTECT_TEMPLATE_NAME = 'django_dev_protector/index.html'
3232

3333
# if redirect url is set, then default template would be
3434
# redirects person after 10 sec
35-
PROTECT_REDIRECT_URL = None
35+
PROTECT_REDIRECT_URL = 'http://your_client_opponent_site.com/'
3636
```
3737
By default server is unblocked
3838

3939
Usage
4040
-----
41-
You must generate and save your hash first
41+
You save your django SECRET_KEY from settings
4242
```
43-
./manage.py generatehash
43+
SECRET_KEY = '...
4444
```
45-
After you are able to block
45+
After you are able to block or unblock site with POST requests
4646
```
47-
http://127.0.0.1:8000/django_dev_protector/<hash>/on/
47+
{
48+
"key": <SECRET_KEY>,
49+
"status": true
50+
}
51+
POST to http://<your_domain>/django_dev_protector/
52+
```
53+
An example
54+
```
55+
curl \
56+
-H "Content-Type: application/json" \
57+
-X POST -d '{"key": "<SECRET_KEY>", "status": true}' \
58+
http://<your_domain>/django_dev_protector/
4859
```
49-
or unblock site with GET requests
50-
```
51-
http://127.0.0.1:8000/django_dev_protector/<hash>/off/
52-
```

0 commit comments

Comments
 (0)