Added countries app with get views (filter view and get by alpha2 view)

This commit is contained in:
ITQ
2024-02-27 21:56:49 +03:00
parent 607f6de88c
commit a2253a12c5
14 changed files with 108 additions and 16 deletions
+11
View File
@@ -0,0 +1,11 @@
from django.db import models
class Country(models.Model):
name = models.CharField(max_length=100)
alpha2 = models.CharField(max_length=2)
alpha3 = models.CharField(max_length=3)
region = models.CharField()
def __str__(self):
return self.name