Skip to content

Commit

Permalink
feat: easily create review schedulers
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi-De committed Nov 10, 2023
1 parent 776f6a5 commit a76866f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions leerming/profiles/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
from .models import Profile


@admin.action(description="Register selected profiles for next review")
def register_for_next_review(modeladmin, request, queryset):
for profile in queryset:
profile.register_for_next_review()


@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
list_display = (
Expand All @@ -23,3 +29,4 @@ class ProfileAdmin(admin.ModelAdmin):
"user",
"email_notifications_enabled",
)
actions = [register_for_next_review]

0 comments on commit a76866f

Please sign in to comment.