djbrown/hbscorez

View on GitHub
src/clubs/admin.py

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%
Similar blocks of code found in 2 locations. Consider refactoring.
from django.contrib import admin
Similar blocks of code found in 2 locations. Consider refactoring.
 
Similar blocks of code found in 2 locations. Consider refactoring.
from associations.admin import ASSOCIATION_SEARCH_FIELDS
Similar blocks of code found in 2 locations. Consider refactoring.
from clubs.models import Club
Similar blocks of code found in 2 locations. Consider refactoring.
 
Similar blocks of code found in 2 locations. Consider refactoring.
CLUB_SEARCH_FIELDS = ["name", "bhv_id"] + ["association__" + field for field in ASSOCIATION_SEARCH_FIELDS]
Similar blocks of code found in 2 locations. Consider refactoring.
 
Similar blocks of code found in 2 locations. Consider refactoring.
 
Similar blocks of code found in 2 locations. Consider refactoring.
@admin.register(Club)
Similar blocks of code found in 2 locations. Consider refactoring.
class ClubAdmin(admin.ModelAdmin):
Similar blocks of code found in 2 locations. Consider refactoring.
search_fields = CLUB_SEARCH_FIELDS