jira-15 top leadership API

This commit is contained in:
jain
2023-07-09 19:13:05 +05:30
parent 3723e46be1
commit 1b60d4344e
5 changed files with 65 additions and 42 deletions

View File

@ -2,7 +2,7 @@
"""Third party Django app"""
from django.contrib import admin
"""Import Django app"""
from .models import Junior
from .models import Junior, JuniorPoints
# Register your models here.
@admin.register(Junior)
class JuniorAdmin(admin.ModelAdmin):
@ -12,3 +12,12 @@ class JuniorAdmin(admin.ModelAdmin):
def __str__(self):
"""Return email id"""
return self.auth__email
@admin.register(JuniorPoints)
class JuniorPointsAdmin(admin.ModelAdmin):
"""Junior Points Admin"""
list_display = ['junior', 'total_task_points']
def __str__(self):
"""Return email id"""
return self.junior.auth.email