20 lines
508 B
Python
20 lines
508 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)
|