Skip to content
Permalink
Browse files

Django 2.2.1 Upgrade

  • Loading branch information...
Maffooch Maffooch
Maffooch authored and Maffooch committed Jun 6, 2019
1 parent 6508e7e commit 74fc149b1504e74bd1182deca69c16b96ee91f02
Showing with 472 additions and 621 deletions.
  1. +2 −0 Dockerfile.django
  2. +1 −0 Dockerfile.nginx
  3. +2 −1 dojo/api.py
  4. +2 −1 dojo/api_v2/serializers.py
  5. +1 −1 dojo/benchmark/views.py
  6. +1 −1 dojo/cred/views.py
  7. +1 −1 dojo/development_environment/views.py
  8. +1 −1 dojo/endpoint/views.py
  9. +1 −1 dojo/engagement/views.py
  10. +2 −2 dojo/finding/views.py
  11. +148 −144 dojo/fixtures/test_type.json
  12. +2 −2 dojo/home/views.py
  13. +1 −1 dojo/jira_link/views.py
  14. +7 −6 dojo/metrics/views.py
  15. +22 −5 dojo/middleware.py
  16. +77 −77 dojo/models.py
  17. +1 −1 dojo/notes/views.py
  18. +4 −18 dojo/notifications/views.py
  19. +23 −36 dojo/object/parser.py
  20. +1 −1 dojo/object/views.py
  21. +24 −24 dojo/product/views.py
  22. +1 −1 dojo/product_type/views.py
  23. +2 −2 dojo/reports/views.py
  24. +1 −1 dojo/rules/views.py
  25. +3 −3 dojo/scan/views.py
  26. +2 −2 dojo/settings/settings.dist.py
  27. +1 −1 dojo/system_settings/views.py
  28. +1 −4 dojo/tasks.py
  29. +1 −15 dojo/templates/dojo/login.html
  30. +5 −4 dojo/templatetags/display_tags.py
  31. +4 −4 dojo/test/views.py
  32. +2 −3 dojo/test_type/views.py
  33. +1 −1 dojo/tool_config/views.py
  34. +1 −1 dojo/tool_product/views.py
  35. +11 −22 dojo/tool_type/views.py
  36. +1 −1 dojo/unittests/test_apiv2_metadata.py
  37. +1 −1 dojo/unittests/test_apiv2_scan_import_options.py
  38. +5 −6 dojo/unittests/test_rest_framework.py
  39. +2 −2 dojo/urls.py
  40. +3 −6 dojo/user/urls.py
  41. +2 −2 dojo/user/views.py
  42. +1 −1 dojo/utils.py
  43. +0 −1 manage.py
  44. +3 −3 requirements.txt
  45. +40 −38 setup/requirements-3.txt
  46. +9 −5 tests/{Endpoint_selenium_unittest.py → Endpoint_unit_test.py}
  47. +4 −4 tests/Engagement_unit_test.py
  48. 0 tests/{product_selenium_unittest.py → Product_unit_test.py}
  49. +0 −120 tests/Product_unit_test_example.py
  50. +7 −7 tests/{Test_selenium_unittest.py → Test_unit_test.py}
  51. 0 tests/{User_selenium_unittest.py → User_unit_test.py}
  52. +33 −35 tests/apply_finding_template_tests.py
  53. +1 −1 tests/check_status.py
@@ -13,6 +13,7 @@ RUN \
mysql-client \
postgresql-client \
xmlsec1 \
git \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists && \
@@ -35,6 +36,7 @@ RUN \
mysql-client \
libmariadbclient18 \
xmlsec1 \
git \
# only required for the dbshell (used by the initializer job)
postgresql-client \
&& \
@@ -12,6 +12,7 @@ RUN \
mysql-client \
postgresql-client \
xmlsec1 \
git \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists && \
@@ -1,6 +1,6 @@
# see tastypie documentation at http://django-tastypie.readthedocs.org/en
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.core.urlresolvers import resolve, get_script_prefix
from django.urls import resolve, get_script_prefix
from tastypie import fields
from tastypie.fields import RelatedField
from tastypie.authentication import ApiKeyAuthentication
@@ -14,6 +14,7 @@
from tastypie.validation import FormValidation, Validation
from django.urls.exceptions import Resolver404
from django.utils import timezone
import dojo.models


from dojo.models import Product, Engagement, Test, Finding, \
@@ -8,7 +8,7 @@
from dojo.tools.factory import import_parser_factory
from dojo.utils import create_notification
from django.core.validators import URLValidator, validate_ipv46_address
from django.core.urlresolvers import reverse
from django.urls import reverse
from rest_framework import serializers
from django.core.exceptions import ValidationError
from django.utils import timezone
@@ -19,6 +19,7 @@
import json
from tagging.models import Tag


class TagList(list):
def __init__(self, *args, **kwargs):
pretty_print = kwargs.pop("pretty_print", True)
@@ -1,7 +1,7 @@
import logging
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.forms import modelformset_factory
@@ -2,7 +2,7 @@
import os
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.http import HttpResponseRedirect, StreamingHttpResponse
from django.shortcuts import render, get_object_or_404
from django.utils import timezone
@@ -3,7 +3,7 @@

from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404

@@ -6,7 +6,7 @@
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render, get_object_or_404
from django.utils.html import escape
@@ -8,7 +8,7 @@
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.db.models import Q
from django.http import HttpResponseRedirect, StreamingHttpResponse, Http404, HttpResponse
from django.shortcuts import render, get_object_or_404
@@ -11,7 +11,7 @@
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.http import Http404, HttpResponse
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.http import StreamingHttpResponse
@@ -1382,7 +1382,7 @@ def merge_finding_product(request, pid):
Tag.objects.add_tag(finding, "merged-inactive")

# Update the finding to merge into
if finding_descriptions is not '':
if finding_descriptions != '':
finding_to_merge_into.description = "{}\n\n{}".format(finding_to_merge_into.description, finding_descriptions)

if finding_to_merge_into.static_finding:

0 comments on commit 74fc149

Please sign in to comment.
You can’t perform that action at this time.