mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add more docstrings
This commit is contained in:
parent
a7959fddf2
commit
71937a180c
@ -1,3 +1,5 @@
|
||||
"""Admin for the common app."""
|
||||
|
||||
from django.contrib import admin
|
||||
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
@ -6,6 +8,7 @@ import common.models
|
||||
|
||||
|
||||
class SettingsAdmin(ImportExportModelAdmin):
|
||||
"""Admin settings for InvenTreeSetting."""
|
||||
|
||||
list_display = ('key', 'value')
|
||||
|
||||
@ -18,6 +21,7 @@ class SettingsAdmin(ImportExportModelAdmin):
|
||||
|
||||
|
||||
class UserSettingsAdmin(ImportExportModelAdmin):
|
||||
"""Admin settings for InvenTreeUserSetting."""
|
||||
|
||||
list_display = ('key', 'value', 'user', )
|
||||
|
||||
@ -30,16 +34,19 @@ class UserSettingsAdmin(ImportExportModelAdmin):
|
||||
|
||||
|
||||
class WebhookAdmin(ImportExportModelAdmin):
|
||||
"""Admin settings for Webhook."""
|
||||
|
||||
list_display = ('endpoint_id', 'name', 'active', 'user')
|
||||
|
||||
|
||||
class NotificationEntryAdmin(admin.ModelAdmin):
|
||||
"""Admin settings for NotificationEntry."""
|
||||
|
||||
list_display = ('key', 'uid', 'updated', )
|
||||
|
||||
|
||||
class NotificationMessageAdmin(admin.ModelAdmin):
|
||||
"""Admin settings for NotificationMessage."""
|
||||
|
||||
list_display = ('age_human', 'user', 'category', 'name', 'read', 'target_object', 'source_object', )
|
||||
|
||||
|
@ -161,6 +161,7 @@ class FileManager:
|
||||
return headers
|
||||
|
||||
def col_count(self):
|
||||
"""Return the number of columns in the file."""
|
||||
if self.data is None:
|
||||
return 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user