initial commit

This commit is contained in:
2022-02-04 14:40:16 -06:00
commit ac3b0eefaa
22 changed files with 721 additions and 0 deletions
View File
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
+6
View File
@@ -0,0 +1,6 @@
from django.apps import AppConfig
class LevelupapiConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'levelupapi'
View File
+1
View File
@@ -0,0 +1 @@
from .gamer import Gamer
View File
+12
View File
@@ -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)
+8
View File
@@ -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)
+3
View File
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
View File