configure migdal
authorJan Szejko <janek37@gmail.com>
Thu, 23 Aug 2018 14:13:26 +0000 (16:13 +0200)
committerJan Szejko <janek37@gmail.com>
Thu, 23 Aug 2018 15:02:57 +0000 (17:02 +0200)
requirements/requirements.txt
src/wolnelektury/settings/apps.py
src/wolnelektury/settings/contrib.py
src/wolnelektury/urls.py

index 7d22d7c..05e0a8f 100644 (file)
@@ -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
index cb56d24..7e293d3 100644 (file)
@@ -63,6 +63,7 @@ INSTALLED_APPS_CONTRIB = [
     'migdal',
     'django_comments',
     'django_comments_xtd',
+    'django_gravatar',
 
     # allauth stuff
     'uni_form',
index b0165c3..de64990 100644 (file)
@@ -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),
+)
index 0cbaced..97002d1 100644 (file)
@@ -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