Archived
saving final changes to ch. 2
This commit is contained in:
@@ -1 +1,4 @@
|
|||||||
from .gamer import Gamer
|
from .gamer import Gamer
|
||||||
|
from .events import Event
|
||||||
|
from .game import Game
|
||||||
|
from .game_type import Game_Type
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from django.db import models
|
||||||
|
from levelupapi.models.gamer import Gamer
|
||||||
|
from levelupapi.models.events import Event
|
||||||
|
class Event_Gamer(models.Model):
|
||||||
|
|
||||||
|
#Event won't change color for some reason. Reference this if something breaks later
|
||||||
|
gamer= models.ForeignKey(Gamer)
|
||||||
|
event = models.ForeignKey(Event)
|
||||||
|
|
||||||
@@ -3,10 +3,10 @@ from levelupapi.models.gamer import Gamer
|
|||||||
from models import Game
|
from models import Game
|
||||||
|
|
||||||
|
|
||||||
class Game(models.Model):
|
class Event(models.Model):
|
||||||
|
|
||||||
game= models.ForeignKey(Game)
|
game= models.ForeignKey(Game)
|
||||||
description = models.CharField(max_length=256)
|
description = models.CharField(max_length=256)
|
||||||
date = models.DateField()
|
date = models.DateField()
|
||||||
time = models.TimeField(_(""), auto_now=False, auto_now_add=False)
|
time = models.TimeField((""), auto_now=False, auto_now_add=False)
|
||||||
organizer = models.ForeignKey(Gamer)
|
organizer = models.ForeignKey(Gamer)
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
from django.db import models
|
||||||
from models import Gamer
|
from models import Gamer
|
||||||
|
from models import Game_Type
|
||||||
|
|
||||||
|
|
||||||
class Game(models.Model):
|
class Game(models.Model):
|
||||||
|
|
||||||
game_type = models.ForeignKey(game_type)
|
game_type = models.ForeignKey(Game_Type)
|
||||||
title = models.CharField(max_length=256)
|
title = models.CharField(max_length=256)
|
||||||
maker = models.CharField(max_length=256)
|
maker = models.CharField(max_length=256)
|
||||||
gamer = models.ForeignKey(Gamer)
|
gamer = models.ForeignKey(Gamer)
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
class Game_Type(models.Model):
|
||||||
|
|
||||||
|
label= models.CharField(max_length=50)
|
||||||
Reference in New Issue
Block a user