Commit 9dd05446 authored by coox's avatar coox

ungleich_screening_task → ungleich_hack_3

parent 92bb3023
Pipeline #1425 failed with stages
in 32 seconds
# ungleich_screening_task
# ungleich_hack_3
A micro project proposed as a screening task for the [Senior Django Developer](https://ungleich.ch/en-us/cms/jobs-ungleich/) position at [ungleich](https://ungleich.ch/).
A micro project proposed as a solution for [Hack 3: IPv6 cat](https://ungleich.ch/u/projects/jobs-hacks-bounties/) from [ungleich](https://ungleich.ch/).
## Overview
......@@ -13,12 +13,6 @@ To determine which version is used, we examine the visitor’s IP address. This
If the request goes through, a simple [application](friendly_cat) 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/](https://ungleich-screening-task.coox.fr/).
It is served by [Gunicorn](https://gunicorn.org/) through [Caddy](https://caddyserver.com/).
## Usage
To install and run the project on your own computer, you must ensure that the following prerequisites are fulfilled:
......
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ungleich_screening_task</title>
<title>ungleich_hack_3</title>
<link
rel="stylesheet"
......
......@@ -5,7 +5,7 @@ import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ungleich_screening_task.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ungleich_hack_3.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
......
......@@ -9,8 +9,8 @@
--trusted-host files.pythonhosted.org
asgiref==3.2.7 # via django
django-environ==0.4.5 # via ungleich_screening_task (setup.py)
django-ipware==2.1.0 # via ungleich_screening_task (setup.py)
django==3.0.6 # via ungleich_screening_task (setup.py)
django-environ==0.4.5 # via ungleich_hack_3 (setup.py)
django-ipware==2.1.0 # via ungleich_hack_3 (setup.py)
django==3.0.6 # via ungleich_hack_3 (setup.py)
pytz==2020.1 # via django
sqlparse==0.3.1 # via django
......@@ -13,7 +13,7 @@ dev_requirements = [
]
setup(
name="ungleich_screening_task",
name="ungleich_hack_3",
version="0.1.0",
description="",
author="Eric Redon",
......
......@@ -2,7 +2,7 @@ from django.urls import reverse
from django.test import Client, TestCase
class UngleichScreeningTaskTests(TestCase):
class UngleichHack3Tests(TestCase):
def setUp(self):
self.ipv4_client = Client(REMOTE_ADDR="127.0.0.1")
self.ipv6_client = Client(REMOTE_ADDR="::1")
......
"""
ASGI config for ungleich_screening_task project.
ASGI config for ungleich_hack_3 project.
It exposes the ASGI callable as a module-level variable named ``application``.
......@@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ungleich_screening_task.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ungleich_hack_3.settings")
application = get_asgi_application()
"""
Django settings for ungleich_screening_task project.
Django settings for ungleich_hack_3 project.
Generated by 'django-admin startproject' using Django 3.0.6.
......@@ -63,7 +63,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "ungleich_screening_task.urls"
ROOT_URLCONF = "ungleich_hack_3.urls"
TEMPLATES = [
{
......@@ -81,7 +81,7 @@ TEMPLATES = [
},
]
WSGI_APPLICATION = "ungleich_screening_task.wsgi.application"
WSGI_APPLICATION = "ungleich_hack_3.wsgi.application"
# Database
......
"""ungleich_screening_task URL Configuration
"""ungleich_hack_3 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
......
"""
WSGI config for ungleich_screening_task project.
WSGI config for ungleich_hack_3 project.
It exposes the WSGI callable as a module-level variable named ``application``.
......@@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ungleich_screening_task.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ungleich_hack_3.settings")
application = get_wsgi_application()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment