move timeline to front
This commit is contained in:
parent
b65e2d940f
commit
bb13f872e1
4 changed files with 11 additions and 5 deletions
|
@ -7,13 +7,14 @@ from .models import Event
|
||||||
from ..page.models import Page
|
from ..page.models import Page
|
||||||
|
|
||||||
|
|
||||||
def index(request, slug=''):
|
def events(request, slug=''):
|
||||||
context = {}
|
context = {}
|
||||||
context['settings'] = settings
|
context['settings'] = settings
|
||||||
context['events'] = Event.objects.all().order_by('position')
|
context['events'] = Event.objects.all().order_by('position')
|
||||||
context['postscript'], c = Page.objects.get_or_create(slug='postscript')
|
context['postscript'], c = Page.objects.get_or_create(slug='postscript')
|
||||||
context['intro'], c = Page.objects.get_or_create(slug='intro')
|
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):
|
def timeline(request):
|
||||||
context = {}
|
context = {}
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reference {
|
||||||
|
color: #333;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
p {
|
p {
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ from .event import views as event_views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path(settings.URL_PREFIX + 'admin/', admin.site.urls),
|
path(settings.URL_PREFIX + 'admin/', admin.site.urls),
|
||||||
path(settings.URL_PREFIX + 'timeline/', event_views.timeline, name='timeline'),
|
path(settings.URL_PREFIX + 'events/<str:slug>', event_views.events, name='event'),
|
||||||
path(settings.URL_PREFIX + '<str:slug>', event_views.index, name='index'),
|
path(settings.URL_PREFIX + 'events/', event_views.events, name='events'),
|
||||||
path(settings.URL_PREFIX + '', event_views.index, name='index'),
|
path(settings.URL_PREFIX + '', event_views.timeline, name='timeline'),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue