python - Ajax sidebar in Django -


I'm doing a part of my blog in Django, almost part of the blog, but on every page I have a timetable There is a sidebar with schematic changes (i.e. when a teacher is sick and classes will teach lessons with other teachers in other classes). What would be the best way to implement it? I've heard of templatetags, RequestContext and other such things. This is my first project project and every day I am learning new things.

Now I have an app in the project that is called blog (These are the models: post , categories and page ; page is like a flatpage, but it's a ForeignKey ). The project's urls.py is forwarded to each request (next to / admin ) on blog.urls , where further action is taken (Fair visual class). The scenes have been written using common ideas and class succession. Contains: PostLineView, PostView, Pageviews . PageListView is unnecessary because the user is able to select page from the main navbar.

'Sidebar changes' should allow the user to select a date and reload itself without reloading the whole page.

If someone can think of implementing it, then I would be truly grateful. Ask if you have any questions.

The user should allow 'sidebar changes' without reloading the entire page. Pick date and reload.

OK, so you need AJAX for this part. For more complex projects you can use the DJENGO-RESTR FRAMEWORK or TCHPI, but for this, I recommend doing an AJAX function that gets a date in the form of a parameter and returns a render template. See and

to include the sidebar, I will create a separate template for it and to join the {% include 'changes_sidebar.html'%} you have to include JavaScript in order to make an AJAX request . / P>


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -