-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #355 from bughunter9/Mods
Resource Model Updated
- Loading branch information
Showing
6 changed files
with
138 additions
and
9 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
officialWebsite/resources/migrations/0003_auto_20201020_1805.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 3.1.1 on 2020-10-20 18:05 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("resources", "0002_auto_20201007_2250"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="resource", | ||
old_name="title", | ||
new_name="topic", | ||
), | ||
migrations.RenameField( | ||
model_name="resource", | ||
old_name="docs", | ||
new_name="url", | ||
), | ||
migrations.RemoveField( | ||
model_name="resource", | ||
name="description", | ||
), | ||
migrations.RemoveField( | ||
model_name="resource", | ||
name="headline_event", | ||
), | ||
migrations.RemoveField( | ||
model_name="resource", | ||
name="image", | ||
), | ||
migrations.RemoveField( | ||
model_name="resource", | ||
name="info", | ||
), | ||
migrations.RemoveField( | ||
model_name="resource", | ||
name="link", | ||
), | ||
] |
41 changes: 41 additions & 0 deletions
41
officialWebsite/resources/migrations/0004_auto_20201020_1902.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generated by Django 3.1.1 on 2020-10-20 19:02 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("resources", "0003_auto_20201020_1805"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Topic", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("topic", models.CharField(default="Human", max_length=255)), | ||
], | ||
), | ||
migrations.AlterField( | ||
model_name="resource", | ||
name="url", | ||
field=models.URLField(default="Human", max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name="resource", | ||
name="topic", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to="resources.topic" | ||
), | ||
), | ||
] |
26 changes: 26 additions & 0 deletions
26
officialWebsite/resources/migrations/0005_auto_20201020_1949.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.1.1 on 2020-10-20 19:49 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("events", "0007_auto_20200515_1214"), | ||
("resources", "0004_auto_20201020_1902"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="resource", | ||
name="topic", | ||
), | ||
migrations.AddField( | ||
model_name="resource", | ||
name="topic", | ||
field=models.ManyToManyField(blank=True, to="events.Topic"), | ||
), | ||
migrations.DeleteModel( | ||
name="Topic", | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
officialWebsite/resources/migrations/0006_auto_20201020_1954.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.1.1 on 2020-10-20 19:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("resources", "0005_auto_20201020_1949"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="resource", | ||
name="name", | ||
field=models.CharField(default="", max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name="resource", | ||
name="url", | ||
field=models.URLField(default=""), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
from django.db import models | ||
from officialWebsite.events.models import Topic | ||
|
||
|
||
class Resource(models.Model): | ||
name = models.CharField(max_length=255, blank=False, default="Human") | ||
title = models.CharField(max_length=255, default="Human") | ||
info = models.TextField(max_length=255, default="Human") | ||
description = models.TextField(max_length=255, default="Human") | ||
link = models.URLField(blank=True) | ||
docs = models.URLField(blank=True) | ||
headline_event = models.BooleanField(default=False) | ||
image = models.ImageField(upload_to="resource-images/", blank=True) | ||
name = models.CharField(max_length=255, blank=False, default="") | ||
url = models.URLField(blank=False, default="") | ||
topic = models.ManyToManyField(Topic, blank=True) | ||
|
||
def __str__(self): | ||
return self.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters