ordynacje/ordynacja/models.py~
2018-06-16 11:22:13 +02:00

20 lines
531 B
Python

from __future__ import unicode_literals
from django.db import models
# Create your models here.
class Komitet(models.Model):
name = models.CharField(max_length=255)
kw_id = models.IntegerField(primary_key=True)
class Okreg(models.Model):
name = models.CharField(max_length=255)
o_id = models.IntegerField(primary_key=True)
class Glos(models.Model):
g_id = models.IntegerField(primary_key=True)
liczba = models.IntegerField()
komitet = models.ForeignKey(Komitet)
okreg = models.ForeignKey(Okreg, related_name="okregi")