From a42f13ec053643a42ec7bf31cff2eca70cbeea32 Mon Sep 17 00:00:00 2001 From: Seb Date: Fri, 11 Aug 2023 10:57:43 +1000 Subject: [PATCH] update setup.py + README --- README.rst | 28 +++++++++++++++++++++------- setup.py | 18 +++++++++++++++--- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 61aa6ef..2e96814 100644 --- a/README.rst +++ b/README.rst @@ -13,10 +13,6 @@ Install using pip:: It works with Wagtail 4.0 and upwards. For older versions of Wagtail see past releases. -Documentation -============= - -`Documentation for Wagtail news `_ can be found on Read The Docs Quick start =========== @@ -27,9 +23,9 @@ Create news models for your application that inherit from the relevant ``wagtail from django.db import models - from wagtail.admin.edit_handlers import FieldPanel - from wagtail.core.fields import RichTextField - from wagtail.core.models import Page + from wagtail.admin.panels import FieldPanel + from wagtail.fields import RichTextField + from wagtail.models import Page from wagtailnews.models import NewsIndexMixin, AbstractNewsItem, AbstractNewsItemRevision from wagtailnews.decorators import newsindex @@ -41,6 +37,18 @@ Create news models for your application that inherit from the relevant ``wagtail # Add extra fields here, as in a normal Wagtail Page class, if required newsitem_model = 'NewsItem' + featured_news_item = models.ForeignKey( + 'NewsItem', + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name='+', + ) + + content_panels = Page.content_panels + [ + FieldPanel('featured_news_item'), # This will set up a chooser for selecting a news item + ] + class NewsItem(AbstractNewsItem): # NewsItem is a normal Django model, *not* a Wagtail Page. @@ -60,3 +68,9 @@ Create news models for your application that inherit from the relevant ``wagtail class NewsItemRevision(AbstractNewsItemRevision): newsitem = models.ForeignKey(NewsItem, related_name='revisions', on_delete=models.CASCADE) + + +Old docs +======== + +`The docs for Wagtail news `_ are severely out of date, but may still be useful for reference. diff --git a/setup.py b/setup.py index b330021..c0820f1 100755 --- a/setup.py +++ b/setup.py @@ -25,9 +25,9 @@ version=version, description="News / blog plugin for the Wagtail CMS", long_description=readme, - author="Tim Heap", - author_email="tim@takeflight.com.au", - url="https://github.com/takeflight/wagtailnews/", + author="Neon Jungle", + author_email="developers@neonjungle.studio", + url="https://github.com/neon-jungle/wagtailnews/", install_requires=[ "wagtail>=4.0.0", ], @@ -43,7 +43,19 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Framework :: Django", + "Framework :: Django :: 3", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", + "Framework :: Wagtail", + "Framework :: Wagtail :: 4", + "Framework :: Wagtail :: 5", "License :: OSI Approved :: BSD License", ], )