Added the sacamos assignments model for the application. Fixed the admin panel...

Added the sacamos assignments model for the application. Fixed the admin panel and put instances of the assignment class. Fixed up the settings.py file in the inner project file due to having some issues with missing text.
parent a01a035a
...@@ -4,5 +4,8 @@ Matthew Ernest Quinto - Task - 1. Homepage ...@@ -4,5 +4,8 @@ Matthew Ernest Quinto - Task - 1. Homepage
Jose Leonardo J. Sacamos III - Task - 4. Assignments Jose Leonardo J. Sacamos III - Task - 4. Assignments
Chino Gabriel G. Tesoro - Task - 3. Forum Chino Gabriel G. Tesoro - Task - 3. Forum
video recording gdrive link: video recording for lab 1 gdrive link:
https://drive.google.com/file/d/1F8wbgIkqHdViTimrYNjz7lq86sdEkUq0/view?usp=sharing https://drive.google.com/file/d/1F8wbgIkqHdViTimrYNjz7lq86sdEkUq0/view?usp=sharing
video recording for lab 2 gdrive link:
https://drive.google.com/file/d/19WFX2HvuLKxuqEV0cH4MFrtVE8jm9sGg/view?usp=sharing
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)
\ No newline at end of file
# Generated by Django 4.0.3 on 2022-03-23 13:47
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=100)),
('description', models.CharField(max_length=1000)),
('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=100)
description = models.CharField(max_length=1000)
max_points = models.IntegerField(default=0)
def __str__(self):
return self.name
\ No newline at end of file
...@@ -5,4 +5,6 @@ class Post (models.Model): ...@@ -5,4 +5,6 @@ class Post (models.Model):
post_title = models.CharField(max_length=99999) post_title = models.CharField(max_length=99999)
post_body = models.CharField(max_length=99999) post_body = models.CharField(max_length=99999)
pub_date = models.DateTimeField("date published") pub_date = models.DateTimeField("date published")
def __str__(self):
return self.post_title
\ No newline at end of file
...@@ -44,8 +44,8 @@ INSTALLED_APPS = [ ...@@ -44,8 +44,8 @@ INSTALLED_APPS = [
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'homepage.apps.HomepageConfig', 'homepage.apps.HomepageConfig',
'forum.apps.ForumConfig', 'forum.apps.ForumConfig',
'assignments', 'assignments.apps.AssignmentsConfig',
'announcements', 'announcements.apps.AnnouncementsConfig',
] ]
MIDDLEWARE = [ 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