Commit 880f1bff authored by Joan Denise Nocos's avatar Joan Denise Nocos

feat: migrated Assignment model; registered Assignment model to Django Admin

parent 3082d847
from django.contrib import admin
# Register your models here.
from .models import Assignment
admin.site.register(Assignment)
\ No newline at end of file
# Generated by Django 3.2.12 on 2022-03-22 23:38
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)),
],
),
]
......@@ -3,5 +3,8 @@ from django.db import models
# Create your models here.
class Assignment(models.Model):
name = models.CharField(max_length=50)
description
max_points
\ No newline at end of file
description = models.CharField(max_length=500)
max_points = models.IntegerField(default=0)
def _str_(self):
return self.name
\ No newline at end of file
......@@ -36,6 +36,7 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [
'announcements.apps.AnnouncementsConfig',
'assignments.apps.AssignmentsConfig',
'forum.apps.ForumConfig',
'homepage.apps.HomepageConfig',
'django.contrib.admin',
......
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