||2 years ago|
|friendly_cat||2 years ago|
|require_ipv6||2 years ago|
|ungleich_hack_3||2 years ago|
|.editorconfig||2 years ago|
|.env.dist||2 years ago|
|.gitignore||2 years ago|
|CONTRIBUTING.md||2 years ago|
|Makefile||2 years ago|
|README.md||2 years ago|
|manage.py||2 years ago|
|requirements.txt||2 years ago|
|setup.cfg||2 years ago|
|setup.py||2 years ago|
|tests.py||2 years ago|
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.
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
Proceed to cloning this repository, and navigate to its directory.
Then, execute the following command to install the project’s required modules:
Then, execute the following command to run the project using Django’s built-in web server:
You can then navigate the project at http://localhost:8000/.
To install and run the project in production, you must ensure that the following extra prerequisites are fulfilled:
- you can run an WSGI server with IPv6 support to expose the project’s
- you can run a web server with IPv6 support to act as a file server for the project’s static files, and as a reverse proxy between the WSGI server and the internet
Proceed to deploying this repository, and navigate to its directory.
Then, execute the following command to install the project’s static files:
Then, configure and run your WSGI server and your web server.
See CONTRIBUTING for developer documentation.