allow banning

This commit is contained in:
erichhasl
2017-11-19 02:06:54 +01:00
parent 5af9d0d748
commit 3a678016d1
5 changed files with 42 additions and 0 deletions
+6
View File
@@ -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)
+8
View File
@@ -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'