friendly_cat | ||
require_ipv6 | ||
ungleich_screening_task | ||
.editorconfig | ||
.env.dist | ||
.gitignore | ||
CONTRIBUTING.md | ||
Makefile | ||
manage.py | ||
README.md | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
tests.py |
ungleich_screening_task
A micro project proposed as a screening task for the Senior Django Developer position at ungleich.
Overview
Per requirements, the project behaves differently depending on the version of the Internet Protocol used to navigate it:
- Via IPv4, it shows a static page saying "Sorry, only reachable by IPv6"
- Via IPv6, it shows a friendly cat picture
To determine which version is used, we examine the visitor’s IP address. This is done in a middleware that responds with an error page to non-IPv6 requests.
If the request goes through, a simple application can be accesses, with a single index view showing a friendly picture of a cat.
Demo
A live demo of the project is available at: https://ungleich-screening-task.coox.fr/.
It is served by Gunicorn through Caddy.
Usage
To install and run the project on your own computer, you must ensure that the following prerequisites are fulfilled:
- your operating system supports IPv6
- you can run Python version 3.6 or above (it is recommended to use a virtual environment), with:
- you can run the
make
command
Proceed to cloning this repository, and navigate to its directory.
Then, execute the following command to install the project’s required modules:
make install
Then, execute the following command to run the project using Django’s built-in web server:
make run
You can then navigate the project at http://localhost:8000/.
Hacking
See CONTRIBUTING for developer documentation.