Archived
initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class LevelupapiConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'levelupapi'
|
||||
@@ -0,0 +1 @@
|
||||
from .gamer import Gamer
|
||||
@@ -0,0 +1,12 @@
|
||||
from django.db import models
|
||||
from models import Gamer
|
||||
|
||||
|
||||
class Game(models.Model):
|
||||
|
||||
game_type = models.ForeignKey(game_type)
|
||||
title = models.CharField(max_length=256)
|
||||
maker = models.CharField(max_length=256)
|
||||
gamer = models.ForeignKey(Gamer)
|
||||
number_of_players = models.IntegerField(max_value = 1, max_value = 128)
|
||||
skill_level = models.IntegerField(max_value = 1, max_value = 100)
|
||||
@@ -0,0 +1,8 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
class Gamer(models.Model):
|
||||
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
bio = models.CharField(max_length=50)
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
Reference in New Issue
Block a user