Commit 609a3863 authored by Joerell Frank Yee Lao's avatar Joerell Frank Yee Lao

Added database for the Assignment part of the code

parent 3c2097a3
from django.contrib import admin from django.contrib import admin
# Register your models here. # Register your models here.
from .models import Assignments
admin.site.register(Assignments)
# Generated by Django 3.2.12 on 2022-03-22 07:37
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Assignments',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('description', models.CharField(max_length=500)),
('max_points', models.IntegerField()),
],
),
]
# Generated by Django 3.2.12 on 2022-03-22 07:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assignments', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='assignments',
name='max_points',
field=models.IntegerField(default=0),
),
]
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class Assignments(models.Model):
name = models.CharField(max_length=50)
description = models.CharField(max_length=500)
max_points = models.IntegerField(default=0)
def __str__(self):
return self.name
...@@ -37,6 +37,7 @@ ALLOWED_HOSTS = [] ...@@ -37,6 +37,7 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [ INSTALLED_APPS = [
'announcements.apps.AnnouncementsConfig', 'announcements.apps.AnnouncementsConfig',
'forum.apps.ForumConfig', 'forum.apps.ForumConfig',
'assignments.apps.AssignmentsConfig',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment