This commit is contained in:
rachidatecs 2023-05-09 13:44:01 -04:00
commit 6fb087bd21
No known key found for this signature in database
GPG key ID: 3CEBBFA7325E5525
10 changed files with 237 additions and 42 deletions

View file

@ -49,7 +49,7 @@ class ViewsTest(TestCase):
# assert
self.assertEqual(response.status_code, 500)
self.assertTemplateUsed(response, "500.html")
self.assertIn("Server Error", response.content.decode("utf-8"))
self.assertIn("server error", response.content.decode("utf-8"))
def test_login_callback_reads_next(self, mock_client):
# setup

View file

@ -49,6 +49,11 @@ class UserFixture:
"first_name": "Rachid",
"last_name": "Mrad",
},
{
"username": "eb2214cd-fc0c-48c0-9dbd-bc4cd6820c74",
"first_name": "Alysia",
"last_name": "Broddrick",
},
]
@classmethod

View file

@ -0,0 +1,20 @@
<svg width="404" height="409" viewBox="0 0 404 409" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M291.707 328.743C240.024 358.583 133.444 374.87 78.8899 280.379C14.3648 168.618 78.2559 99.3488 140.956 63.1491C203.655 26.9495 296.801 80.4848 337.226 150.503C377.652 220.522 343.391 298.903 291.707 328.743Z" fill="#F5F8FA"/>
<circle cx="276.88" cy="130.594" r="8" transform="rotate(135 276.88 130.594)" fill="#7AA5C1"/>
<circle cx="288.196" cy="119.279" r="8" transform="rotate(135 288.196 119.279)" fill="#7AA5C1"/>
<circle cx="231.626" cy="175.849" r="8" transform="rotate(135 231.626 175.849)" fill="#7AA5C1"/>
<circle cx="186.371" cy="221.104" r="8" transform="rotate(135 186.371 221.104)" fill="#7AA5C1"/>
<circle cx="242.939" cy="164.535" r="8" transform="rotate(135 242.939 164.535)" fill="#7AA5C1"/>
<circle cx="197.686" cy="209.788" r="8" transform="rotate(135 197.686 209.788)" fill="#7AA5C1"/>
<circle cx="220.312" cy="187.163" r="8" transform="rotate(135 220.312 187.163)" fill="#7AA5C1"/>
<circle cx="175.057" cy="232.417" r="8" transform="rotate(135 175.057 232.417)" fill="#7AA5C1"/>
<circle cx="163.743" cy="243.731" r="8" transform="rotate(135 163.743 243.731)" fill="#7AA5C1"/>
<circle cx="152.43" cy="255.045" r="8" transform="rotate(135 152.43 255.045)" fill="#7AA5C1"/>
<circle cx="141.116" cy="266.358" r="8" transform="rotate(135 141.116 266.358)" fill="#7AA5C1"/>
<circle cx="129.802" cy="277.672" r="8" transform="rotate(135 129.802 277.672)" fill="#7AA5C1"/>
<circle cx="118.489" cy="288.986" r="8" transform="rotate(135 118.489 288.986)" fill="#7AA5C1"/>
<circle cx="254.253" cy="153.221" r="8" transform="rotate(135 254.253 153.221)" fill="#7AA5C1"/>
<circle cx="265.566" cy="141.908" r="8" transform="rotate(135 265.566 141.908)" fill="#7AA5C1"/>
<circle cx="208.998" cy="198.476" r="8" transform="rotate(135 208.998 198.476)" fill="#7AA5C1"/>
<circle cx="203.342" cy="203.999" r="120.001" stroke="#7AA5C1" stroke-width="16"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 53 KiB

View file

