Commit 82befdd2 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'ditch-old-feed' into 'master'

Drop deprecation feed

See merge request !593
parents 101be591 09e39c3f
from datetime import datetime, timedelta
from django.contrib.sites.models import Site
from django.urls import reverse
from django.utils.translation import ugettext as _
......@@ -47,30 +45,3 @@ class EventFeed(ICalFeed):
def item_location(self, item):
return "{} - {}".format(item.location, item.map_location)
class DeprecationFeed(ICalFeed):
def product_id(self):
return '-//thalia.nu//DEPRECATED'
def items(self):
return range(7)
def item_start_datetime(self, item):
today = datetime.now().replace(hour=13, minute=37, second=0)
delta = timedelta(days=item)
return today + delta
def item_end_datetime(self, item):
today = datetime.now().replace(hour=15, minute=37, second=0)
delta = timedelta(days=item)
return today + delta
def item_title(self, item):
return (
'Oude Thalia Feed, gebruik https://thalia.nu' +
reverse('events:ical-nl')
)
def item_link(self, item):
return reverse('events:ical-nl') + '?item={}'.format(item)
......@@ -42,7 +42,6 @@ from rest_framework.authtoken import views as rfviews
import members
from activemembers.sitemaps import sitemap as activemembers_sitemap
from documents.sitemaps import sitemap as documents_sitemap
from events.feeds import DeprecationFeed
from events.sitemaps import sitemap as events_sitemap
from members.sitemaps import sitemap as members_sitemap
from partners.sitemaps import sitemap as partners_sitemap
......@@ -69,10 +68,6 @@ urlpatterns = [
url(r'^account/$', members.views.account, name='account'),
url(r'^events/', include('events.urls')),
url(r'^pizzas/', include('pizzas.urls')),
url(r'^', include([ # 'deprecated ical feeds' menu
url(r'^index\.php/events/ical/feed\.ics', DeprecationFeed()),
url(r'^nieuws/agenda/vcal\.php', DeprecationFeed()),
])),
url(r'^newsletters/', include('newsletters.urls')),
url(r'^nieuwsbrief/', include('newsletters.urls', namespace='newsletters-legacy'),), # for legacy reasons
url(r'^association$', TemplateView.as_view(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment