Showing 11 of 11 total issues
Identical blocks of code found in 2 locations. Consider refactoring. Open
(function() { 'use strict'; var windowRef = window;
- Read upRead up
Identical blocks of code found in 2 locations. Consider refactoring. Open
(function() { 'use strict'; var windowRef = window;
- Read upRead up
File models.py
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
from colorfield.fields import ColorFieldfrom django.core.validators import FileExtensionValidatorfrom django.db import modelsfrom django.db.models.signals import post_delete, post_save, pre_savefrom django.dispatch import receiver
Function presentRelatedObjectModal
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function presentRelatedObjectModal(e) { const linkEl = $(this); const href = (linkEl.attr('href') || ''); if (href === '') {
Function onload
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.onload = function() { for (let moduleEl of document.querySelectorAll('.admin-interface.foldable-apps [class^="app-"].module')) { // apply collapsed value from localstorage value let moduleAppClass = null; let moduleCollapsedClass = 'collapsed';
Function check_installed_app
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def check_installed_app(app, max_dj_version=None): dj_version = django.VERSION installed_apps = settings.INSTALLED_APPS if max_dj_version is None: if app not in installed_apps:
- Read upRead up
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return context
Function admin_interface_date_hierarchy_removal_link
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def admin_interface_date_hierarchy_removal_link(changelist, date_field_name): date_field_path = get_fields_from_path(changelist.model, date_field_name) # date_field = date_field_path[-1] date_labels = [str(field.verbose_name) for field in date_field_path] date_label = " ".join(date_labels).lower()
- Read upRead up
Function admin_interface_language_chooser
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def admin_interface_language_chooser(context): if not settings.USE_I18N: # i18n disabled return None if len(settings.LANGUAGES) < 2:
- Read upRead up
Function get_active
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_active(self): objs_active_qs = self.filter(active=True) objs_active_ls = list(objs_active_qs) objs_active_count = len(objs_active_ls)
- Read upRead up