The Web framework for perfectionists with deadlines.
This report summarizes scanner evidence for django/django, a Python project with 91,364 GitHub stars. SynthScan examined 686,297 lines of code across 3849 source files, recording 11858 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 22.5 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 10172 finding(s).
Are imports declared and package/API names verified? 1101 finding(s).
Are wrappers, guards, and repeated structures necessary? 9770 finding(s).
Which changes need focused human review? 11858 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 11858 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtests.py | 156 | def get_filtered_test_modules(start_at, start_after, gis_enabled, test_labels=None): | CODE |
| LOW | tests/generic_views/test_list.py | 66 | def test_paginated_queryset_shortdata(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 77 | def test_paginated_get_page_by_query_string(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 87 | def test_paginated_get_last_page_by_query_string(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 96 | def test_paginated_get_page_by_urlvar(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 106 | def test_paginated_page_out_of_range(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 111 | def test_paginated_invalid_page(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 116 | def test_paginated_custom_paginator_class(self): | CODE |
| LOW⚡ | tests/generic_views/test_list.py | 124 | def test_paginated_custom_page_kwarg(self): | CODE |
| LOW | tests/generic_views/test_list.py | 136 | def test_paginated_custom_paginator_constructor(self): | CODE |
| LOW | tests/generic_views/test_list.py | 143 | def test_paginated_orphaned_queryset(self): | CODE |
| LOW | tests/generic_views/test_list.py | 157 | def test_paginated_non_queryset(self): | CODE |
| LOW | tests/generic_views/test_list.py | 187 | def test_template_name_suffix(self): | CODE |
| LOW | tests/generic_views/test_list.py | 202 | def test_duplicate_context_object_name(self): | CODE |
| LOW | tests/generic_views/test_list.py | 218 | def test_invalid_get_queryset(self): | CODE |
| LOW | tests/generic_views/test_list.py | 226 | def test_paginated_list_view_does_not_load_entire_table(self): | CODE |
| LOW | tests/generic_views/test_list.py | 237 | def test_explicitly_ordered_list_view(self): | CODE |
| LOW | tests/generic_views/test_list.py | 254 | def test_paginated_list_view_returns_useful_message_on_invalid_page(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 53 | def test_detail_missing_object(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 57 | def test_detail_object_does_not_exist(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 79 | def test_detail_by_custom_slug(self): | CODE |
| LOW⚡ | tests/generic_views/test_detail.py | 90 | def test_detail_by_pk_ignore_slug(self): | CODE |
| LOW⚡ | tests/generic_views/test_detail.py | 99 | def test_detail_by_pk_ignore_slug_mismatch(self): | CODE |
| LOW⚡ | tests/generic_views/test_detail.py | 108 | def test_detail_by_pk_and_slug(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 137 | def test_template_name_suffix(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 163 | def test_duplicated_context_object_name(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 185 | def test_deferred_queryset_template_name(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 195 | def test_deferred_queryset_context_object_name(self): | CODE |
| LOW | tests/generic_views/test_detail.py | 218 | def test_non_model_object_with_meta(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 75 | def test_allow_empty_archive_view(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 82 | def test_archive_view_template(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 92 | def test_archive_view_template_suffix(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 102 | def test_archive_view_invalid(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 110 | def test_archive_view_by_month(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 118 | def test_paginated_archive_view(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 892 | def test_get_object_custom_queryset_numqueries(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 896 | def test_datetime_date_detail(self): | CODE |
| LOW⚡ | tests/generic_views/test_dates.py | 903 | def test_aware_datetime_date_detail(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 59 | def test_archive_view_context_object_name(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 134 | def test_paginated_archive_view_does_not_load_entire_table(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 150 | def test_datetime_archive_view(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 158 | def test_aware_datetime_archive_view(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 175 | def test_archive_view_custom_sorting(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 190 | def test_archive_view_custom_sorting_dec(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 205 | def test_archive_view_without_date_field(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 224 | def test_year_view_make_object_list(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 251 | def test_year_view_allow_future(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 281 | def test_year_view_custom_sort_order(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 303 | def test_year_view_two_custom_sort_orders(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 330 | def test_year_view_invalid_pattern(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 346 | def test_aware_datetime_year_view(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 362 | def test_get_context_data_receives_extra_context(self, mock): | CODE |
| LOW | tests/generic_views/test_dates.py | 379 | def test_get_dated_items_not_implemented(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 402 | def test_month_view_allow_empty(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 425 | def test_month_view_allow_future(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 453 | def test_month_view_paginated(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 470 | def test_month_view_invalid_pattern(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 474 | def test_previous_month_without_content(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 503 | def test_month_view_get_month_from_request(self): | CODE |
| LOW | tests/generic_views/test_dates.py | 514 | def test_month_view_without_month_in_url(self): | CODE |
| 9093 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/expressions_case/tests.py | 7 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/model_forms/test_modelchoicefield.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/model_forms/models.py | 7 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/model_forms/test_uuid.py | 2 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/aggregation/tests.py | 8 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/composite_pk/test_update.py | 1 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/composite_pk/test_models.py | 2 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/auth_tests/test_forms.py | 30 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/select_related/tests.py | 3 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/dates/tests.py | 4 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/foreign_object/tests.py | 6 | from django.core.exceptions import FieldError, ValidationError | CODE |
| CRITICAL | tests/model_regress/tests.py | 5 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL⚡ | tests/cache/tests.py | 2171 | django.core.cache.backends.base.BaseCache.__init__(). | STRING |
| CRITICAL | tests/custom_lookups/tests.py | 5 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/update/tests.py | 3 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/constraints/tests.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/model_inheritance/tests.py | 3 | from django.core.exceptions import FieldError, ValidationError | CODE |
| CRITICAL | tests/generic_relations/tests.py | 3 | from django.core.exceptions import FieldError, FieldFetchBlocked | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_urlfield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_charfield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | …sts/forms_tests/field_tests/test_splitdatetimefield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_typedchoicefield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_emailfield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_uuidfield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_combofield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | …ts/forms_tests/field_tests/test_multiplechoicefield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_filepathfield.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_floatfield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_multivaluefield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_integerfield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | …rms_tests/field_tests/test_typedmultiplechoicefield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_filefield.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_datetimefield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_choicefield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_datefield.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_booleanfield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_decimalfield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL⚡ | …/forms_tests/field_tests/test_genericipaddressfield.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_regexfield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_timefield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_imagefield.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/field_tests/test_durationfield.py | 3 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/tests/test_utils.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/tests/test_input_formats.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/tests/test_validators.py | 7 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/tests/test_error_messages.py | 1 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/forms_tests/tests/test_formsets.py | 5 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/test_exceptions/test_validation_error.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/select_for_update/tests.py | 7 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/queries/test_q.py | 3 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/queries/test_query.py | 3 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/model_options/test_default_related_name.py | 1 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/lookup/tests.py | 7 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/reverse_lookup/tests.py | 1 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/admin_views/models.py | 9 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/admin_views/custom_has_permission_admin.py | 8 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/admin_views/forms.py | 4 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/admin_views/admin.py | 13 | from django.core.exceptions import ValidationError | CODE |
| CRITICAL | tests/schema/tests.py | 8 | from django.core.exceptions import FieldError | CODE |
| CRITICAL | tests/custom_managers/tests.py | 497 | self.b1.fun_authors.through._default_manager.all(), | CODE |
| 137 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/sitecustomize.py | 3 | except ImportError: | CODE |
| HIGH | tests/runtests.py | 42 | except ImportError: | CODE |
| HIGH | tests/runtests.py | 456 | except ValueError: | CODE |
| HIGH | tests/runtests.py | 505 | except ValueError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 145 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 185 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 251 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 276 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 169 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 198 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 211 | except ForcedError: | CODE |
| HIGH | tests/transaction_hooks/tests.py | 224 | except ForcedError: | CODE |
| HIGH | tests/db_functions/datetime/test_extract_trunc.py | 928 | except (DataError, OperationalError): | CODE |
| HIGH | tests/cache/tests.py | 1736 | except Exception: | CODE |
| HIGH | tests/test_utils/tests.py | 2138 | except IntegrityError: | CODE |
| HIGH | tests/forms_tests/templatetags/tags.py | 14 | except AttributeError: | CODE |
| HIGH | tests/backends/tests.py | 427 | except DatabaseError: | CODE |
| HIGH | tests/backends/tests.py | 646 | except IntegrityError: | CODE |
| HIGH | tests/backends/tests.py | 677 | except IntegrityError: | CODE |
| HIGH | tests/backends/tests.py | 504 | except Exception: | CODE |
| HIGH | tests/backends/tests.py | 761 | except IntegrityError: | CODE |
| HIGH | tests/backends/tests.py | 776 | except IntegrityError: | CODE |
| HIGH | tests/backends/postgresql/test_creation.py | 13 | except ImportError: | CODE |
| HIGH | tests/backends/base/test_operations.py | 182 | except connection.features.closed_cursor_error_class: | CODE |
| HIGH | tests/select_for_update/tests.py | 59 | except (DatabaseError, AttributeError): | CODE |
| HIGH | tests/logging_tests/tests.py | 140 | except views.UncaughtException: | CODE |
| HIGH | tests/user_commands/management/commands/common_args.py | 10 | except ArgumentError: | CODE |
| HIGH | …nttypes_tests/operations_migrations/0002_rename_foo.py | 10 | except ContentType.DoesNotExist: | CODE |
| HIGH | tests/admin_views/admin.py | 865 | except ValueError: | CODE |
| HIGH | tests/staticfiles_tests/test_liveserver.py | 53 | except ImproperlyConfigured: | CODE |
| HIGH | tests/staticfiles_tests/storage.py | 53 | except FileNotFoundError: | CODE |
| HIGH | tests/get_or_create/tests.py | 264 | except IntegrityError: | CODE |
| HIGH | tests/postgres_tests/test_ranges.py | 34 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_trigram.py | 16 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_app_installed_check.py | 23 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_signals.py | 11 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_search.py | 25 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_apps.py | 25 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_array.py | 47 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_operations.py | 28 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_aggregates.py | 49 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_hstore.py | 18 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_constraints.py | 47 | except ImportError: | CODE |
| HIGH | tests/postgres_tests/test_bulk_update.py | 16 | except ImportError: | CODE |
| HIGH | tests/bash_completion/tests.py | 56 | except SystemExit: | CODE |
| HIGH | tests/handlers/views.py | 92 | except AttributeError: | CODE |
| HIGH | tests/gis_tests/gdal_tests/test_srs.py | 228 | except (SRSException, GDALException): | CODE |
| HIGH | tests/gis_tests/gis_migrations/test_commands.py | 51 | except NotImplementedError: | CODE |
| HIGH | docs/lint.py | 97 | except IndexError: | CODE |
| HIGH | docs/_ext/djangodocs.py | 141 | except nodes.SkipNode: | CODE |
| HIGH | docs/_ext/djangodocs.py | 155 | except nodes.SkipNode: | CODE |
| HIGH | django/middleware/csrf.py | 277 | except DisallowedHost: | CODE |
| HIGH | django/middleware/csrf.py | 371 | except UnreadablePostError: | CODE |
| HIGH | django/middleware/cache.py | 230 | except KeyError: | CODE |
| HIGH | django/middleware/cache.py | 237 | except KeyError: | CODE |
| HIGH | django/middleware/common.py | 159 | except MailerDoesNotExist: | CODE |
| HIGH | django/forms/models.py | 749 | except KeyError: | CODE |
| HIGH | django/forms/models.py | 769 | except IndexError: | CODE |
| HIGH | django/forms/models.py | 757 | except ValidationError: | CODE |
| HIGH | django/forms/widgets.py | 558 | except AttributeError: | CODE |
| 175 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/runtests.py | 524 | # Create a specific subdirectory for the duration of the test suite. | COMMENT |
| MEDIUM | tests/generic_views/test_dates.py | 252 | # Create a new book in the future | COMMENT |
| MEDIUM | tests/mutually_referential/tests.py | 8 | # Create a Parent | COMMENT |
| MEDIUM | tests/model_forms/tests.py | 1640 | # Create a ModelForm, instantiate it, and check that the output is as | COMMENT |
| MEDIUM | tests/model_forms/tests.py | 1878 | # Create a new article, with categories, via the form. | COMMENT |
| MEDIUM | tests/model_forms/tests.py | 1896 | # Create a new article, with no categories, via the form. | COMMENT |
| MEDIUM | tests/model_forms/tests.py | 1904 | # Create a new article, with categories, via the form, but use | COMMENT |
| MEDIUM | tests/fixtures_regress/tests.py | 88 | # Create a new animal. Without a sequence reset, this new object | COMMENT |
| MEDIUM | tests/fixtures_regress/tests.py | 474 | # Create an instance of the concrete class | COMMENT |
| MEDIUM | tests/auth_tests/urls_admin.py | 11 | # Create a silo'd admin site for just the user/group admins. | COMMENT |
| MEDIUM | tests/auth_tests/test_management.py | 524 | # Creating a second user with the same email won't be caught by | COMMENT |
| MEDIUM | tests/sessions_tests/tests.py | 697 | # Create a session | COMMENT |
| MEDIUM⚡ | tests/foreign_object/tests.py | 77 | # Creating a valid membership because it has the same country has the | COMMENT |
| MEDIUM⚡ | tests/foreign_object/tests.py | 85 | # Creating an invalid membership because it has a different country has | COMMENT |
| MEDIUM | tests/foreign_object/tests.py | 99 | # Creating a to valid memberships | COMMENT |
| MEDIUM | tests/foreign_object/tests.py | 111 | # Creating an invalid membership | COMMENT |
| MEDIUM | tests/foreign_object/tests.py | 128 | # Creating a to valid memberships | COMMENT |
| MEDIUM | tests/foreign_object/tests.py | 142 | # Creating an invalid membership | COMMENT |
| MEDIUM | tests/foreign_object/tests.py | 168 | # Creating an invalid membership | COMMENT |
| MEDIUM⚡ | tests/generic_inline_admin/tests.py | 425 | # Create a formset with default arguments | COMMENT |
| MEDIUM⚡ | tests/generic_inline_admin/tests.py | 430 | # Create a formset with custom keyword arguments | COMMENT |
| MEDIUM | tests/template_tests/test_response.py | 173 | # Create a template response. The context is | COMMENT |
| MEDIUM | tests/template_tests/test_response.py | 310 | # Create a template response. The context is | COMMENT |
| MEDIUM | tests/template_tests/test_context.py | 277 | # Create an engine without any context processors. | COMMENT |
| MEDIUM | tests/generic_relations_regress/tests.py | 186 | # Create a couple of extra HasLinkThing so that the autopk value | COMMENT |
| MEDIUM⚡ | tests/generic_relations/tests.py | 642 | # Create a Vegetable and Mineral with the same id. | COMMENT |
| MEDIUM | tests/file_uploads/tests.py | 191 | # This file contains Chinese symbols and an accented char in the | COMMENT |
| MEDIUM | tests/file_uploads/tests.py | 892 | # Create a file with the upload directory name | COMMENT |
| MEDIUM | tests/mail/test_backends.py | 77 | # Create an instance of the backend_class for use in this test context | COMMENT |
| MEDIUM | tests/backends/tests.py | 242 | # Create an object with a manually specified PK | COMMENT |
| MEDIUM | tests/backends/tests.py | 631 | # Create a Reporter. | COMMENT |
| MEDIUM | tests/backends/tests.py | 666 | # Create an Article. | COMMENT |
| MEDIUM | tests/backends/tests.py | 703 | # Create an Article. | COMMENT |
| MEDIUM | tests/backends/tests.py | 726 | # Create an Article. | COMMENT |
| MEDIUM | tests/backends/tests.py | 748 | # Create an Article. | COMMENT |
| MEDIUM | tests/backends/base/test_base.py | 81 | # Create a new connection that will be closed during the test, and also | COMMENT |
| MEDIUM⚡ | tests/file_storage/tests.py | 421 | # Create a storage backend associated with the mixed case name | COMMENT |
| MEDIUM | tests/select_for_update/tests.py | 562 | # This method is run in a separate thread. It uses its own | COMMENT |
| MEDIUM | tests/select_for_update/tests.py | 634 | # This method is run in a separate thread. It uses its own | COMMENT |
| MEDIUM | tests/queries/tests.py | 3413 | # Create a few Orders. Explicit pks needed for IntegerField pk. | COMMENT |
| MEDIUM | tests/basic/tests.py | 611 | # Create an Article. | COMMENT |
| MEDIUM | tests/basic/tests.py | 708 | # Create a very similar object | COMMENT |
| MEDIUM | tests/lookup/test_timefield.py | 9 | # Create a few Alarms | COMMENT |
| MEDIUM | tests/lookup/tests.py | 54 | # Create a few Authors. | COMMENT |
| MEDIUM | tests/lookup/tests.py | 57 | # Create a few Articles. | COMMENT |
| MEDIUM | tests/lookup/tests.py | 100 | # Create a few Tags. | COMMENT |
| MEDIUM⚡ | tests/many_to_one_null/tests.py | 9 | # Create a Reporter. | COMMENT |
| MEDIUM⚡ | tests/many_to_one_null/tests.py | 12 | # Create an Article. | COMMENT |
| MEDIUM⚡ | tests/many_to_one_null/tests.py | 15 | # Create an Article via the Reporter object. | COMMENT |
| MEDIUM⚡ | tests/many_to_one_null/tests.py | 17 | # Create an Article with no Reporter by passing "reporter=None". | COMMENT |
| MEDIUM | tests/contenttypes_tests/test_models.py | 285 | # Create a stale ContentType that matches the name of an existing | COMMENT |
| MEDIUM | tests/admin_views/tests.py | 6809 | # Create a new user to ensure that no extra permissions have been set. | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 4888 | # Create the table | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 4894 | # Create a row | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 4912 | # Create the table | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 4918 | # Create a row | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 4996 | # Create the table | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 4999 | # Create a row | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 5081 | # Create the table | COMMENT |
| MEDIUM⚡ | tests/schema/tests.py | 5084 | # Create a row | COMMENT |
| 298 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/fixtures_regress/tests.py | 717 | [{"fields": {"main": null, "name": "Amazon"}, | STRING |
| HIGH | tests/fixtures_regress/tests.py | 719 | {"fields": {"main": null, "name": "Borders"}, | STRING |
| HIGH⚡ | tests/template_tests/test_context.py | 21 | self.assertEqual(c.push(), {}) | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 32 | with c.push(): | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 37 | with c.push(a=3): | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 54 | with c.push(Context({"a": 3})): | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 66 | c.push(Context({"b": 2})) | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 67 | c.push(Context({"c": 3, "d": {"z": "26"}})) | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 150 | a.push(Context({"z": "8"})) | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 220 | c.push({"a": 2}) | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 231 | c.push({"b": 2}) | CODE |
| HIGH | tests/template_tests/test_context.py | 124 | test_context.push() | CODE |
| HIGH⚡ | tests/template_tests/test_context.py | 147 | Context.push() with a Context argument should work. | STRING |
| HIGH | tests/db_functions/text/test_left.py | 19 | # If alias is null, set it to the first 2 lower characters of the name. | COMMENT |
| HIGH | tests/db_functions/text/test_right.py | 20 | # If alias is null, set it to the first 2 lower characters of the name. | COMMENT |
| HIGH | tests/db_functions/text/test_substr.py | 20 | # If alias is null, set to first 5 lower characters of the name. | COMMENT |
| HIGH | tests/inspectdb/tests.py | 616 | CREATE TABLE inspectdb_partition_parent (name text not null) | STRING |
| HIGH | tests/queries/tests.py | 3114 | self.assertSequenceEqual(Related.objects.filter(custom__isnull=True), [null]) | CODE |
| HIGH | tests/nested_foreign_keys/tests.py | 15 | # with 2 relations. The first relation may be null, while the second is | COMMENT |
| HIGH | tests/serializers/test_jsonl.py | 19 | '{"pk": null,"model": "serializers.category","fields": {"name": "Reference"}}', | CODE |
| HIGH | tests/serializers/test_jsonl.py | 239 | '{"pk": 1,"model": "serializers.m2mdata","fields": {"data": null}}' | CODE |
| HIGH | tests/serializers/test_json.py | 22 | "pk": null, | CODE |
| HIGH | tests/serializers/test_json.py | 270 | "fields": {"data": null} | CODE |
| HIGH | tests/many_to_one/tests.py | 150 | # Funny case - because the ForeignKey cannot be null, | COMMENT |
| HIGH | tests/many_to_one/tests.py | 194 | # Because the ForeignKey cannot be null, existing members of the set | COMMENT |
| HIGH | tests/many_to_one/tests.py | 624 | # Assigning None succeeds if field is null=True. | COMMENT |
| HIGH | tests/model_fields/test_field_flags.py | 221 | self.assertFalse(AllFieldsModel._meta.get_field("m2m").null) | CODE |
| HIGH | tests/model_fields/test_field_flags.py | 222 | self.assertTrue(AllFieldsModel._meta.get_field("reverse2").null) | CODE |
| HIGH | tests/model_fields/test_jsonfield.py | 190 | '[{"fields": {"value": %s}, "model": "model_fields.jsonmodel", "pk": null}]' | CODE |
| HIGH | tests/model_fields/test_jsonfield.py | 194 | ({"a": "b", "c": None}, '{"a": "b", "c": null}'), | CODE |
| HIGH⚡ | tests/model_fields/test_uuid.py | 239 | '"model": "model_fields.uuidmodel", "pk": null}]' | CODE |
| HIGH⚡ | tests/model_fields/test_uuid.py | 242 | '[{"fields": {"field": null}, ' | CODE |
| HIGH⚡ | tests/model_fields/test_uuid.py | 243 | '"model": "model_fields.nullableuuidmodel", "pk": null}]' | CODE |
| HIGH | tests/model_fields/test_durationfield.py | 56 | '"pk": null}]' | CODE |
| HIGH⚡ | tests/one_to_one/tests.py | 213 | # Assigning None succeeds if field is null=True. | COMMENT |
| HIGH | tests/one_to_one/tests.py | 279 | # Assigning None succeeds if field is null=True. | COMMENT |
| HIGH⚡ | tests/expressions/tests.py | 2851 | (AutoField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2852 | (DecimalField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2853 | (FloatField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2854 | (IntegerField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2855 | (IntegerField, Combinable.SUB, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2856 | (null, Combinable.ADD, IntegerField), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2858 | (DateField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2859 | (DateTimeField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2860 | (DurationField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2861 | (TimeField, Combinable.ADD, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2862 | (TimeField, Combinable.SUB, null), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2863 | (null, Combinable.ADD, DateTimeField), | STRING |
| HIGH⚡ | tests/expressions/tests.py | 2864 | (DateField, Combinable.SUB, null), | STRING |
| HIGH | tests/field_defaults/tests.py | 75 | self.assertEqual(obj1.null, 1.1) | CODE |
| HIGH | tests/field_defaults/tests.py | 79 | self.assertIsNone(obj2.null) | CODE |
| HIGH | tests/field_defaults/tests.py | 113 | self.assertEqual(obj1.null, 1.1) | CODE |
| HIGH⚡ | tests/postgres_tests/test_ranges.py | 575 | '"bigints": null, "timestamps": ' | CODE |
| HIGH⚡ | tests/postgres_tests/test_ranges.py | 578 | '"timestamps_inner": null, ' | CODE |
| HIGH⚡ | tests/postgres_tests/test_ranges.py | 582 | '\\"bounds\\": \\"[)\\"}", "dates_inner": null }, ' | CODE |
| HIGH⚡ | tests/postgres_tests/test_ranges.py | 583 | '"model": "postgres_tests.rangesmodel", "pk": null}]' | CODE |
| HIGH | tests/postgres_tests/test_array.py | 1031 | '[{"fields": {"field": "[\\"1\\", \\"2\\", null]"}, ' | CODE |
| HIGH | tests/postgres_tests/test_array.py | 1032 | '"model": "postgres_tests.integerarraymodel", "pk": null}]' | CODE |
| HIGH | tests/postgres_tests/test_hstore.py | 390 | value = field.clean('{"a": null}') | CODE |
| HIGH⚡ | tests/gis_tests/gdal_tests/test_geom.py | 396 | self.assertTrue(d1.geos.equals(d2.geos)) | CODE |
| 64 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtests.py | 333 | CODE | |
| LOW | tests/model_forms/models.py | 167 | CODE | |
| LOW | tests/fixtures_regress/tests.py | 59 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/composite_pk/models/__init__.py | 1 | CODE | |
| LOW | tests/auth_tests/backend_alias.py | 2 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 1 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 2 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 2 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 2 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 2 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 8 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 9 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 10 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 11 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 12 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 13 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 13 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 14 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 15 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 16 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 16 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 17 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 18 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 19 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 19 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 19 | CODE | |
| LOW | tests/auth_tests/models/__init__.py | 20 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 1 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 1 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 1 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 1 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 1 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 2 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 2 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 2 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 2 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 3 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 4 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 4 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 4 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 4 | CODE | |
| LOW | tests/foreign_object/models/__init__.py | 4 | CODE | |
| LOW | tests/template_tests/broken_tag.py | 1 | CODE | |
| LOW | tests/playwright_tests/__init__.py | 1 | CODE | |
| LOW | tests/playwright_tests/__init__.py | 2 | CODE | |
| LOW | tests/playwright_tests/__init__.py | 2 | CODE | |
| LOW | tests/playwright_tests/__init__.py | 2 | CODE | |
| LOW | tests/urlpatterns_reverse/views.py | 26 | CODE | |
| LOW | tests/forms_tests/field_tests/test_filefield.py | 11 | CODE | |
| LOW | tests/invalid_models_tests/test_ordinary_fields.py | 843 | CODE | |
| LOW | …_backends/apps/importerror/templatetags/broken_tags.py | 1 | CODE | |
| LOW | tests/admin_scripts/broken_app/models.py | 1 | CODE | |
| LOW | tests/admin_scripts/simple_app/models.py | 1 | CODE | |
| LOW | tests/admin_scripts/complex_app/models/__init__.py | 1 | CODE | |
| 551 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtests.py | 108 | CODE | |
| LOW | tests/runtests.py | 445 | CODE | |
| LOW | tests/test_runner/tests.py | 772 | CODE | |
| LOW | tests/pagination/tests.py | 161 | CODE | |
| LOW | tests/pagination/tests.py | 596 | CODE | |
| LOW | tests/pagination/tests.py | 683 | CODE | |
| LOW | tests/auth_tests/test_forms.py | 1733 | CODE | |
| LOW | tests/auth_tests/test_hashers.py | 510 | CODE | |
| LOW | tests/auth_tests/test_hashers.py | 525 | CODE | |
| LOW | tests/auth_tests/test_auth_backends.py | 699 | CODE | |
| LOW | tests/transaction_hooks/tests.py | 191 | CODE | |
| LOW | tests/transaction_hooks/tests.py | 204 | CODE | |
| LOW | tests/transaction_hooks/tests.py | 217 | CODE | |
| LOW | tests/admin_filters/tests.py | 1388 | CODE | |
| LOW | tests/db_functions/datetime/test_extract_trunc.py | 1838 | CODE | |
| LOW | tests/cache/tests.py | 729 | CODE | |
| LOW | tests/update/tests.py | 235 | CODE | |
| LOW | tests/urlpatterns_reverse/tests.py | 687 | CODE | |
| LOW | tests/mail/test_deprecated.py | 227 | CODE | |
| LOW | tests/mail/test_deprecated.py | 449 | CODE | |
| LOW | tests/mail/test_backends.py | 196 | CODE | |
| LOW | tests/mail/tests.py | 1058 | CODE | |
| LOW | tests/mail/tests.py | 1490 | CODE | |
| LOW | tests/mail/tests.py | 2563 | CODE | |
| LOW | tests/mail/tests.py | 2588 | CODE | |
| LOW | tests/forms_tests/widget_tests/test_selectdatewidget.py | 597 | CODE | |
| LOW | tests/backends/postgresql/tests.py | 37 | CODE | |
| LOW | tests/backends/postgresql/tests.py | 95 | CODE | |
| LOW | tests/backends/oracle/test_creation.py | 74 | CODE | |
| LOW | tests/backends/sqlite/test_introspection.py | 11 | CODE | |
| LOW | tests/backends/sqlite/tests.py | 176 | CODE | |
| LOW | tests/backends/base/test_client.py | 20 | CODE | |
| LOW | tests/backends/base/test_base.py | 424 | CODE | |
| LOW | tests/file_storage/tests.py | 831 | CODE | |
| LOW | tests/async/test_async_queryset.py | 250 | CODE | |
| LOW | tests/select_for_update/tests.py | 395 | CODE | |
| LOW | tests/select_for_update/tests.py | 421 | CODE | |
| LOW | tests/queries/test_qs_combinators.py | 783 | CODE | |
| LOW | tests/queries/test_qs_combinators.py | 832 | CODE | |
| LOW | tests/queries/test_explain.py | 15 | CODE | |
| LOW | tests/queries/test_explain.py | 80 | CODE | |
| LOW | tests/introspection/tests.py | 362 | CODE | |
| LOW | tests/urlpatterns/tests.py | 264 | CODE | |
| LOW | tests/admin_views/test_skip_link_to_content.py | 115 | CODE | |
| LOW | tests/admin_views/tests.py | 338 | CODE | |
| LOW | tests/admin_views/tests.py | 369 | CODE | |
| LOW | tests/schema/tests.py | 146 | CODE | |
| LOW | tests/schema/tests.py | 269 | CODE | |
| LOW | tests/schema/tests.py | 6043 | CODE | |
| LOW | tests/admin_scripts/tests.py | 66 | CODE | |
| LOW | tests/transactions/tests.py | 116 | CODE | |
| LOW | tests/transactions/tests.py | 155 | CODE | |
| LOW | tests/transactions/tests.py | 196 | CODE | |
| LOW | tests/transactions/tests.py | 216 | CODE | |
| LOW | tests/transactions/tests.py | 280 | CODE | |
| LOW | tests/transactions/tests.py | 304 | CODE | |
| LOW | tests/transactions/tests.py | 453 | CODE | |
| LOW | tests/utils_tests/test_autoreload.py | 550 | CODE | |
| LOW | tests/utils_tests/test_autoreload.py | 570 | CODE | |
| LOW | tests/utils_tests/test_html.py | 40 | CODE | |
| 374 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/middleware/views.py | 88 | except Exception: | CODE |
| MEDIUM | tests/middleware/views.py | 85 | def csp_500(request): | CODE |
| MEDIUM | tests/asgi/tests.py | 317 | def post_view(request): | CODE |
| LOW | tests/asgi/tests.py | 324 | except Exception as e: | CODE |
| MEDIUM | tests/cache/tests.py | 692 | def _perform_cull_test(self, cull_cache_name, initial_count, final_count): | CODE |
| LOW | tests/cache/tests.py | 1736 | except Exception: | CODE |
| LOW | tests/file_uploads/tests.py | 759 | except Exception as err: | CODE |
| LOW | tests/file_uploads/tests.py | 779 | except Exception as err: | CODE |
| LOW | tests/forms_tests/field_tests/test_datefield.py | 217 | except Exception as e: | CODE |
| LOW⚡ | tests/backends/tests.py | 430 | except Exception as e: | CODE |
| LOW | tests/backends/tests.py | 504 | except Exception: | CODE |
| LOW | tests/backends/tests.py | 881 | except Exception as e: | CODE |
| LOW | tests/file_storage/tests.py | 749 | except Exception: | CODE |
| MEDIUM | tests/view_tests/views.py | 54 | def get(self, request): | CODE |
| MEDIUM | tests/view_tests/views.py | 212 | def async_sensitive_view_nested(request): | CODE |
| MEDIUM | tests/view_tests/views.py | 257 | def sensitive_args_function_caller(request): | CODE |
| MEDIUM | tests/view_tests/views.py | 279 | def sensitive_kwargs_function_caller(request): | CODE |
| MEDIUM | tests/view_tests/views.py | 397 | def async_method_nested(self, request): | CODE |
| LOW⚡ | tests/view_tests/views.py | 40 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 49 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 57 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 157 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 175 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 193 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 215 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 233 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 251 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 264 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 286 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 326 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 348 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 365 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 381 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 400 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/views.py | 427 | except Exception: | CODE |
| LOW | tests/view_tests/views.py | 99 | except Exception: | CODE |
| MEDIUM | tests/view_tests/tests/test_debug.py | 625 | def test_sharing_traceback(self): | CODE |
| MEDIUM | tests/view_tests/tests/test_debug.py | 770 | def test_mid_stack_exception_without_traceback(self): | CODE |
| MEDIUM | tests/view_tests/tests/test_debug.py | 914 | def test_reporting_frames_without_source(self): | CODE |
| MEDIUM | tests/view_tests/tests/test_debug.py | 949 | def test_reporting_frames_source_not_match(self): | CODE |
| MEDIUM | tests/view_tests/tests/test_debug.py | 989 | def test_reporting_frames_for_cyclic_reference(self): | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 701 | except Exception as exc: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 705 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 742 | except Exception as err: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 747 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 774 | except Exception as exc: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 778 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 814 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 999 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 1082 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 1094 | except Exception: | CODE |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 1113 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 329 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 857 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 920 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 955 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 1131 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 1147 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 1163 | except Exception: | CODE |
| LOW | tests/view_tests/tests/test_debug.py | 1354 | except Exception: | CODE |
| 172 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …emplate_tests/syntax_tests/i18n/test_blocktranslate.py | 0 | simple baseline behavior with one locale for all the supported i18n constructs. | STRING |
| HIGH | …sts/template_tests/syntax_tests/i18n/test_translate.py | 0 | simple baseline behavior with one locale for all the supported i18n constructs. | STRING |
| HIGH | …late_tests/syntax_tests/i18n/test_underscore_syntax.py | 0 | simple baseline behavior with one locale for all the supported i18n constructs. | STRING |
| HIGH | tests/db_functions/datetime/test_now.py | 0 | lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq | STRING |
| HIGH | tests/db_functions/comparison/test_coalesce.py | 0 | lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq | STRING |
| HIGH | tests/db_functions/text/test_concat.py | 0 | lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq | STRING |
| HIGH | tests/forms_tests/widget_tests/test_dateinput.py | 0 | use 'format' to change the way a value is displayed. | STRING |
| HIGH | tests/forms_tests/widget_tests/test_timeinput.py | 0 | use 'format' to change the way a value is displayed. | STRING |
| HIGH | tests/forms_tests/widget_tests/test_datetimeinput.py | 0 | use 'format' to change the way a value is displayed. | STRING |
| HIGH | tests/forms_tests/widget_tests/test_select.py | 0 | if the value corresponds to a label (but not to an option value), none of the options are selected. | STRING |
| HIGH | tests/forms_tests/widget_tests/test_radioselect.py | 0 | if the value corresponds to a label (but not to an option value), none of the options are selected. | STRING |
| HIGH | tests/forms_tests/widget_tests/test_selectmultiple.py | 0 | if the value corresponds to a label (but not to an option value), none of the options are selected. | STRING |
| HIGH | tests/view_tests/tests/test_csrf.py | 0 | the templates are loaded directly, not via a template loader, and should be opened as utf-8 charset as is the default sp | STRING |
| HIGH | tests/view_tests/tests/test_static.py | 0 | the templates are loaded directly, not via a template loader, and should be opened as utf-8 charset as is the default sp | STRING |
| HIGH | tests/view_tests/tests/test_i18n.py | 0 | the templates are loaded directly, not via a template loader, and should be opened as utf-8 charset as is the default sp | STRING |
| HIGH | tests/view_tests/tests/test_debug.py | 0 | the templates are loaded directly, not via a template loader, and should be opened as utf-8 charset as is the default sp | STRING |
| HIGH | tests/schema/tests.py | 0 | select opcname, c.relname from pg_opclass as oc join pg_index as i on oc.oid = any(i.indclass) join pg_class as c on c.o | STRING |
| HIGH | tests/postgres_tests/test_constraints.py | 0 | select opcname, c.relname from pg_opclass as oc join pg_index as i on oc.oid = any(i.indclass) join pg_class as c on c.o | STRING |
| HIGH | tests/postgres_tests/test_indexes.py | 0 | select opcname, c.relname from pg_opclass as oc join pg_index as i on oc.oid = any(i.indclass) join pg_class as c on c.o | STRING |
| HIGH | tests/gis_tests/geoapp/test_indexes.py | 0 | select opcname, c.relname from pg_opclass as oc join pg_index as i on oc.oid = any(i.indclass) join pg_class as c on c.o | STRING |
| HIGH | tests/gis_tests/gis_migrations/test_operations.py | 0 | select opcname, c.relname from pg_opclass as oc join pg_index as i on oc.oid = any(i.indclass) join pg_class as c on c.o | STRING |
| HIGH | tests/indexes/tests.py | 0 | select opcname, c.relname from pg_opclass as oc join pg_index as i on oc.oid = any(i.indclass) join pg_class as c on c.o | STRING |
| HIGH | django/contrib/gis/db/backends/oracle/models.py | 0 | return the name of the metadata column used to store the feature table name. | STRING |
| HIGH | django/contrib/gis/db/backends/postgis/models.py | 0 | return the name of the metadata column used to store the feature table name. | STRING |
| HIGH | django/contrib/gis/db/backends/spatialite/models.py | 0 | return the name of the metadata column used to store the feature table name. | STRING |
| HIGH | django/contrib/gis/db/backends/oracle/models.py | 0 | return the name of the metadata column used to store the feature geometry column. | STRING |
| HIGH | django/contrib/gis/db/backends/postgis/models.py | 0 | return the name of the metadata column used to store the feature geometry column. | STRING |
| HIGH | django/contrib/gis/db/backends/spatialite/models.py | 0 | return the name of the metadata column used to store the feature geometry column. | STRING |
| HIGH | django/db/backends/postgresql/introspection.py | 0 | return a list of table and view names in the current database. | STRING |
| HIGH | django/db/backends/oracle/introspection.py | 0 | return a list of table and view names in the current database. | STRING |
| HIGH | django/db/backends/sqlite3/introspection.py | 0 | return a list of table and view names in the current database. | STRING |
| HIGH | django/db/backends/mysql/introspection.py | 0 | return a list of table and view names in the current database. | STRING |
| HIGH | django/db/backends/postgresql/introspection.py | 0 | return a description of the table with the db-api cursor.description interface. | STRING |
| HIGH | django/db/backends/oracle/introspection.py | 0 | return a description of the table with the db-api cursor.description interface. | STRING |
| HIGH | django/db/backends/sqlite3/introspection.py | 0 | return a description of the table with the db-api cursor.description interface. | STRING |
| HIGH | django/db/backends/base/introspection.py | 0 | return a description of the table with the db-api cursor.description interface. | STRING |
| HIGH | django/db/backends/postgresql/introspection.py | 0 | return a dictionary of { field_name: (field_name_other_table, other_table, db_on_delete) } representing all foreign keys | STRING |
| HIGH | django/db/backends/oracle/introspection.py | 0 | return a dictionary of { field_name: (field_name_other_table, other_table, db_on_delete) } representing all foreign keys | STRING |
| HIGH | django/db/backends/mysql/introspection.py | 0 | return a dictionary of { field_name: (field_name_other_table, other_table, db_on_delete) } representing all foreign keys | STRING |
| HIGH | django/db/backends/base/introspection.py | 0 | return a dictionary of { field_name: (field_name_other_table, other_table, db_on_delete) } representing all foreign keys | STRING |
| HIGH | django/db/backends/oracle/introspection.py | 0 | retrieve any constraints or keys (unique, pk, fk, check, index) across one or more columns. | STRING |
| HIGH | django/db/backends/sqlite3/introspection.py | 0 | retrieve any constraints or keys (unique, pk, fk, check, index) across one or more columns. | STRING |
| HIGH | django/db/backends/mysql/introspection.py | 0 | retrieve any constraints or keys (unique, pk, fk, check, index) across one or more columns. | STRING |
| HIGH | django/views/csrf.py | 0 | return a path to a builtin template. avoid calling this function at the module level or in a class-definition because __ | STRING |
| HIGH | django/views/debug.py | 0 | return a path to a builtin template. avoid calling this function at the module level or in a class-definition because __ | STRING |
| HIGH | django/views/static.py | 0 | return a path to a builtin template. avoid calling this function at the module level or in a class-definition because __ | STRING |
| HIGH | django/views/i18n.py | 0 | return a path to a builtin template. avoid calling this function at the module level or in a class-definition because __ | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/generic_views/test_edit.py | 155 | {"name": "John Doe", "slug": "john-doe"}, | CODE |
| LOW⚡ | tests/generic_views/test_edit.py | 158 | pk = Author.objects.get(name="John Doe").pk | CODE |
| LOW⚡ | tests/generic_views/test_edit.py | 314 | {"name": "John Doe", "slug": "john-doe"}, | CODE |
| LOW⚡ | tests/generic_views/test_edit.py | 317 | pk = Author.objects.get(name="John Doe").pk | CODE |
| LOW | tests/expressions_case/tests.py | 1509 | name="Jane Doe", | CODE |
| LOW | tests/expressions_case/tests.py | 1533 | [("Jane Doe", "0%"), ("James Smith", "5%"), ("Jack Black", "10%")], | CODE |
| LOW | tests/expressions_case/tests.py | 1548 | [("Jane Doe", "5%"), ("James Smith", "0%"), ("Jack Black", "10%")], | CODE |
| LOW | tests/expressions_case/tests.py | 1564 | [("Jane Doe", "G"), ("James Smith", "R"), ("Jack Black", "P")], | CODE |
| LOW⚡ | tests/model_forms/tests.py | 274 | form = modelform_factory(Person, fields="__all__")({"name": "John Doe"}) | CODE |
| LOW⚡ | tests/model_forms/tests.py | 2463 | author = Author.objects.create(publication=publication, full_name="John Doe") | CODE |
| LOW⚡ | tests/model_forms/tests.py | 2464 | form = AuthorForm({"publication": "", "full_name": "John Doe"}, instance=author) | CODE |
| LOW⚡ | tests/model_forms/tests.py | 2482 | author = Author1.objects.create(publication=publication, full_name="John Doe") | CODE |
| LOW⚡ | tests/model_forms/tests.py | 2483 | form = AuthorForm({"publication": "", "full_name": "John Doe"}, instance=author) | CODE |
| LOW | tests/model_forms/tests.py | 2082 | "article": "lorem ipsum", | CODE |
| LOW | tests/model_forms/tests.py | 2113 | "article": "lorem ipsum", | CODE |
| LOW⚡ | tests/auth_tests/test_forms.py | 1198 | User.objects.create_user("mike123", "mike@example.org", "test123") | CODE |
| LOW⚡ | tests/auth_tests/test_forms.py | 1199 | User.objects.create_user("mike456", "mıke@example.org", "test123") | CODE |
| LOW⚡ | tests/auth_tests/test_forms.py | 1200 | data = {"email": "mıke@example.org"} | CODE |
| LOW⚡ | tests/auth_tests/test_forms.py | 1204 | self.assertEmailMessageSent(to=["mıke@example.org"]) | CODE |
| LOW⚡ | tests/auth_tests/test_forms.py | 1216 | User.objects.create_user("mike123", "mike@example.org", "test123") | CODE |
| LOW⚡ | tests/auth_tests/test_forms.py | 1217 | data = {"email": "mıke@example.org"} | CODE |
| LOW | tests/auth_tests/test_forms.py | 1236 | data = {"email": "foo@bar.com"} | CODE |
| LOW | tests/auth_tests/test_management.py | 1253 | "email": "test@test.com", | CODE |
| LOW | tests/auth_tests/test_views.py | 1755 | username="uuid", email="foo@bar.com", password="test" | CODE |
| LOW⚡ | tests/auth_tests/test_remote_user.py | 456 | self.email_header: "user@example.com", | CODE |
| LOW⚡ | tests/auth_tests/test_remote_user.py | 460 | self.assertEqual(response.context["user"].email, "user@example.com") | CODE |
| LOW⚡ | tests/auth_tests/test_remote_user.py | 464 | self.assertEqual(newuser.email, "user@example.com") | CODE |
| LOW⚡ | tests/auth_tests/test_remote_user.py | 482 | self.email_header.removeprefix("HTTP_"): "user@example.com", | CODE |
| LOW⚡ | tests/auth_tests/test_remote_user.py | 486 | self.assertEqual(response.context["user"].email, "user@example.com") | CODE |
| LOW⚡ | tests/auth_tests/test_remote_user.py | 490 | self.assertEqual(newuser.email, "user@example.com") | CODE |
| LOW⚡ | tests/auth_tests/test_models.py | 162 | email="test@test.com", | CODE |
| LOW⚡ | tests/auth_tests/test_models.py | 173 | email="test@test.com", | CODE |
| LOW⚡ | tests/auth_tests/test_models.py | 182 | email="test@test.com", | CODE |
| LOW⚡ | tests/auth_tests/test_models.py | 191 | email="test@test.com", | CODE |
| LOW⚡ | tests/auth_tests/test_models.py | 522 | user = User.objects.create(username="foo", email="foo@bar.com") | CODE |
| LOW | tests/auth_tests/test_models.py | 269 | user = User(email="foo@bar.com") | CODE |
| LOW | tests/auth_tests/test_models.py | 293 | self.assertEqual(user.email, "foo@bar.com") | CODE |
| LOW | tests/bulk_create/models.py | 127 | email_field = models.EmailField(null=True, default="user@example.com") | CODE |
| LOW | tests/generic_inline_admin/tests.py | 266 | "name": "John Doe", | CODE |
| LOW | tests/template_tests/syntax_tests/test_lorem.py | 12 | self.assertEqual(output, "lorem ipsum dolor") | CODE |
| LOW | tests/db_functions/datetime/test_now.py | 12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW | tests/db_functions/datetime/test_now.py | 12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW | tests/db_functions/comparison/test_coalesce.py | 9 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW | tests/db_functions/comparison/test_coalesce.py | 9 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW | tests/db_functions/text/test_concat.py | 13 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW | tests/db_functions/text/test_concat.py | 13 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod | CODE |
| LOW | tests/model_inheritance/tests.py | 86 | post = Post.objects.create(title="Lorem Ipsum") | CODE |
| LOW | tests/mail/test_sendtestemail.py | 8 | ADMINS=["admin@example.com", "admin_and_manager@example.com"], | CODE |
| LOW | tests/mail/test_sendtestemail.py | 87 | "admin@example.com", | CODE |
| LOW | tests/mail/test_sendtestemail.py | 111 | "admin@example.com", | CODE |
| LOW | tests/mail/tests.py | 2485 | with self.settings(SERVER_EMAIL=address, ADMINS=["admin@example.com"]): | CODE |
| LOW | tests/mail/tests.py | 2549 | @override_settings(ADMINS=["admin@example.com"], MANAGERS=["manager@example.com"]) | CODE |
| LOW | tests/mail/tests.py | 2651 | @override_settings(ADMINS=["admin@example.com"], MANAGERS=["manager@example.com"]) | CODE |
| LOW | tests/mail/tests.py | 2704 | @override_settings(ADMINS=["admin@example.com"], MANAGERS=["manager@example.com"]) | CODE |
| LOW⚡ | tests/forms_tests/tests/test_forms.py | 1233 | {"name": "John Doe"}, initial={"birthday": datetime.date(1974, 8, 16)} | CODE |
| LOW⚡ | tests/forms_tests/tests/test_forms.py | 1235 | f2 = PersonFormFieldInitial({"name": "John Doe"}) | CODE |
| LOW⚡ | tests/forms_tests/tests/test_forms.py | 1240 | {"birthday": datetime.date(1974, 8, 16), "name": "John Doe"}, | CODE |
| LOW⚡ | tests/forms_tests/tests/test_forms.py | 1244 | data = {"name": "John Doe", "birthday": "1984-11-10"} | CODE |
| LOW⚡ | tests/forms_tests/tests/test_forms.py | 1251 | {"birthday": datetime.date(1974, 8, 16), "name": "John Doe"}, | CODE |
| LOW⚡ | tests/forms_tests/tests/test_forms.py | 2870 | name = CharField(initial=lambda: "John Doe", disabled=True) | CODE |
| 109 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_sqlite.py | 1 | # This is an example test settings file for use with the Django test suite. | COMMENT |
| LOW | tests/asgi/tests.py | 401 | scope = self.async_request_factory._base_scope(path="/") | COMMENT |
| LOW | tests/migrate_signals/models.py | 1 | # This module has to exist, otherwise pre/post_migrate aren't sent for the | COMMENT |
| LOW | tests/requests_tests/tests.py | 981 | # 3. main_stream.read(1) -- BoundaryIter.__init__ probe, file field | COMMENT |
| LOW | tests/queries/tests.py | 4681 | # These are still both references to the same QuerySet, despite | COMMENT |
| LOW | tests/nested_foreign_keys/tests.py | 21 | # Model B | COMMENT |
| LOW | …lates/project_template/additional_dir/requirements.txt | 1 | # some file for {{ project_name }} test project | COMMENT |
| LOW | …templates/project_template/additional_dir/localized.py | 1 | # Regression for #22699. | COMMENT |
| LOW | tests/i18n/test_compilation.py | 201 | os_walk_results = [ | COMMENT |
| LOW | tests/gis_tests/layermap/tests.py | 221 | # has the effect of ignoring the spatial reference check (because | COMMENT |
| LOW | tests/gis_tests/distapp/tests.py | 441 | """ | COMMENT |
| LOW | tests/gis_tests/distapp/tests.py | 501 | COMMENT | |
| LOW | tests/gis_tests/distapp/tests.py | 541 | self.assertAlmostEqual(distance, city.distance.m, tol) | COMMENT |
| LOW | docs/conf.py | 1 | # Django documentation build configuration file, created by | COMMENT |
| LOW | docs/conf.py | 21 | # RuntimeError: maximum recursion depth exceeded while pickling an object | COMMENT |
| LOW | docs/conf.py | 161 | COMMENT | |
| LOW | docs/conf.py | 221 | COMMENT | |
| LOW | docs/conf.py | 261 | # If false, no module index is generated. | COMMENT |
| LOW | docs/conf.py | 341 | COMMENT | |
| LOW | docs/conf.py | 401 | # epub_basename = 'Django' | COMMENT |
| LOW | docs/conf.py | 421 | # epub_uid = '' | COMMENT |
| LOW | docs/conf.py | 441 | # epub_tocdepth = 3 | COMMENT |
| LOW | docs/ref/class-based-views/generic-display.txt | 21 | * :class:`django.views.generic.base.TemplateResponseMixin` | COMMENT |
| LOW | scripts/manage_translations.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | django/middleware/csrf.py | 441 | return self._reject( | COMMENT |
| LOW | django/forms/fields.py | 121 | # label -- A verbose name for this field, for use in displaying this | COMMENT |
| LOW | django/core/serializers/__init__.py | 201 | # Also add a dependency for any simple M2M relation with a model | COMMENT |
| LOW | django/test/runner.py | 1221 | # Try to be a bit smarter than unittest about finding the default top-level | COMMENT |
| LOW | django/template/defaulttags.py | 641 | {% for o in some_list %} | COMMENT |
| LOW | django/utils/encoding.py | 121 | # reserved = gen-delims / sub-delims | COMMENT |
| LOW | django/contrib/admin/static/admin/js/calendar.js | 121 | const todayDay = today.getDate(); | COMMENT |
| LOW | …ntrib/admin/static/admin/js/admin/DateTimeShortcuts.js | 161 | clock_link.setAttribute("aria-labelledby", clockIconId); | COMMENT |
| LOW | …ntrib/admin/static/admin/js/admin/DateTimeShortcuts.js | 361 | // role="dialog" aria-label="Choose a Date"> | COMMENT |
| LOW | django/contrib/sessions/backends/file.py | 141 | if not must_create: | COMMENT |
| LOW | django/contrib/humanize/templatetags/humanize.py | 41 | else: | COMMENT |
| LOW | django/contrib/humanize/templatetags/humanize.py | 221 | # Translators: delta will contain a string like '2 months' or | COMMENT |
| LOW | django/contrib/gis/measure.py | 1 | # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> | COMMENT |
| LOW | django/contrib/gis/db/backends/postgis/pgraster.py | 121 | COMMENT | |
| LOW | django/http/response.py | 321 | # Per PEP 3333, this response body must be bytes. To avoid returning | COMMENT |
| LOW | django/db/backends/oracle/base.py | 601 | # Handle params as a dict with unified query parameters by their | COMMENT |
| LOW | django/db/backends/base/features.py | 341 | COMMENT | |
| LOW | django/db/backends/base/schema.py | 1061 | if drop_foreign_keys: | COMMENT |
| LOW | django/db/models/options.py | 341 | # Insert the given field in the order in which it was created, using | COMMENT |
| LOW | django/db/models/query.py | 881 | # you can't insert into the child tables which references this. There | COMMENT |
| LOW | django/db/models/query.py | 2921 | assigning results to relevant caches in instance. | COMMENT |
| LOW | django/db/models/query.py | 3041 | COMMENT | |
| LOW | django/db/models/deletion.py | 121 | self.origin = origin | COMMENT |
| LOW | django/db/models/fields/files.py | 181 | # the FieldFile API so that users can easily do things like | COMMENT |
| LOW | django/db/models/fields/related.py | 241 | errors = [] | COMMENT |
| LOW | django/db/models/fields/__init__.py | 101 | COMMENT | |
| LOW | django/db/models/fields/__init__.py | 901 | connection. | COMMENT |
| LOW | django/db/models/sql/compiler.py | 101 | Return a list of 2-tuples of form (sql, params). | COMMENT |
| LOW | django/db/models/sql/compiler.py | 121 | # SomeModel.objects.values('name').annotate(Count('somecol')).values('pk') | COMMENT |
| LOW | django/db/models/sql/query.py | 541 | # applied we must take the slice from the ordered query. Otherwise | COMMENT |
| LOW | django/db/models/sql/query.py | 721 | # as T4 -> T6 while combining two querysets. To prevent this, change an | COMMENT |
| LOW | django/db/models/sql/query.py | 2861 | results from the query. | COMMENT |
| LOW | django/db/models/sql/query.py | 2881 | # when there is a joinable row, then use INNER. For example, in | COMMENT |
| LOW | django/db/models/sql/query.py | 2901 | # vote is enough). The demotion is OK, if rel_a doesn't produce | COMMENT |
| LOW | django/views/templates/technical_500.html | 41 | div.context ol li pre { display:inline; } | COMMENT |
| LOW | django/conf/global_settings.py | 21 | # on a live site. | COMMENT |
| 28 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/model_forms/tests.py | 1928 | # same fields as the Category model, we can just call the form's save() | COMMENT |
| LOW | tests/get_earliest_or_latest/tests.py | 188 | # "get_latest_by" set -- just pass in the field name manually. | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 148 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 166 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 184 | # Do not just use plain strings for the variables' values in the code so | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 202 | # Do not just use plain strings for the variables' values in the code so | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 224 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 242 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 272 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 294 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 316 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 356 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 372 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/views.py | 388 | # Do not just use plain strings for the variables' values in the code | COMMENT |
| LOW⚡ | tests/view_tests/tests/test_debug.py | 815 | # Custom exception handler, just pass it into ExceptionReporter | COMMENT |
| LOW⚡ | tests/model_meta/tests.py | 281 | # should just return an EMPTY_RELATION_TREE. | COMMENT |
| MEDIUM | tests/many_to_one/tests.py | 406 | # Counting in the opposite direction works in conjunction with | COMMENT |
| LOW⚡ | tests/queryset_pickle/tests.py | 61 | # can't just use assertEqual(original, unpickled) | COMMENT |
| MEDIUM | tests/postgres_tests/test_indexes.py | 562 | """SearchVector generates IMMUTABLE SQL in order to be indexable.""" | STRING |
| MEDIUM | tests/gis_tests/geo3d/tests.py | 51 | # http://seamless.usgs.gov/products/9arc.php | COMMENT |
| MEDIUM | tests/gis_tests/geo3d/tests.py | 51 | # http://seamless.usgs.gov/products/9arc.php | COMMENT |
| LOW | django/middleware/cache.py | 93 | # We don't need to update the cache, just return. | COMMENT |
| LOW | django/forms/models.py | 1568 | # the property self.choices. In this case, just return self._choices. | COMMENT |
| MEDIUM | django/template/base.py | 570 | # When deprecation ends elevate the warning to an error. | COMMENT |
| LOW | django/contrib/admin/options.py | 282 | # For any other type of field, just call its formfield() method. | COMMENT |
| LOW | django/contrib/admin/options.py | 1229 | # If the action is a callable, just use it. | COMMENT |
| LOW | django/http/multipartparser.py | 229 | # This is a post field, we can just set it in the post | COMMENT |
| LOW | django/http/multipartparser.py | 648 | # There's nothing left, we should just return and mark as done. | COMMENT |
| LOW | django/db/backends/sqlite3/operations.py | 168 | # For consistency with SQLiteCursorWrapper.execute(), just return sql | COMMENT |
| LOW⚡ | django/db/backends/base/creation.py | 232 | # below, just return and skip it all. | COMMENT |
| MEDIUM | django/db/backends/base/base.py | 99 | # Each entry is an (sids, func, robust) tuple, where sids is a set of | COMMENT |
| MEDIUM | django/db/backends/base/base.py | 100 | # the active savepoint IDs when this function was registered and robust | COMMENT |
| LOW | django/db/models/fields/related_descriptors.py | 361 | # when accessing the attribute we just set. | COMMENT |
| LOW | django/db/models/fields/related_descriptors.py | 644 | # query when accessing the attribute we just set. | COMMENT |
| LOW | django/db/models/fields/related.py | 952 | # While 'limit_choices_to' might be a callable, simply pass | COMMENT |
| MEDIUM | django/db/models/sql/query.py | 465 | # resolving purpose to facilitate their subsequent removal. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/model_forms/tests.py | 2612 | # Check if the max_length attribute has been inherited from the model. | COMMENT |
| LOW | tests/auth_tests/test_remote_user.py | 218 | # Set last_login to something so we can determine if it changes. | COMMENT |
| LOW | tests/auth_tests/test_remote_user.py | 237 | # Set last_login to something so we can determine if it changes. | COMMENT |
| LOW⚡ | tests/cache/tests.py | 2367 | # Set headers to an empty list. | COMMENT |
| LOW | tests/cache/tests.py | 2345 | # Set headers to an empty list. | COMMENT |
| LOW | tests/cache/tests.py | 3353 | # Set headers to an empty list. | COMMENT |
| LOW | tests/cache/tests.py | 3375 | # Set headers to an empty list. | COMMENT |
| LOW⚡ | tests/requests_tests/tests.py | 1341 | # Check if X_FORWARDED_HOST isn't provided. | COMMENT |
| LOW⚡ | tests/requests_tests/tests.py | 1350 | # Check if HTTP_HOST isn't provided. | COMMENT |
| LOW⚡ | tests/requests_tests/tests.py | 1358 | # Check if HTTP_HOST isn't provided, and we're on a nonstandard port | COMMENT |
| LOW⚡ | tests/requests_tests/tests.py | 1411 | # Check if X_FORWARDED_HOST isn't provided. | COMMENT |
| LOW⚡ | tests/requests_tests/tests.py | 1420 | # Check if HTTP_HOST isn't provided. | COMMENT |
| LOW⚡ | tests/requests_tests/tests.py | 1428 | # Check if HTTP_HOST isn't provided, and we're on a nonstandard port | COMMENT |
| LOW | tests/requests_tests/tests.py | 1330 | # Check if X_FORWARDED_HOST is provided. | COMMENT |
| LOW | tests/requests_tests/tests.py | 1400 | # Check if X_FORWARDED_HOST is provided. | COMMENT |
| LOW | tests/admin_views/tests.py | 1012 | # Check if the correct column was selected. 2 is the index of the | COMMENT |
| LOW⚡ | tests/model_fields/test_floatfield.py | 15 | # Set value to valid and save | COMMENT |
| LOW⚡ | tests/model_fields/test_floatfield.py | 19 | # Set field to object on saved instance | COMMENT |
| LOW | tests/gis_tests/gdal_tests/test_raster.py | 476 | # Check if options used on creation are stored in metadata. | COMMENT |
| LOW | tests/indexes/models.py | 15 | # Set unique to enable model cache. | COMMENT |
| LOW | scripts/verify_release.sh | 8 | # Set GPG_KEY to a key fingerprint to import it before verifying, e.g.: | COMMENT |
| LOW | django/middleware/common.py | 52 | # Check if we also need to append a slash so we can do it all | COMMENT |
| LOW | django/core/validators.py | 171 | # Check if the scheme is valid. | COMMENT |
| LOW | django/core/serializers/xml_serializer.py | 349 | # Check if there is a child node named 'None', returning None if so. | COMMENT |
| LOW | django/template/base.py | 1049 | # Set this to True for nodes that must be first in the template (although | COMMENT |
| LOW | django/utils/log.py | 308 | # Check if the response has already been logged. Multiple requests to log | COMMENT |
| LOW | django/contrib/auth/hashers.py | 462 | # Set salt_len to the salt_len of the current parameters because salt | COMMENT |
| LOW | django/contrib/admin/options.py | 1631 | # Check if this is an optgroup (label is a sequence | COMMENT |
| LOW | django/contrib/gis/gdal/raster/source.py | 146 | # Check if width and height where specified | COMMENT |
| LOW | django/contrib/gis/gdal/raster/source.py | 152 | # Check if srid was specified | COMMENT |
| LOW | django/contrib/gis/db/backends/spatialite/base.py | 72 | # Check if spatial metadata have been initialized in the database | COMMENT |
| LOW | django/contrib/gis/db/models/fields.py | 200 | # Check if input is a candidate for conversion to raster or | COMMENT |
| LOW | django/contrib/gis/db/models/lookups.py | 29 | # Check if a band index was passed in the query argument. | COMMENT |
| LOW | django/contrib/gis/db/models/lookups.py | 315 | # Check if the second parameter is a band index. | COMMENT |
| LOW | django/db/backends/base/schema.py | 665 | # Check if the constraint is still in deferred_sql. This happens when | COMMENT |
| LOW | django/db/models/base.py | 2442 | # Check if auto-generated name for the field is too long | COMMENT |
| LOW | django/db/models/base.py | 2465 | # Check if auto-generated name for the M2M field is too long | COMMENT |
| LOW | django/db/models/sql/query.py | 1863 | # Check if we need any joins for concrete inheritance cases (the | COMMENT |
| LOW | django/db/models/sql/where.py | 162 | # Check if this node matches nothing or everything. | COMMENT |
| LOW | django/apps/config.py | 124 | # Check if there's exactly one AppConfig candidate, | COMMENT |
| LOW | django/apps/config.py | 138 | # Check if there's exactly one AppConfig subclass, | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/composite_pk/models/__init__.py | 3 | __all__ = [ | CODE |
| LOW | tests/test_runner/test_debug_sql.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/auth_tests/backend_alias.py | 4 | __all__ = ["ImportedModelBackend"] | CODE |
| LOW | tests/foreign_object/models/__init__.py | 6 | __all__ = [ | CODE |
| LOW | tests/admin_scripts/simple_app/models.py | 3 | __all__ = ["Bar"] | CODE |
| LOW | tests/admin_scripts/complex_app/models/__init__.py | 4 | __all__ = ["Foo", "Bar"] | CODE |
| LOW | tests/model_package/models/__init__.py | 5 | __all__ = ["Article", "Publication"] | CODE |
| LOW | docs/_ext/djangodocs.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | scripts/pr_quality/check_pr.py | 65 | logger = logging.getLogger(__name__) | CODE |
| LOW | django/middleware/__init__.py | 5 | __all__ = ["MiddlewareMixin"] | CODE |
| LOW | django/tasks/__init__.py | 16 | __all__ = [ | CODE |
| LOW | django/tasks/backends/immediate.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | django/core/cache/__init__.py | 26 | __all__ = [ | CODE |
| LOW | django/core/mail/__init__.py | 43 | __all__ = [ | CODE |
| LOW | django/core/checks/__init__.py | 32 | __all__ = [ | CODE |
| LOW | django/core/files/__init__.py | 3 | __all__ = ["File"] | CODE |
| LOW | django/core/files/uploadhandler.py | 12 | __all__ = [ | CODE |
| LOW | django/core/files/move.py | 13 | __all__ = ["file_move_safe"] | CODE |
| LOW | django/test/__init__.py | 21 | __all__ = [ | CODE |
| LOW | django/utils/choices.py | 6 | __all__ = [ | CODE |
| LOW | django/utils/timezone.py | 14 | __all__ = [ | CODE |
| LOW | django/utils/translation/__init__.py | 12 | __all__ = [ | CODE |
| LOW | django/contrib/admin/__init__.py | 27 | __all__ = [ | CODE |
| LOW | django/contrib/postgres/indexes.py | 6 | __all__ = [ | CODE |
| LOW | django/contrib/postgres/constraints.py | 15 | __all__ = ["ExclusionConstraint"] | CODE |
| LOW | django/contrib/postgres/forms/ranges.py | 11 | __all__ = [ | CODE |
| LOW | django/contrib/postgres/forms/hstore.py | 7 | __all__ = ["HStoreField"] | CODE |
| LOW | django/contrib/postgres/aggregates/statistics.py | 3 | __all__ = [ | CODE |
| LOW | django/contrib/postgres/aggregates/general.py | 13 | __all__ = [ | CODE |
| LOW | django/contrib/postgres/fields/citext.py | 3 | __all__ = ["CICharField", "CIEmailField", "CITextField"] | CODE |
| LOW | django/contrib/postgres/fields/ranges.py | 18 | __all__ = [ | CODE |
| LOW | django/contrib/postgres/fields/jsonb.py | 3 | __all__ = ["JSONField"] | CODE |
| LOW | django/contrib/postgres/fields/array.py | 18 | __all__ = ["ArrayField"] | CODE |
| LOW | django/contrib/postgres/fields/hstore.py | 11 | __all__ = ["HStoreField"] | CODE |
| LOW | django/contrib/gis/measure.py | 43 | __all__ = ["A", "Area", "D", "Distance"] | CODE |
| LOW | django/contrib/gis/geoip2.py | 24 | __all__ = ["HAS_GEOIP2"] | CODE |
| LOW | django/contrib/gis/geos/io.py | 15 | __all__ = ["WKBWriter", "WKTWriter", "WKBReader", "WKTReader"] | CODE |
| LOW | django/contrib/gis/geos/prototypes/misc.py | 12 | __all__ = ["geos_area", "geos_distance", "geos_length", "geos_isvalidreason"] | CODE |
| LOW | django/contrib/gis/admin/__init__.py | 16 | __all__ = [ | CODE |
| LOW | django/contrib/gis/utils/__init__.py | 10 | __all__ = [ | CODE |
| LOW | django/contrib/gis/sitemaps/__init__.py | 4 | __all__ = ["KMLSitemap", "KMZSitemap"] | CODE |
| LOW | django/contrib/gis/db/models/aggregates.py | 10 | __all__ = ["Collect", "Extent", "Extent3D", "MakeLine", "Union"] | CODE |
| LOW | django/contrib/gis/db/models/sql/__init__.py | 3 | __all__ = [ | CODE |
| LOW | django/http/__init__.py | 28 | __all__ = [ | CODE |
| LOW | django/urls/__init__.py | 27 | __all__ = [ | CODE |
| LOW | django/db/__init__.py | 19 | __all__ = [ | CODE |
| LOW | django/db/backends/postgresql/compiler.py | 9 | __all__ = [ | CODE |
| LOW | django/db/backends/mysql/compiler.py | 8 | __all__ = [ | CODE |
| LOW | django/db/models/enums.py | 7 | __all__ = ["Choices", "IntegerChoices", "TextChoices"] | CODE |
| LOW | django/db/models/indexes.py | 11 | __all__ = ["Index"] | CODE |
| LOW | django/db/models/aggregates.py | 23 | __all__ = [ | CODE |
| LOW | django/db/models/constraints.py | 25 | __all__ = ["BaseConstraint", "CheckConstraint", "Deferrable", "UniqueConstraint"] | CODE |
| LOW | django/db/models/functions/window.py | 4 | __all__ = [ | CODE |
| LOW | django/db/models/functions/__init__.py | 96 | __all__ = [ | CODE |
| LOW | django/db/models/fields/generated.py | 8 | __all__ = ["GeneratedField"] | CODE |
| LOW | django/db/models/fields/__init__.py | 43 | __all__ = [ | CODE |
| LOW | django/db/models/fields/json.py | 22 | __all__ = ["JSONField"] | CODE |
| LOW | django/db/models/sql/query.py | 52 | __all__ = ["Query", "RawQuery"] | CODE |
| LOW | django/db/models/sql/subqueries.py | 14 | __all__ = ["DeleteQuery", "UpdateQuery", "InsertQuery", "AggregateQuery"] | CODE |
| LOW | django/db/models/sql/__init__.py | 6 | __all__ = ["Query", "AND", "OR", "XOR"] | CODE |
| 4 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/forms_tests/tests/test_forms.py | 447 | # that are not required. In this example, the data dictionary doesn't | COMMENT |
| HIGH | tests/forms_tests/tests/test_forms.py | 544 | # In this example, auto_id is False, but the "id" attribute for the | COMMENT |
| HIGH | tests/forms_tests/tests/test_forms.py | 2530 | # provided. In this example, we don't provide a value for 'username', | COMMENT |
| HIGH | tests/forms_tests/tests/test_forms.py | 2602 | # provided. In this example, we don't provide a value for 'username', | COMMENT |
| HIGH | tests/forms_tests/tests/test_forms.py | 2724 | # provided. In this example, we don't provide a value for 'username', | COMMENT |
| HIGH | tests/forms_tests/tests/test_forms.py | 3481 | # In this example, the data doesn't have a prefix, but the form | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/schema/fields.py | 20 | CODE | |
| LOW | scripts/pr_quality/tests/test_check_pr.py | 93 | CODE | |
| LOW | scripts/pr_quality/tests/test_check_pr.py | 151 | CODE | |
| LOW | django/forms/models.py | 141 | CODE | |
| LOW | django/forms/models.py | 589 | CODE | |
| LOW | django/forms/models.py | 1048 | CODE | |
| LOW | django/forms/models.py | 1315 | CODE | |
| LOW | django/forms/models.py | 348 | CODE | |
| LOW | django/forms/models.py | 1488 | CODE | |
| LOW | django/forms/fields.py | 98 | CODE | |
| LOW | django/forms/formsets.py | 534 | CODE | |
| LOW | django/forms/formsets.py | 81 | CODE | |
| LOW | django/forms/forms.py | 73 | CODE | |
| LOW | django/core/mail/message.py | 260 | CODE | |
| LOW | django/core/mail/message.py | 631 | CODE | |
| LOW | django/core/mail/backends/smtp.py | 23 | CODE | |
| LOW | django/test/runner.py | 763 | CODE | |
| LOW | django/template/engine.py | 20 | CODE | |
| LOW | django/utils/feedgenerator.py | 113 | CODE | |
| LOW | django/utils/feedgenerator.py | 165 | CODE | |
| LOW | django/contrib/auth/forms.py | 444 | CODE | |
| LOW | django/contrib/postgres/search.py | 323 | CODE | |
| LOW | django/contrib/contenttypes/forms.py | 77 | CODE | |
| LOW | django/contrib/gis/utils/ogrinspect.py | 130 | CODE | |
| LOW | django/http/response.py | 225 | CODE | |
| LOW | django/db/backends/postgresql/schema.py | 332 | CODE | |
| LOW | django/db/backends/base/schema.py | 1613 | CODE | |
| LOW | django/db/backends/base/schema.py | 2045 | CODE | |
| LOW | django/db/models/constraints.py | 277 | CODE | |
| LOW | django/db/models/fields/related.py | 1478 | CODE | |
| LOW | django/db/models/fields/__init__.py | 220 | CODE | |
| LOW | django/db/models/sql/query.py | 1499 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | django/contrib/gis/db/models/lookups.py | 93 | # ------------------ | COMMENT |
| MEDIUM | django/contrib/gis/db/models/lookups.py | 95 | # ------------------ | COMMENT |
| MEDIUM | django/contrib/gis/db/models/lookups.py | 222 | # ------------------ | COMMENT |
| MEDIUM | django/contrib/gis/db/models/lookups.py | 224 | # ------------------ | COMMENT |
| MEDIUM | django/db/backends/base/schema.py | 1077 | # ------------------------------------- | COMMENT |
| MEDIUM | django/db/backends/base/schema.py | 1279 | # ------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | django/utils/cache.py | 184 | # Step 1: Test the If-Match precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 188 | # Step 2: Test the If-Unmodified-Since precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 196 | # Step 3: Test the If-None-Match precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 203 | # Step 4: Test the If-Modified-Since precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 212 | # Step 5: Test the If-Range precondition (not supported). | COMMENT |
| LOW⚡ | django/utils/cache.py | 213 | # Step 6: Return original response since there isn't a conditional | COMMENT |
| LOW | django/http/request.py | 63 | # WARNING: The `WSGIRequest` subclass doesn't call `super`. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | django/utils/cache.py | 184 | # Step 1: Test the If-Match precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 188 | # Step 2: Test the If-Unmodified-Since precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 196 | # Step 3: Test the If-None-Match precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 203 | # Step 4: Test the If-Modified-Since precondition. | COMMENT |
| LOW⚡ | django/utils/cache.py | 212 | # Step 5: Test the If-Range precondition (not supported). | COMMENT |
| LOW⚡ | django/utils/cache.py | 213 | # Step 6: Return original response since there isn't a conditional | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/template_tests/test_callables.py | 69 | def my_method(self): | CODE |
| LOW | tests/template_tests/test_callables.py | 92 | def my_method(self): | CODE |
| LOW | tests/forms_tests/tests/test_forms.py | 5379 | def my_function(method, post_data): | CODE |
| LOW | tests/basic/tests.py | 444 | def do_something(self): | CODE |
| LOW | tests/sphinx_tests/testdata/package/module.py | 16 | def my_method(self): | CODE |
| LOW | tests/sphinx_tests/testdata/package/module.py | 24 | def my_function(self): | CODE |
| LOW⚡ | tests/admin_checks/tests.py | 750 | def my_function(obj): | CODE |
| LOW | tests/deprecation/test_warn_about_implementation.py | 20 | def test_function(self): | CODE |
| LOW | django/views/decorators/debug.py | 21 | def my_function(user): | STRING |
| LOW | django/views/decorators/debug.py | 30 | def my_function() | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_runner/test_parallel.py | 95 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/forms_tests/tests/test_forms.py | 1833 | # self.fields dictionary in __init__(). Don't forget to call | COMMENT |