Create Assignment model in Assignments app

parent 72966f06
from django.contrib import admin
# Register your models here.
from .models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
model = Assignment
admin.site.register(Assignment, AssignmentAdmin)
# Generated by Django 4.0.3 on 2022-03-17 04:18
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=10)),
('description', models.CharField(max_length=50)),
('max_points', models.IntegerField(default=0)),
],
),
]
from django.db import models
# Create your models here.
class Assignment(models.Model):
name = models.CharField(max_length = 10)
description = models.CharField(max_length = 50)
max_points = models.IntegerField(default = 0)
......@@ -43,7 +43,7 @@ INSTALLED_APPS = [
'homepage',
'announcements',
'forum',
'assignments',
'assignments.apps.AssignmentsConfig',
]
MIDDLEWARE = [
......
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