From f99929a3fa250a4d39388013b990334ae1f7c779 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 23 Aug 2018 16:13:26 +0200 Subject: [PATCH] configure migdal --- requirements/requirements.txt | 2 +- src/wolnelektury/settings/apps.py | 1 + src/wolnelektury/settings/contrib.py | 9 +++++++++ src/wolnelektury/urls.py | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 7d22d7c50..05e0a8f3c 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -69,6 +69,6 @@ requests paypalrestsdk django-haystack<2.8.0 -django-migdal>=0.8.1 +django-migdal>=0.8.3 python-slugify \ No newline at end of file diff --git a/src/wolnelektury/settings/apps.py b/src/wolnelektury/settings/apps.py index cb56d2440..7e293d3bd 100644 --- a/src/wolnelektury/settings/apps.py +++ b/src/wolnelektury/settings/apps.py @@ -63,6 +63,7 @@ INSTALLED_APPS_CONTRIB = [ 'migdal', 'django_comments', 'django_comments_xtd', + 'django_gravatar', # allauth stuff 'uni_form', diff --git a/src/wolnelektury/settings/contrib.py b/src/wolnelektury/settings/contrib.py index b0165c3de..de64990bc 100644 --- a/src/wolnelektury/settings/contrib.py +++ b/src/wolnelektury/settings/contrib.py @@ -3,6 +3,8 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from fnpdjango.utils.text.textilepl import textile_pl +from migdal import EntryType +from django.utils.translation import ugettext_lazy as _ HONEYPOT_FIELD_NAME = 'miut' PAGINATION_INVALID_PAGE_RAISES_404 = True @@ -35,3 +37,10 @@ PAYPAL_CONFIG = { MARKUP_FIELD_TYPES = ( ('textile_pl', textile_pl), ) + +MIGDAL_TYPES = ( + EntryType('news', _('news'), commentable=False, on_main=True, promotable=True), + EntryType('publications', _('publications'), commentable=False), + EntryType('info', _('info'), commentable=False), + EntryType('event', _('events'), commentable=False), +) diff --git a/src/wolnelektury/urls.py b/src/wolnelektury/urls.py index 0cbaced13..97002d193 100644 --- a/src/wolnelektury/urls.py +++ b/src/wolnelektury/urls.py @@ -7,6 +7,7 @@ from django.conf import settings from django.contrib import admin from django.views.generic import RedirectView import django.views.static +from migdal.urls import urlpatterns as migdal_urlpatterns import catalogue.views import picture.views from . import views @@ -93,3 +94,5 @@ urlpatterns += [ url(r'^error-test/$', views.exception_test), # url(r'^post-test/$', views.post_test), ] + +urlpatterns += migdal_urlpatterns -- 2.20.1