Commit 38732a97 authored by Rau Layug's avatar Rau Layug

Merged layug/calendar with master branch

parents c9687cbf 73531f72
......@@ -13,3 +13,5 @@
- Forum
## LAB 1 VIDEO: https://drive.google.com/file/d/1IESyuTnQGhbF3c3UP2WHlXNMC6RFL1lj/view?usp=sharing
## LAB 2 VIDEO: https://drive.google.com/file/d/1uB5Y54m3DJp9ZdVcoNpoH4JZ0NsMHRZ1/view?usp=sharing
from django.contrib import admin
# Register your models here.
from .models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
model = Assignment
list_display = ('name', 'description', 'max_points')
admin.site.register(Assignment, AssignmentAdmin)
# Generated by Django 4.0.3 on 2022-03-22 14:13
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()),
],
),
]
from django.db import models
# Create your models here.
class Assignment(models.Model):
name = models.CharField(max_length=50)
description = models.CharField(max_length=500)
max_points = models.IntegerField()
def __str__(self):
return self.name
from django.contrib import admin
# Register your models here.
from .models import Post
class PostAdmin(admin.ModelAdmin):
model = Post
list_display = ('post_title', 'post_body', 'pub_date')
admin.site.register(Post, PostAdmin)
\ No newline at end of file
# Generated by Django 4.0.3 on 2022-03-19 17:29
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Post',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('post_title', models.CharField(max_length=150)),
('post_body', models.TextField()),
('pub_date', models.DateField(auto_now=True)),
],
),
]
from django.db import models
# Create your models here.
class Post(models.Model):
post_title = models.CharField(max_length=150)
post_body = models.TextField()
pub_date = models.DateField(auto_now=True)
def __str__(self):
return '"{}" published {}'.format(self.post_title, self.pub_date)
\ 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