Commit 37818654 authored by Star Neptune R. Sy's avatar Star Neptune R. Sy

models.py has appropriate fields for each data

parent 350938e0
from django.db import models
# Create your models here.
class Course(models.Model):
course_code = models.CharField(unique=True, default="")
course_title = models.CharField(unique=True, default="")
class Assignment(models.Model):
assignment_name = models.CharField(unique=True, default="")
description = models.TextField(default="")
perfect_score = models.IntegerField()
passing_score = models.IntegerField()
section = models.CharField(unique=True)
course = models.ForeignKey(
Course,
on_delete=models.CASCADE,
related_name='subject'
)
from django.urls import path
from .views import index
urlpatterns = [
path('', index, name='index'),
]
app_name = "assignments"
\ No newline at end of file
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