Moved Feedler to separate app
This commit is contained in:
parent
a4e7845560
commit
341ccb35c5
15 changed files with 42 additions and 3 deletions
18
feedler/__init__.py
Normal file
18
feedler/__init__.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
__author__ = 'Oleg Lavrovsky'
|
||||
__email__ = 'oleg@datalets.ch'
|
||||
__version__ = '0.1'
|
||||
|
||||
FEEDLER_APPS = (
|
||||
# Wagtail apps
|
||||
'wagtail.wagtailcore',
|
||||
'wagtail.wagtailadmin',
|
||||
'wagtail.contrib.wagtailroutablepage',
|
||||
'wagtail.contrib.modeladmin',
|
||||
|
||||
# Third-party apps
|
||||
|
||||
# My apps
|
||||
'feedler',
|
||||
)
|
19
feedler/routes.py
Normal file
19
feedler/routes.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from datetime import date
|
||||
|
||||
from django.utils.dateformat import DateFormat
|
||||
from django.utils.formats import date_format
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.conf import settings
|
||||
|
||||
from wagtail.contrib.wagtailroutablepage.models import RoutablePageMixin, route
|
||||
from wagtail.wagtailcore.models import Page
|
||||
from wagtail.wagtailsearch.models import Query
|
||||
|
||||
class FeedlerRoutes(RoutablePageMixin):
|
||||
|
||||
@route(r'^$')
|
||||
def entries_list(self, request, *args, **kwargs):
|
||||
self.entries = self.get_entries()
|
||||
return Page.serve(self, request, *args, **kwargs)
|
|
@ -11,7 +11,7 @@ class EntryModelAdmin(ModelAdmin):
|
|||
menu_order = 200
|
||||
add_to_settings_menu = False
|
||||
exclude_from_explorer = True
|
||||
list_display = ('updated', 'title', 'author', 'tags')
|
||||
list_display = ('published', 'title', 'author', 'tags')
|
||||
list_filter = ('author', 'tags')
|
||||
search_fields = ('title', 'author', 'content', 'tags')
|
||||
|
|
@ -15,7 +15,7 @@ from wagtail.wagtailimages.blocks import ImageChooserBlock
|
|||
from wagtail.wagtailimages.edit_handlers import ImageChooserPanel
|
||||
from wagtail.wagtailsearch import index
|
||||
|
||||
from puput.models import EntryPage, BlogPage
|
||||
# from puput.models import EntryPage, BlogPage
|
||||
|
||||
from ..util import TranslatedField
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ BASE_DIR = os.path.dirname(PROJECT_DIR)
|
|||
INSTALLED_APPS = [
|
||||
'publichealth.home',
|
||||
'publichealth.home.templatetags',
|
||||
'publichealth.feedler',
|
||||
'publichealth.search',
|
||||
|
||||
'wagtail.contrib.wagtailsearchpromotions',
|
||||
|
@ -48,6 +47,7 @@ INSTALLED_APPS = [
|
|||
'taggit',
|
||||
'puput',
|
||||
'anymail',
|
||||
'feedler',
|
||||
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
from puput import PUPUT_APPS
|
||||
from feedler import FEEDLER_APPS
|
||||
|
||||
WAGTAIL_SITE_NAME = 'Public Health'
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -16,6 +17,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.staticfiles',
|
||||
)
|
||||
INSTALLED_APPS += PUPUT_APPS
|
||||
INSTALLED_APPS += FEEDLER_APPS
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
|
|
Loading…
Add table
Reference in a new issue