mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-01-16 13:02:08 +01:00
Implement data integration tasks with Celery, including periodic fetching and manual refresh of chat data; add utility functions for data processing and transcript handling; create views and URLs for manual data refresh; establish Redis and Celery configuration; enhance error handling and logging; introduce scripts for data cleanup and fixing dashboard data; update documentation for Redis and Celery setup and troubleshooting.
This commit is contained in:
@ -7,6 +7,7 @@ from .forms import CustomUserChangeForm, CustomUserCreationForm
|
||||
from .models import Company, CustomUser
|
||||
|
||||
|
||||
@admin.register(CustomUser)
|
||||
class CustomUserAdmin(UserAdmin):
|
||||
add_form = CustomUserCreationForm
|
||||
form = CustomUserChangeForm
|
||||
@ -63,15 +64,11 @@ class CustomUserAdmin(UserAdmin):
|
||||
obj.save()
|
||||
|
||||
|
||||
@admin.register(Company)
|
||||
class CompanyAdmin(admin.ModelAdmin):
|
||||
list_display = ("name", "created_at", "get_employee_count")
|
||||
search_fields = ("name", "description")
|
||||
|
||||
@admin.display(description="Employees")
|
||||
def get_employee_count(self, obj):
|
||||
return obj.employees.count()
|
||||
|
||||
get_employee_count.short_description = "Employees"
|
||||
|
||||
|
||||
admin.site.register(CustomUser, CustomUserAdmin)
|
||||
admin.site.register(Company, CompanyAdmin)
|
||||
|
||||
Reference in New Issue
Block a user