18 lines
455 B
Python
18 lines
455 B
Python
from django.contrib import admin
|
|
|
|
|
|
from users.models import UserSettings
|
|
|
|
|
|
@admin.action(description="Remove the key from the users")
|
|
def remove_key(modeladmin, request, queryset):
|
|
# FIX: This is only for debugging first, this should *never* be used in production
|
|
queryset.update(public_key=None, private_key=None)
|
|
|
|
|
|
@admin.register(UserSettings)
|
|
class UserSettingsAdmin(admin.ModelAdmin):
|
|
list_display = ("user",)
|
|
|
|
actions = [remove_key]
|