diff --git a/db.sqlite3 b/db.sqlite3 index e5ff86e..11574f7 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/markt/__pycache__/admin.cpython-38.pyc b/markt/__pycache__/admin.cpython-38.pyc index 518e713..6d88fe8 100644 Binary files a/markt/__pycache__/admin.cpython-38.pyc and b/markt/__pycache__/admin.cpython-38.pyc differ diff --git a/markt/__pycache__/models.cpython-38.pyc b/markt/__pycache__/models.cpython-38.pyc index bd6c83b..edb95cf 100644 Binary files a/markt/__pycache__/models.cpython-38.pyc and b/markt/__pycache__/models.cpython-38.pyc differ diff --git a/markt/admin.py b/markt/admin.py index 54d7d64..0e11896 100644 --- a/markt/admin.py +++ b/markt/admin.py @@ -1,9 +1,30 @@ from django.contrib import admin from .models import Factuur, Formaat, Houtmarkt, Houtsoort, Klant, Voorraad -admin.site.register(Factuur) -admin.site.register(Formaat) -admin.site.register(Houtsoort) -admin.site.register(Houtmarkt) -admin.site.register(Klant) -admin.site.register(Voorraad) +@admin.register(Factuur) +class FactuurAdmin(admin.ModelAdmin): + pass + +@admin.register(Formaat) +class FormaatAdmin(admin.ModelAdmin): + pass + + +@admin.register(Houtsoort) +class HoutsoortAdmin(admin.ModelAdmin): + pass + +@admin.register(Houtmarkt) +class HoutmarktAdmin(admin.ModelAdmin): + pass + +@admin.register(Klant) +class KlantAdmin(admin.ModelAdmin): + pass + + +@admin.register(Voorraad) +class VoorraadAdmin(admin.ModelAdmin): + pass + + diff --git a/markt/models.py b/markt/models.py index 2dfbdec..c61a309 100644 --- a/markt/models.py +++ b/markt/models.py @@ -63,7 +63,7 @@ class Voorraad(models.Model): def __str__(self): """String for representing the Model object.""" - return self.Voorraad_ID + return str(self.Voorraad_ID) class Klant(models.Model): @@ -100,3 +100,7 @@ class Factuur(models.Model): def __str__(self): """String for representing the Model object.""" return self.Factuur_ID + class Meta: + db_table = "talbename" + +