Pynguins

djangosite

New model:
 from django.db import models
from django_enumfield import enum
from datetime import datetime
# Create your models here.
class GameDep(enum.Enum):
    GAME = 0
    DEP = 1
class OperatingSystems(models.Model):
    name = models.CharField(32)
    display_name = models.CharField(128)
class Architectures(models.Model):
    name = models.CharField(32)
    display_name = models.CharField(128)
class GameDepRevision(models.Model):
    page_id = models.IntegerField()
    file_id = models.IntegerField()
    version = models.DecimalField()
    created = models.DateTimeField(default=datetime.now)
    published = models.BooleanField()
class GameDepPage(models.Model):
    owner_id = models.IntegerField()
    gamedeptype = enum.EnumField(GameDep, default=GameDep.GAME)
    name = models.CharField(max_length=128)
    display_name = models.CharField(max_length=128)
    description = models.CharField(max_length=16384)
    created = models.DateTimeField(default=datetime.now)
class GameDepDependency(models.Model):
    page_id = models.ForeignKey(GameDepPage)
    rev_id = models.ForeignKey(GameDepRevision)

Comments | Gallery