@ -0,0 +1,59 @@
<svg width="409" height="214" viewBox="0 0 409 214" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M366.004 90.4612C372.017 135.603 322.608 199.102 196.168 205.902C-32.9139 218.22 19.0655 18.8457 205.511 8.81994C299.204 3.78172 359.99 45.3195 366.004 90.4612Z" fill="#F5F8FA"/>
<circle cx="213.873" cy="37.4943" r="6.56803" fill="#7AA5C1"/>
<circle cx="212.214" cy="58.4272" r="6.56803" fill="#7AA5C1"/>
<circle cx="231.089" cy="66.2297" r="6.56803" fill="#7AA5C1"/>
<circle cx="235.451" cy="85.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="252.535" cy="99.7787" r="6.56803" fill="#7AA5C1"/>
<circle cx="273.981" cy="115.121" r="6.56803" fill="#7AA5C1"/>
<circle cx="372.072" cy="182.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="402.423" cy="189.642" r="6.56803" fill="#7AA5C1"/>
<circle cx="220.441" cy="99.6379" r="6.56803" fill="#7AA5C1"/>
<circle cx="231.089" cy="118.336" r="6.56803" fill="#7AA5C1"/>
<circle cx="262.722" cy="143.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="248.722" cy="125.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="288.537" cy="138.04" r="6.56803" fill="#7AA5C1"/>
<circle cx="300.051" cy="160.304" r="6.56803" fill="#7AA5C1"/>
<circle cx="338.722" cy="170.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="349.914" cy="189.575" r="6.56803" fill="#7AA5C1"/>
<circle cx="330.21" cy="189.575" r="6.56803" fill="#7AA5C1"/>
<circle cx="316.722" cy="173.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="305.722" cy="190.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="287.722" cy="184.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="269.894" cy="183.007" r="6.56803" fill="#7AA5C1"/>
<circle cx="250.19" cy="189.575" r="6.56803" fill="#7AA5C1"/>
<circle cx="220.722" cy="192.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="233.722" cy="173.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="252.722" cy="165.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="180.203" cy="189.575" r="6.56803" fill="#7AA5C1"/>
<circle cx="161.329" cy="196.143" r="6.56803" fill="#7AA5C1"/>
<circle cx="140.795" cy="189.575" r="6.56803" fill="#7AA5C1"/>
<path d="M122.733 189.575C122.733 193.203 119.793 196.143 116.165 196.143C112.538 196.143 109.597 193.203 109.597 189.575C109.597 185.948 112.538 183.007 116.165 183.007C119.793 183.007 122.733 185.948 122.733 189.575Z" fill="#7AA5C1"/>
<circle cx="91.5343" cy="189.642" r="6.56803" fill="#7AA5C1"/>
<circle cx="57.8852" cy="185.432" r="6.56803" fill="#7AA5C1"/>
<circle cx="198.722" cy="195.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="193.34" cy="70.2917" r="6.56803" fill="#7AA5C1"/>
<circle cx="98.9323" cy="156.735" r="6.56803" fill="#7AA5C1"/>
<circle cx="25.247" cy="189.642" r="6.56803" fill="#7AA5C1"/>
<circle cx="7.26164" cy="190.584" r="6.56803" fill="#7AA5C1"/>
<circle cx="76.7592" cy="173.44" r="6.56803" fill="#7AA5C1"/>
<circle cx="129.722" cy="172.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="147.722" cy="164.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="164.722" cy="173.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="174.465" cy="150.167" r="6.56803" fill="#7AA5C1"/>
<circle cx="186.771" cy="169.871" r="6.56803" fill="#7AA5C1"/>
<circle cx="198.266" cy="150.167" r="6.56803" fill="#7AA5C1"/>
<circle cx="232.747" cy="151.176" r="6.56803" fill="#7AA5C1"/>
<circle cx="273.722" cy="162.568" r="6.56803" fill="#7AA5C1"/>
<circle cx="210.589" cy="163.303" r="6.56803" fill="#7AA5C1"/>
<circle cx="204.834" cy="124.904" r="6.56803" fill="#7AA5C1"/>
<circle cx="193.34" cy="108.553" r="6.56803" fill="#7AA5C1"/>
<circle cx="171.181" cy="119.345" r="6.56803" fill="#7AA5C1"/>
<circle cx="160.499" cy="138.04" r="6.56803" fill="#7AA5C1"/>
<circle cx="139.153" cy="144.608" r="6.56803" fill="#7AA5C1"/>
<circle cx="170.351" cy="95.4167" r="6.56803" fill="#7AA5C1"/>
<circle cx="151.477" cy="115.121" r="6.56803" fill="#7AA5C1"/>
<circle cx="125.204" cy="137.031" r="6.56803" fill="#7AA5C1"/>
<circle cx="112.881" cy="163.303" r="6.56803" fill="#7AA5C1"/>
<circle cx="204.834" cy="86.6427" r="6.56803" fill="#7AA5C1"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -1,28 +1,45 @@
{% extends "base.html" %}
{% load i18n %}
{% load i18n static %}
{% block title %}{% translate "Unauthorized" %}{% endblock %}
{% block title %}{% translate "Unauthorized | " %}{% endblock %}
{% block content %}
<main id="main-content" class="grid-container">
<h1>{% translate "Unauthorized" %}</h1>
<div class="grid-row grow-gap">
<div class="tablet:grid-col-6 usa-prose margin-bottom-3">
<h1>
{% translate "You are not authorized to view this page" %}
</h1>
<h2>
{% translate "Status 401" %}
</h2>
{% if friendly_message %}
<p>{{ friendly_message }}</p>
{% else %}
<p>{% translate "Authorization failed." %}</p>
{% endif %}
<p><a href="{% url 'login' %}">
{% translate "Would you like to try logging in again?" %}
</a></p>
{% if friendly_message %}
<p>{{ friendly_message }}</p>
{% else %}
<p>{% translate "Authorization failed." %}</p>
{% endif %}
<p>
You must be an authorized user and need to be signed in to view this page.
Would you like to <a href="{% url 'login' %}"> try logging in again?</a>
</p>
<p>
If you would like help with this error <a href="https://federalist-877ab29f-16f6-4f12-961c-96cf064cf070.sites.pages.cloud.gov/site/cisagov/getgov-home/contact/"> contact us </a>
</p>
{% if log_identifier %}
<p>Here's a unique identifier for this error.</p>
<blockquote>{{ log_identifier }}</blockquote>
<p>{% translate "Please include it if you contact us." %}</p>
{% endif %}
TODO: Content team to create a "how to contact us" footer for the error pages
{% if log_identifier %}
<p>Here's a unique identifier for this error.</p>
<p class="text-semibold">{{ log_identifier }}</p>
<p>{% translate "Please include it if you contact us." %}</p>
{% endif %}
</div>
<div class="tablet:grid-col-4">
<img
src="{% static 'img/registrar/dotgov_401_illo.svg' %}"
alt=""
/>
</div>
</div>
</main>
{% endblock %}

