allow banning
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
from django.contrib import admin
|
||||
from .models import Banned
|
||||
|
||||
|
||||
class BanAdmin(admin.ModelAdmin):
|
||||
list_display = ('ip_address', 'reason')
|
||||
|
||||
# Register your models here.
|
||||
admin.site.register(Banned, BanAdmin)
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
# Create your models here.
|
||||
class Banned(models.Model):
|
||||
ip_address = models.CharField('IP Adresse', max_length=50)
|
||||
reason = models.TextField('Grund')
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'Verbannte'
|
||||
verbose_name_plural = 'Verbannte'
|
||||
|
||||
Reference in New Issue
Block a user