I'm doing a website for my school in Django. The blog part is almost ready, but on every page I want to have a sidebar with planned changes in the timetable (i.e. when a teacher is ill and classes will have lessons with another teachers in another classrooms). What would be the best way to implement that? I've heard about templatetags, RequestContext and other things like that. That is my first Django project and I'm learning new things every day.
Now I have one app in the project which is called blog
(it's models are: Posts
, Categories
and Pages
; Page
is like a flatpage but it is assigned to a category by a ForeignKey
). In project's urls.py
every request (beside /admin
) is forwarded to blog.urls
where the further actions are taken (choosing the appropriate view class). Views are written using generic views and class inheritance. There are: PostListView, PostView, PageView
. The PageListView
is unneeded because user is able to choose Page
from the main navbar.
The 'changes sidebar' should allow the user to choose a date and reload itself without reloading the whole page.
I would be really grateful if someone could help me with an idea on implementing it. If you have any questions - ask.