Commit 3bb5e6bb authored by Robert's avatar Robert

Added subscriptions to admin

parent 38806b0f
Pipeline #1234 failed with stage
in 1 minute and 1 second
from django.contrib import admin
from . import models
class SubscriptionAdmin(admin.ModelAdmin):
search_fields = ['subscriber__user__username']
admin.site.register(models.Subscription, SubscriptionAdmin)
......@@ -16,3 +16,6 @@ class Subscription(models.Model):
# subscriber
subscriber = models.ForeignKey(
'gestalten.Gestalt', on_delete=models.CASCADE, related_name='subscriptions')
def __str__(self):
return '{} - {}'.format(self.subscribed_to, self.subscriber)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment