Commit 999fe892 authored by Paul Angelo Sy's avatar Paul Angelo Sy

Assignment DB added

parent f92c412c
from django.contrib import admin from django.contrib import admin
# Register your models here. # Register your models here.
from .models import Assignment
admin.site.register(Assignment)
# Generated by Django 3.2.12 on 2022-03-18 01:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Assignment',
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(default=0)),
],
),
]
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class Assignment(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
...@@ -35,6 +35,7 @@ ALLOWED_HOSTS = [] ...@@ -35,6 +35,7 @@ ALLOWED_HOSTS = []
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
'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