PyCharm Entwicklungsumgebung
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
499 B

from django.db import models
# Create your models here.
class Address(models.Model):
vorname = models.CharField(max_length=255)
nachname = models.CharField(max_length=255)
geburtstag = models.DateField()
street = models.CharField(max_length=255)
hausnummer = models.CharField(max_length=255)
postleitzahl = models.PositiveIntegerField()
def __str__(self):
return f'{self.vorname} {self.nachname} lives at {self.street} {self.hausnummer}, {self.postleitzahl}'