mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-27 00:54:54 +00:00
Jira-13 sonar fixes
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
"""Account admin"""
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
"""Import django app"""
|
||||
from .models import UserProfile, UserEmailOtp, UserPhoneOtp
|
||||
# Register your models here.
|
||||
@admin.register(UserProfile)
|
||||
class UserProfileAdmin(admin.ModelAdmin):
|
||||
"""User profile admin"""
|
||||
list_display = ['user']
|
||||
|
||||
def __str__(self):
|
||||
@ -12,14 +14,18 @@ class UserProfileAdmin(admin.ModelAdmin):
|
||||
|
||||
@admin.register(UserEmailOtp)
|
||||
class UserEmailOtpAdmin(admin.ModelAdmin):
|
||||
"""User Email otp admin"""
|
||||
list_display = ['email']
|
||||
|
||||
def __str__(self):
|
||||
"""Return object in email and otp format"""
|
||||
return self.email + '-' + self.otp
|
||||
|
||||
@admin.register(UserPhoneOtp)
|
||||
class UserPhoneOtpAdmin(admin.ModelAdmin):
|
||||
"""User Phone otp admin"""
|
||||
list_display = ['phone']
|
||||
|
||||
def __str__(self):
|
||||
"""Return object in phone number and otp format"""
|
||||
return self.phone + '-' + self.otp
|
||||
|
||||
Reference in New Issue
Block a user