Skip to content

Commit

Permalink
models and admin working for basic information
Browse files Browse the repository at this point in the history
  • Loading branch information
altf4arnold committed Feb 12, 2024
1 parent c9d1d33 commit 3d1b04b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions tldtester/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
from django.contrib import admin
from .models import TLD

class tlds(admin.ModelAdmin):
list_display = ('tld', 'inet', 'dnssec', 'lastEdition')


admin.site.register(TLD, tlds)
# Register your models here.
6 changes: 3 additions & 3 deletions tldtester/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class TLD(models.Model):

)
tld = models.CharField(max_length=30)
dnssec = models.CharField(max_length=5, default=300, choices=DNSSECALGOS)
inet = models.CharField(max_length=1, default=0, choices=INET)
dnssec = models.IntegerField(default=300, choices=DNSSECALGOS)
inet = models.IntegerField(default=0, choices=INET)
lastEdition = models.DateTimeField(auto_now=True)

def __str__(self):
return self.TLD
return self.tld

class Meta:
indexes = [
Expand Down

0 comments on commit 3d1b04b

Please sign in to comment.