django-embargoed

Django middleware to block visitors from Russia due to the Ukraine invasion


License
MIT
Install
pip install django-embargoed==1.0

Documentation

Django-Embargoed

Django-Embargoed is Django middleware with a that blocks all requests from Russia and displays a pro-Ukraine message instead.

This is a port of Embargoed by my good friend Rameerez. He also maintains a list of ports on Embargoed-list.

Here's the message that replaces all pages of your app:

Embargoed message displayed to Russian visitors

Installation

pip install django-embargoed

In your settings.py file

INSTALLED_APPS  =  [
...
'embargoed'
...
]


MIDDLEWARE  =  [
...
'embargoed.middleware.EmbargoedMiddlewareTemplate',
...
]

That's it. Traffic from Russia is now blocked.

Collaborate

Please feel free to contact me @ronaldlangeveld or fork this to port it to other platforms, or make PRs to this repo to collaborate.