-
Notifications
You must be signed in to change notification settings - Fork 0
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 #23 from hotosm/feat/ind-program-page
Feat/ind program page
- Loading branch information
Showing
37 changed files
with
650 additions
and
11 deletions.
There are no files selected for viewing
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class CoreConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'app.core' |
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,28 @@ | ||
# Generated by Django 4.2.7 on 2024-05-15 21:39 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('wagtailimages', '0025_alter_image_file_alter_rendition_file'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Partner', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('partner_name', models.CharField()), | ||
('partner_url', models.URLField()), | ||
('partner_logo', models.ForeignKey(blank=True, help_text='Partner logo', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Partners', | ||
}, | ||
), | ||
] |
25 changes: 25 additions & 0 deletions
25
app/core/migrations/0002_alter_partner_partner_logo_alter_partner_partner_url.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,25 @@ | ||
# Generated by Django 4.2.7 on 2024-05-15 21:50 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wagtailimages', '0025_alter_image_file_alter_rendition_file'), | ||
('core', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='partner', | ||
name='partner_logo', | ||
field=models.ForeignKey(help_text='Partner logo', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image'), | ||
), | ||
migrations.AlterField( | ||
model_name='partner', | ||
name='partner_url', | ||
field=models.URLField(blank=True), | ||
), | ||
] |
Empty file.
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 @@ | ||
from django.db import models | ||
|
||
from wagtail.snippets.models import register_snippet | ||
from wagtail.admin.panels import FieldPanel, MultiFieldPanel, InlinePanel | ||
|
||
|
||
@register_snippet | ||
class Partner(models.Model): | ||
partner_name = models.CharField() | ||
partner_logo = models.ForeignKey( | ||
"wagtailimages.Image", | ||
null=True, | ||
on_delete=models.SET_NULL, | ||
related_name="+", | ||
help_text="Partner logo" | ||
) | ||
partner_url = models.URLField(blank=True) | ||
|
||
panels = [ | ||
FieldPanel("partner_name"), | ||
FieldPanel("partner_logo"), | ||
FieldPanel("partner_url"), | ||
] | ||
|
||
def __str__(self): | ||
return self.partner_name | ||
|
||
class Meta: | ||
verbose_name_plural = "Partners" |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,3 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
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
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ProgramsConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'app.programs' |
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,42 @@ | ||
# Generated by Django 4.2.7 on 2024-05-15 16:06 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import wagtail.blocks | ||
import wagtail.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('wagtailimages', '0025_alter_image_file_alter_rendition_file'), | ||
('wagtailcore', '0089_log_entry_data_json_null_to_object'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='IndividualProgramPage', | ||
fields=[ | ||
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')), | ||
('subtitle', wagtail.fields.RichTextField(blank=True)), | ||
('intro', wagtail.fields.RichTextField(blank=True)), | ||
('description', wagtail.fields.RichTextField(blank=True)), | ||
('stats_title', models.CharField(default='Stats')), | ||
('stats', wagtail.fields.StreamField([('stat_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock())]))], blank=True, null=True, use_json_field=True)), | ||
('goals_title', models.CharField(default='Goals')), | ||
('goals', wagtail.fields.StreamField([('goal_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock()), ('icon', wagtail.images.blocks.ImageChooserBlock())]))], blank=True, null=True, use_json_field=True)), | ||
('projects_title', models.CharField(default='Projects')), | ||
('partners_title', models.CharField(default='Meet Our Partners')), | ||
('more_programs_title', models.CharField(default='More Programs')), | ||
('header_image', models.ForeignKey(blank=True, help_text='Header image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), | ||
('intro_image', models.ForeignKey(blank=True, help_text='Intro image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=('wagtailcore.page',), | ||
), | ||
] |
20 changes: 20 additions & 0 deletions
20
app/programs/migrations/0002_individualprogrampage_partners.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,20 @@ | ||
# Generated by Django 4.2.7 on 2024-05-15 21:46 | ||
|
||
from django.db import migrations | ||
import modelcluster.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0001_initial'), | ||
('programs', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='partners', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='core.partner'), | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
app/programs/migrations/0003_individualprogrampage_view_all_partners_title_and_more.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 4.2.7 on 2024-05-15 23:29 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('programs', '0002_individualprogrampage_partners'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='view_all_partners_title', | ||
field=models.CharField(default='View All Partners'), | ||
), | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='view_all_programs_title', | ||
field=models.CharField(default='View All Programs'), | ||
), | ||
] |
30 changes: 30 additions & 0 deletions
30
app/programs/migrations/0004_individualprogrampage_more_programs_and_more.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,30 @@ | ||
# Generated by Django 4.2.7 on 2024-05-15 23:33 | ||
|
||
from django.db import migrations, models | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('programs', '0003_individualprogrampage_view_all_partners_title_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='more_programs', | ||
field=wagtail.fields.StreamField([('program_page', wagtail.blocks.PageChooserBlock(page_type=['programs.IndividualProgramPage']))], blank=True, null=True, use_json_field=True), | ||
), | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='view_all_partners_link', | ||
field=models.CharField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='view_all_programs_link', | ||
field=models.URLField(blank=True), | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
app/programs/migrations/0005_individualprogrampage_bottom_banner_text_and_more.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,28 @@ | ||
# Generated by Django 4.2.7 on 2024-05-21 16:33 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('programs', '0004_individualprogrampage_more_programs_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='bottom_banner_text', | ||
field=models.CharField(default='Check out the many opportunities to get involved with HOT!'), | ||
), | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='bottom_banner_url', | ||
field=models.URLField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='individualprogrampage', | ||
name='bottom_banner_url_text', | ||
field=models.CharField(default='Get Involved with HOT'), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
app/programs/migrations/0006_alter_individualprogrampage_bottom_banner_text.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,18 @@ | ||
# Generated by Django 4.2.7 on 2024-05-21 16:47 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('programs', '0005_individualprogrampage_bottom_banner_text_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='individualprogrampage', | ||
name='bottom_banner_text', | ||
field=models.CharField(default='Check out many opportunities to get involved with HOT!'), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
app/programs/migrations/0007_alter_individualprogrampage_bottom_banner_text.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,18 @@ | ||
# Generated by Django 4.2.7 on 2024-05-21 17:04 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('programs', '0006_alter_individualprogrampage_bottom_banner_text'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='individualprogrampage', | ||
name='bottom_banner_text', | ||
field=models.CharField(default='Check out the many opportunities to get involved with HOT!'), | ||
), | ||
] |
Empty file.
Oops, something went wrong.