Skip to content

Commit

Permalink
Misc admin updates
Browse files Browse the repository at this point in the history
  • Loading branch information
edelgm6 committed Jul 25, 2024
1 parent d6724d8 commit 9380ee8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class PrefillAdmin(admin.ModelAdmin):
def description(self, obj):
return obj.name

class PaystubAdmin(admin.ModelAdmin):
list_display = ('title', 'journal_entry')

# Register your models here
admin.site.register(Prefill, PrefillAdmin)
Expand All @@ -84,5 +86,5 @@ def description(self, obj):
admin.site.register(PrefillItem)
admin.site.register(S3File)
admin.site.register(DocSearch)
admin.site.register(Paystub)
admin.site.register(Paystub, PaystubAdmin)
admin.site.register(PaystubValue)
6 changes: 6 additions & 0 deletions api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,9 @@ class JournalEntry(models.Model):
on_delete=models.CASCADE
)

class Meta:
verbose_name_plural = 'journal entries'

def __str__(self):
return str(self.pk) + ': ' + str(self.date) + ' ' + self.description

Expand Down Expand Up @@ -769,6 +772,9 @@ class DocSearch(models.Model):
]
selection = models.CharField(max_length=20, choices=STRING_CHOICES, null=True, blank=True)

class Meta:
verbose_name_plural = 'doc searches'

def __str__(self):
account_name = self.account.name if self.account is not None else None
selection_value = self.selection if self.selection is not None else ''
Expand Down

0 comments on commit 9380ee8

Please sign in to comment.