Skip to content

Commit

Permalink
Merge pull request #1750 from cisagov/nl/1108-dependatbot-issue-django
Browse files Browse the repository at this point in the history
Issue #1108 - Django 4.2.3 dependabot issue
  • Loading branch information
CocoByte authored Feb 14, 2024
2 parents 2ad8b2e + af8d4b8 commit 93e0c99
Show file tree
Hide file tree
Showing 31 changed files with 558 additions and 630 deletions.
2 changes: 1 addition & 1 deletion src/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"

[packages]
django = "*"
django = "4.2.10"
cfenv = "*"
django-cors-headers = "*"
pycryptodomex = "*"
Expand Down
1,097 changes: 525 additions & 572 deletions src/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/api/tests/test_available.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class AvailableViewTest(MockEppLib):

"""Test that the view function works as expected."""

def setUp(self):
Expand Down Expand Up @@ -123,7 +122,6 @@ def test_error_handling(self):


class AvailableAPITest(MockEppLib):

"""Test that the API can be called as expected."""

def setUp(self):
Expand Down
1 change: 1 addition & 0 deletions src/api/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Internal API views"""

from django.apps import apps
from django.views.decorators.http import require_http_methods
from django.http import HttpResponse
Expand Down
1 change: 0 additions & 1 deletion src/registrar/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,6 @@ def __init__(self, *args, **kwargs):


class DomainApplicationAdmin(ListHeaderAdmin):

"""Custom domain applications admin class."""

class InvestigatorFilter(admin.SimpleListFilter):
Expand Down
1 change: 0 additions & 1 deletion src/registrar/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


class RegistrarConfig(AppConfig):

"""Configure signal handling for our registrar Django application."""

name = "registrar"
Expand Down
1 change: 1 addition & 0 deletions src/registrar/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
```
"""

import environs
from base64 import b64decode
from cfenv import AppEnv # type: ignore
Expand Down
1 change: 0 additions & 1 deletion src/registrar/fixtures_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ def load(cls):


class DomainFixture(DomainApplicationFixture):

"""Create one domain and permissions on it for each user."""

@classmethod
Expand Down
1 change: 1 addition & 0 deletions src/registrar/management/commands/cat_files_into_getgov.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Loads files from /tmp into our sandboxes"""

import glob
import logging

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generates current-full.csv and current-federal.csv then uploads them to the desired URL."""

import logging
import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generates current-full.csv and current-federal.csv then uploads them to the desired URL."""

import logging
import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Loops through each valid DomainInformation object and updates its agency value"""

import argparse
import csv
import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Not intended to be used as models but rather as an alternative to storing as a dictionary.
By keeping it as a dataclass instead of a dictionary, we can maintain data consistency.
""" # noqa

from dataclasses import dataclass, field
from datetime import date
from enum import Enum
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""""""

import csv
from dataclasses import dataclass
from datetime import datetime
Expand Down
1 change: 0 additions & 1 deletion src/registrar/models/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Contact(TimeStampedModel):

"""Contact information follows a similar pattern for each contact."""

user = models.OneToOneField(
Expand Down
3 changes: 0 additions & 3 deletions src/registrar/models/domain_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class DomainApplication(TimeStampedModel):

"""A registrant's application for a new domain."""

# Constants for choice fields
Expand Down Expand Up @@ -97,7 +96,6 @@ class StateTerritoryChoices(models.TextChoices):
ARMED_FORCES_AP = "AP", "Armed Forces Pacific (AP)"

class OrganizationChoices(models.TextChoices):

"""
Primary organization choices:
For use in django admin
Expand All @@ -114,7 +112,6 @@ class OrganizationChoices(models.TextChoices):
SCHOOL_DISTRICT = "school_district", "School district"

class OrganizationChoicesVerbose(models.TextChoices):

"""
Secondary organization choices
For use in the application form and on the templates
Expand Down
1 change: 0 additions & 1 deletion src/registrar/models/domain_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


class DomainInformation(TimeStampedModel):

"""A registrant's domain information for that domain, exported from
DomainApplication. We use these field from DomainApplication with few exceptions
which are 'removed' via pop at the bottom of this file. Most of design for domain
Expand Down
2 changes: 0 additions & 2 deletions src/registrar/models/user_domain_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@


class UserDomainRole(TimeStampedModel):

"""This is a linking table that connects a user with a role on a domain."""

class Roles(models.TextChoices):

"""The possible roles are listed here.
Implementation of the named roles for allowing particular operations happens
Expand Down
1 change: 0 additions & 1 deletion src/registrar/models/verified_by_staff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class VerifiedByStaff(TimeStampedModel):

"""emails that get added to this table will bypass ial2 on login."""

