move timeline to front

This commit is contained in:
j 2022-04-12 14:41:48 +01:00
parent b65e2d940f
commit bb13f872e1
4 changed files with 11 additions and 5 deletions

View file

@ -7,13 +7,14 @@ from .models import Event
from ..page.models import Page
def index(request, slug=''):
def events(request, slug=''):
context = {}
context['settings'] = settings
context['events'] = Event.objects.all().order_by('position')
context['postscript'], c = Page.objects.get_or_create(slug='postscript')
context['intro'], c = Page.objects.get_or_create(slug='intro')
return render(request, 'index.html', context)
return render(request, 'events.html', context)
def timeline(request):
context = {}

View file

@ -6,6 +6,11 @@
margin: auto;
}
.reference {
color: #333;
font-size: 11px;
}
p {
}

View file

@ -22,7 +22,7 @@ from .event import views as event_views
urlpatterns = [
path(settings.URL_PREFIX + 'admin/', admin.site.urls),
path(settings.URL_PREFIX + 'timeline/', event_views.timeline, name='timeline'),
path(settings.URL_PREFIX + '<str:slug>', event_views.index, name='index'),
path(settings.URL_PREFIX + '', event_views.index, name='index'),
path(settings.URL_PREFIX + 'events/<str:slug>', event_views.events, name='event'),
path(settings.URL_PREFIX + 'events/', event_views.events, name='events'),
path(settings.URL_PREFIX + '', event_views.timeline, name='timeline'),
]