-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#A19. As Admin, I would like to change which hackathons are included …
…in the showcase and be able to select a specific order (#182)
- Loading branch information
1 parent
22ce717
commit 419fe03
Showing
9 changed files
with
118 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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,6 +1,7 @@ | ||
from django.contrib import admin | ||
|
||
from .models import Showcase | ||
from .models import Showcase, ShowcaseSiteSettings | ||
|
||
|
||
admin.site.register(Showcase) | ||
admin.site.register(ShowcaseSiteSettings) |
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,13 @@ | ||
[ | ||
{ | ||
"model": "showcase.showcasesitesettings", | ||
"pk": 1, | ||
"fields": { | ||
"order_by_category": "-created", | ||
"spotlight_number": 5, | ||
"projects_per_page": 5, | ||
"hackathons": [], | ||
"featured_hackathons": [] | ||
} | ||
} | ||
] |
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,9 @@ | ||
ORDER_BY_CATEGORY_CHOICES = [ | ||
('?', 'Random Order'), | ||
('-created', 'Showcase Created Date in Descending Order'), | ||
('created', 'Showcase Created Date in Ascending Order'), | ||
('-updated', 'Showcase Updated Date in Descending Order'), | ||
('updated', 'Showcase Updated Date in Ascending Order'), | ||
('-display_name', 'Alphabetical by Project Name in Descending Order'), | ||
('display_name', 'Alphabetical by Project Name in Ascending Order'), | ||
] |
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,29 @@ | ||
# Generated by Django 3.1.8 on 2021-05-12 14:32 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('hackathon', '0042_hackteam_communication_channel'), | ||
('showcase', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ShowcaseSiteSettings', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('order_by_category', models.CharField(choices=[('?', 'Random Order'), ('-created', 'Showcase Created Date in Descending Order'), ('created', 'Showcase Created Date in Ascending Order'), ('-updated', 'Showcase Updated Date in Descending Order'), ('updated', 'Showcase Updated Date in Ascending Order'), ('-display_name', 'Alphabetical by Project Name in Descending Order'), ('display_name', 'Alphabetical by Project Name in Ascending Order')], default='random', max_length=255)), | ||
('spotlight_number', models.IntegerField(default=5)), | ||
('projects_per_page', models.IntegerField(default=5)), | ||
('featured_hackathons', models.ManyToManyField(related_name='showcase_featured_hackathons', to='hackathon.Hackathon')), | ||
('hackathons', models.ManyToManyField(related_name='showcase_hackathons', to='hackathon.Hackathon')), | ||
], | ||
options={ | ||
'verbose_name': 'Project Showcase Site Settings', | ||
'verbose_name_plural': 'Project Showcase Site Settings', | ||
}, | ||
), | ||
] |
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
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