email = models.EmailField(
Expand Down
1 change: 0 additions & 1 deletion src/registrar/models/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Website(TimeStampedModel):

"""Keep domain names in their own table so that applications can refer to
many of them."""

Expand Down
1 change: 0 additions & 1 deletion src/registrar/no_cache_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class NoCacheMiddleware:

"""Middleware to add a single header to every response."""

def __init__(self, get_response):
Expand Down
1 change: 1 addition & 0 deletions src/registrar/templatetags/field_helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Custom field helpers for our inputs."""

import re

from django import template
Expand Down
2 changes: 0 additions & 2 deletions src/registrar/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ def test_approval_creates_role(self):


class TestDomainInformation(TestCase):

"""Test the DomainInformation model, when approved or otherwise"""

def setUp(self):
Expand Down Expand Up @@ -683,7 +682,6 @@ def clean_dict(self, dict_obj):


class TestInvitations(TestCase):

"""Test the retrieval of invitations."""

def setUp(self):
Expand Down
1 change: 1 addition & 0 deletions src/registrar/tests/test_models_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This file tests the various ways in which the registrar interacts with the registry.
"""

from django.test import TestCase
from django.db.utils import IntegrityError
from unittest.mock import MagicMock, patch, call
Expand Down
1 change: 0 additions & 1 deletion src/registrar/tests/test_views_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@


class DomainApplicationTests(TestWithUser, WebTest):

"""Webtests for domain application to test filling and submitting."""

# Doesn't work with CSRF checking
Expand Down
1 change: 0 additions & 1 deletion src/registrar/tests/test_views_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,6 @@ def test_domain_overview_blocked_for_ineligible_user(self):


class TestDomainDNSSEC(TestDomainOverview):

"""MockEPPLib is already inherited."""

def test_dnssec_page_refreshes_enable_button(self):
Expand Down
1 change: 0 additions & 1 deletion src/registrar/utility/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class EmailSendingError(RuntimeError):

"""Local error for handling all failures when sending email."""

pass
Expand Down
1 change: 0 additions & 1 deletion src/registrar/views/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def form_invalid(self, form):


class DomainView(DomainBaseView):

"""Domain detail overview page."""

template_name = "domain_detail.html"
Expand Down
7 changes: 0 additions & 7 deletions src/registrar/views/utility/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def get_submitter(self, obj):


class PermissionsLoginMixin(PermissionRequiredMixin):

"""Mixin that redirects to login page if not logged in, otherwise 403."""

def handle_no_permission(self):
Expand All @@ -155,7 +154,6 @@ def handle_no_permission(self):


class DomainPermission(PermissionsLoginMixin):

"""Permission mixin that redirects to domain if user has access,
otherwise 403"""

Expand Down Expand Up @@ -264,7 +262,6 @@ def can_access_other_user_domains(self, pk):


class DomainApplicationPermission(PermissionsLoginMixin):

"""Permission mixin that redirects to domain application if user
has access, otherwise 403"""

Expand All @@ -287,7 +284,6 @@ def has_permission(self):


class UserDeleteDomainRolePermission(PermissionsLoginMixin):

"""Permission mixin for UserDomainRole if user
has access, otherwise 403"""

Expand Down Expand Up @@ -324,7 +320,6 @@ def has_permission(self):


class DomainApplicationPermissionWithdraw(PermissionsLoginMixin):

"""Permission mixin that redirects to withdraw action on domain application
if user has access, otherwise 403"""

Expand All @@ -347,7 +342,6 @@ def has_permission(self):


class ApplicationWizardPermission(PermissionsLoginMixin):

"""Permission mixin that redirects to start or edit domain application if
user has access, otherwise 403"""

Expand All @@ -365,7 +359,6 @@ def has_permission(self):


class DomainInvitationPermission(PermissionsLoginMixin):

"""Permission mixin that redirects to domain invitation if user has
access, otherwise 403"
Expand Down
7 changes: 0 additions & 7 deletions src/registrar/views/utility/permission_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class DomainPermissionView(DomainPermission, DetailView, abc.ABC):

"""Abstract base view for domains that enforces permissions.
This abstract view cannot be instantiated. Actual views must specify
Expand Down Expand Up @@ -58,7 +57,6 @@ def template_name(self):


class DomainApplicationPermissionView(DomainApplicationPermission, DetailView, abc.ABC):

"""Abstract base view for domain applications that enforces permissions
This abstract view cannot be instantiated. Actual views must specify
Expand All @@ -78,7 +76,6 @@ def template_name(self):


class DomainApplicationPermissionWithdrawView(DomainApplicationPermissionWithdraw, DetailView, abc.ABC):

"""Abstract base view for domain application withdraw function
This abstract view cannot be instantiated. Actual views must specify
Expand All @@ -98,7 +95,6 @@ def template_name(self):


class ApplicationWizardPermissionView(ApplicationWizardPermission, TemplateView, abc.ABC):

"""Abstract base view for the application form that enforces permissions
This abstract view cannot be instantiated. Actual views must specify
Expand All @@ -113,7 +109,6 @@ def template_name(self):


class DomainInvitationPermissionDeleteView(DomainInvitationPermission, DeleteView, abc.ABC):

"""Abstract view for deleting a domain invitation.
This one is fairly specialized, but this is the only thing that we do
Expand All @@ -127,15 +122,13 @@ class DomainInvitationPermissionDeleteView(DomainInvitationPermission, DeleteVie


class DomainApplicationPermissionDeleteView(DomainApplicationPermission, DeleteView, abc.ABC):

"""Abstract view for deleting a DomainApplication."""

model = DomainApplication
object: DomainApplication


class UserDomainRolePermissionDeleteView(UserDeleteDomainRolePermission, DeleteView, abc.ABC):

"""Abstract base view for deleting a UserDomainRole.
This abstract view cannot be instantiated. Actual views must specify
Expand Down
Loading

0 comments on commit 93e0c99

Please sign in to comment.