View file

@ -0,0 +1,45 @@
{% extends "base.html" %}
{% load i18n static %}
{% block title %}{% translate "Forbidden | " %}{% endblock %}
{% block content %}
<main id="main-content" class="grid-container">
<div class="grid-row grow-gap">
<div class="tablet:grid-col-6 usa-prose margin-bottom-3">
<h1>
{% translate "You do not have the right permissions to view this page." %}
</h1>
<h2>
{% translate "Status 403" %}
</h2>
{% if friendly_message %}
<p>{{ friendly_message }}</p>
{% else %}
<p>{% translate "Forbidden." %}</p>
{% endif %}
<p>
You must be an authorized user and need to be signed in to view this page.
Would you like to <a href="{% url 'login' %}"> try logging in again?</a>
</p>
<p>
If you would like help with this error <a href="https://federalist-877ab29f-16f6-4f12-961c-96cf064cf070.sites.pages.cloud.gov/site/cisagov/getgov-home/contact/"> contact us </a>
</p>
{% if log_identifier %}
<p>Here's a unique identifier for this error.</p>
<p class="text-semibold">{{ log_identifier }}</p>
<p>{% translate "Please include it if you contact us." %}</p>
{% endif %}
</div>
<div class="tablet:grid-col-4">
<img
src="{% static 'img/registrar/dotgov_401_illo.svg' %}"
alt=""
/>
</div>
</div>
</main>
{% endblock %}

View file

@ -1,15 +1,31 @@
{% extends "base.html" %}
{% load i18n %}
{% load i18n static %}
{% block title %}{% translate "Page not found" %}{% endblock %}
{% block title %}{% translate "Page not found | " %}{% endblock %}
{% block content %}
<main id="main-content" class="grid-container">
<div class="grid-row grid-gap">
<div class="tablet:grid-col-6 usa-prose margin-bottom-3">
<h1>
{% translate "We couldnt find that page" %}
</h1>
<h2>
{% translate "Status 404" %}
</h2>
<h1>{% translate "Page not found" %}</h1>
<p> Try going to the <a href="/">homepage</a>. If you cant find what youre looking for, <a href= "https://federalist-877ab29f-16f6-4f12-961c-96cf064cf070.sites.pages.cloud.gov/site/cisagov/getgov-home/contact/">contact us.</a>
</p>
</div>
<div class="tablet:grid-col-4">
<img
src="{% static 'img/registrar/dotgov_404_illo.svg' %}"
alt=""
/>
</div>
</div>
<p>{% translate "The requested page could not be found." %}</p>
</main>
{% endblock %}

View file

@ -1,24 +1,39 @@
{% extends "base.html" %}
{% load i18n %}
{% load i18n static %}
{% block title %}{% translate "Server error" %}{% endblock %}
{% block title %}{% translate "Server error | " %}{% endblock %}
{% block content %}
<main id="main-content" class="grid-container">
<h1>{% translate "Server Error" %}</h1>
<div class="grid-row grid-gap">
<div class="tablet:grid-col-6 usa-prose margin-bottom-3">
<h1>
{% translate "We're having some trouble" %}
</h1>
<h2>
{% translate "Status 500 server error" %}
</h2>
{% if friendly_message %}
<p>{{ friendly_message }}</p>
{% else %}
<p>
Sorry! Try waiting a few minutes and then reloading the page.
<a href="https://federalist-877ab29f-16f6-4f12-961c-96cf064cf070.sites.pages.cloud.gov/site/cisagov/getgov-home/contact/"> Contact us </a> if you need help.
</p>
{% endif %}
{% if friendly_message %}
<p>{{ friendly_message }}</p>
{% else %}
<p>{% translate "An internal server error occurred." %}</p>
{% endif %}
{% if log_identifier %}
<p>Here's a unique identifier for this error.</p>
<blockquote>{{ log_identifier }}</blockquote>
<p>{% translate "Please include it if you contact us." %}</p>
{% endif %}
TODO: Content team to create a "how to contact us" footer for the error pages
{% if log_identifier %}
<p>Here's a unique identifier for this error.</p>
<p class="text-semibold">{{ log_identifier }}</p>
<p>{% translate "Please include it if you contact us." %}</p>
{% endif %}
</div>
<div class="tablet:grid-col-4 flex-align-self-end">
<img
src="{%static 'img/registrar/dotgov_500_illo.svg' %}"
alt=""
/>
</div>
</div>
</main>
{% endblock %}