-
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 #22 from hotosm/feat/project-pages
individual project and individual news pages mostly complete
- Loading branch information
Showing
63 changed files
with
1,400 additions
and
81 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 NewsConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'app.news' |
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,32 @@ | ||
# Generated by Django 4.2.7 on 2024-05-13 16:49 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
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='IndividualNewsPage', | ||
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')), | ||
('intro', wagtail.fields.RichTextField(blank=True)), | ||
('description', wagtail.fields.StreamField([('text_block', wagtail.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'link', 'ol', 'ul', 'hr', 'link', 'document-link', 'image', 'embed', 'code', 'blockquote']))], null=True, use_json_field=True)), | ||
('image', models.ForeignKey(blank=True, help_text='Cover 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/news/migrations/0002_alter_individualnewspage_description.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-13 16:53 | ||
|
||
from django.db import migrations | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='individualnewspage', | ||
name='description', | ||
field=wagtail.fields.StreamField([('text_block', wagtail.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'link', 'ol', 'ul', 'hr', 'link', 'document-link', 'image', 'embed', 'code', 'blockquote']))], blank=True, null=True, use_json_field=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
app/news/migrations/0003_rename_description_individualnewspage_article_body.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-13 16:59 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0002_alter_individualnewspage_description'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='individualnewspage', | ||
old_name='description', | ||
new_name='article_body', | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
app/news/migrations/0004_individualnewspage_related_news_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,28 @@ | ||
# Generated by Django 4.2.7 on 2024-05-13 17:22 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0003_rename_description_individualnewspage_article_body'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='related_news_title', | ||
field=models.CharField(default='Related News'), | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='related_projects_title', | ||
field=models.CharField(default='Related Projects'), | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='view_all_news_text', | ||
field=models.CharField(default='View all News'), | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
app/news/migrations/0005_individualnewspage_categories_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-13 18:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0004_individualnewspage_related_news_title_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='categories_title', | ||
field=models.CharField(default='Categories'), | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='tags_title', | ||
field=models.CharField(default='Tags'), | ||
), | ||
] |
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-13 19:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0005_individualnewspage_categories_title_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='NewsCategory', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('category_name', models.CharField()), | ||
], | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
app/news/migrations/0007_alter_newscategory_options_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-13 19:15 | ||
|
||
from django.db import migrations | ||
import modelcluster.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0006_newscategory'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='newscategory', | ||
options={'verbose_name_plural': 'News Categories'}, | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='categories', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='news.newscategory'), | ||
), | ||
] |
20 changes: 20 additions & 0 deletions
20
app/news/migrations/0008_individualnewspage_related_projects.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-13 19:52 | ||
|
||
from django.db import migrations | ||
import modelcluster.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('projects', '0007_rename_call_to_action_link_individualprojectpage_call_to_action_link_text_and_more'), | ||
('news', '0007_alter_newscategory_options_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='related_projects', | ||
field=modelcluster.fields.ParentalManyToManyField(to='projects.individualprojectpage'), | ||
), | ||
] |
25 changes: 25 additions & 0 deletions
25
app/news/migrations/0009_individualnewspage_related_news_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,25 @@ | ||
# Generated by Django 4.2.7 on 2024-05-13 21:21 | ||
|
||
from django.db import migrations | ||
import modelcluster.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('projects', '0007_rename_call_to_action_link_individualprojectpage_call_to_action_link_text_and_more'), | ||
('news', '0008_individualnewspage_related_projects'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='related_news', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='news.individualnewspage'), | ||
), | ||
migrations.AlterField( | ||
model_name='individualnewspage', | ||
name='related_projects', | ||
field=modelcluster.fields.ParentalManyToManyField(blank=True, to='projects.individualprojectpage'), | ||
), | ||
] |
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-13 21:51 | ||
|
||
from django.db import migrations | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0009_individualnewspage_related_news_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='test_thing', | ||
field=wagtail.fields.StreamField([('project_page', wagtail.blocks.PageChooserBlock(page_type=['projects.IndividualProjectPage']))], blank=True, null=True, use_json_field=True), | ||
), | ||
] |
37 changes: 37 additions & 0 deletions
37
app/news/migrations/0011_remove_individualnewspage_test_thing_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,37 @@ | ||
# Generated by Django 4.2.7 on 2024-05-13 21:57 | ||
|
||
from django.db import migrations | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0010_individualnewspage_test_thing'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='individualnewspage', | ||
name='test_thing', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualnewspage', | ||
name='related_news', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualnewspage', | ||
name='related_projects', | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='related_news', | ||
field=wagtail.fields.StreamField([('news_page', wagtail.blocks.PageChooserBlock(page_type=['news.IndividualNewsPage']))], blank=True, null=True, use_json_field=True), | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='related_projects', | ||
field=wagtail.fields.StreamField([('project_page', wagtail.blocks.PageChooserBlock(page_type=['projects.IndividualProjectPage']))], blank=True, null=True, use_json_field=True), | ||
), | ||
] |
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-13 22:55 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0011_remove_individualnewspage_test_thing_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='date', | ||
field=models.DateField(default=django.utils.timezone.now, verbose_name='Post date'), | ||
preserve_default=False, | ||
), | ||
] |
33 changes: 33 additions & 0 deletions
33
app/news/migrations/0013_newstag_individualnewspage_tags.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,33 @@ | ||
# Generated by Django 4.2.7 on 2024-05-14 16:44 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import modelcluster.contrib.taggit | ||
import modelcluster.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('taggit', '0005_auto_20220424_2025'), | ||
('news', '0012_individualnewspage_date'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='NewsTag', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('content_object', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagged_items', to='news.individualnewspage')), | ||
('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_items', to='taggit.tag')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='individualnewspage', | ||
name='tags', | ||
field=modelcluster.contrib.taggit.ClusterTaggableManager(blank=True, help_text='A comma-separated list of tags.', through='news.NewsTag', to='taggit.Tag', verbose_name='Tags'), | ||
), | ||
] |
Empty file.
Oops, something went wrong.