# Path: bot/channels/models.py
# class Channel(models.Model):
#     discord_id = models.BigIntegerField(unique=True)
#     name = models.CharField(_('name'), max_length=50)
# 
#     allow_nsfw = models.BooleanField(default=False)
# 
#     objects = ChannelQuerySet.as_manager()
# 
#     def __str__(self):
#         return self.name


from django.contrib import admin
from .models import Channel



@admin.register(Channel)
class ChannelAdmin(admin.ModelAdmin):
    list_display = ('name', 'allow_nsfw')
    list_filter = ('allow_nsfw',)

# Path: bot/channels/models.py
# class Channel(models.Model):
#     discord_id = models.BigIntegerField(unique=True)
#     name = models.CharField(_('name'), max_length=50)
# 
#     allow_nsfw = models.BooleanField(default=False)
# 
#     objects = ChannelQuerySet.as_manager()
# 
#     def __str__(self):
#         return self.name


# Path: bot/channels/admin.py
from django.contrib import admin
from .models import Channel




@admin.register(Channel)
class ChannelAdmin(admin.ModelAdmin):
    list_display = ('name', 'allow_nsfw')
    list_filter = ('allow_nsfw',)

    search_fields = ('name',)