-
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.
- Loading branch information
Merlin Buczek
committed
May 28, 2019
1 parent
1706e9a
commit 9975f22
Showing
14 changed files
with
179 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 2.2.1 on 2019-05-28 14:00 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('base', '0006_contacts_position'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='wikipage', | ||
name='date', | ||
), | ||
] |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 2.2.1 on 2019-05-28 14:00 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0003_auto_20190525_1616'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='newsentry', | ||
name='date', | ||
field=models.DateField(auto_now_add=True, default=datetime.date(2019, 5, 28), verbose_name='Post date'), | ||
preserve_default=False, | ||
), | ||
] |
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 @@ | ||
from django.apps import apps | ||
from django.db import models | ||
|
||
|
||
class NewsMixin(models.Model): | ||
|
||
@property | ||
def news(self): | ||
news_page = apps.get_model('news', 'NewsPage') | ||
return self.get_children().type(news_page) | ||
|
||
class Meta: # noqa | ||
abstract = 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
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% load i18n %} | ||
{% load wagtailcore_tags %} | ||
|
||
{% for news_page in news %} | ||
{% with news_page.get_children.live as news_entries %} | ||
{% if news_entries %} | ||
<h4>{{ news_page.title }}</h4> | ||
<ul class="menu-list"> | ||
{% for child in news_entries|slice:3 %} | ||
<li> | ||
<a class="menu-item event-button" href="{% pageurl child %}">{{ child.title }} | ||
<time datetime="{{ child.specific.date }}">{{ child.specific.date }}</time> | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<a href="{% pageurl news_page %}">{% trans 'See all' %}<i class="fas fa-chevron-right"></i></a> | ||
{% endif %} | ||
{% endwith %} | ||
{% endfor %} |
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
Oops, something went wrong.