You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
Redesigning from scratch with Django's template extension feature. To keep it
simple for now, we can start with 2 bases and extend from there. These bases
will contain the layout of all the pages so the header footer title etc. All
the code that needs to be repeated for each page.
The /my_bunq page is where things get interesting. When the page loads, the
user will see some personal information. Because it takes time to gather all
the data from the bunq servers, the /my_bunq page will present empty with
a loading msg and makes an ajax call to retrieve the users data. Each response
from the bunq server needs to get an html template, so the ajax call will
have raw html as response and will load this in the /my_bunq.html.
So the 2 bases will be base.html and my_bunq.html, however my_bunq.html
will be an extension of base.html. my_bunq.html will then be main html
file for the my_bunq page and eacht time JS makes an ajax call to the
server, raw html will be returned and this will then be pasted in the my_bunq.html base.
base.html
The layout of all the pages. Basically the html code that you would need to
repeat in all the html files.
<!DOCTYPE html><html><head><metacharset="utf-8"><title></title><!-- all the JS and CSS files--></head><head>
menu
</head><body><!-- only components that will be the same for all pages like some div's.--></body><footer>releases</footer></html>
Homepage.html
code that is unique to the home page
<divclass="container"><h3>
welcome to combunqweb....
</h3><h3>how it works..</h3></div>
When someone visit the home page the homepage.html and base.html will get
combined in
<!DOCTYPE html><html><head><metacharset="utf-8"><title></title><!-- all the JS and CSS files--></head><head>
menu
</head><body><!-- only components that will be the same for all pages like some div's.--><divclass="container"><h3>
welcome to combunqweb....
</h3><h3>how it works..</h3></div></body><footer>releases</footer></html>
So each page template will be an extension from the base.html and each
response template will be pasted in the my_bunq.html base.
Redesigning from scratch with Django's template extension feature. To keep it
simple for now, we can start with 2 bases and extend from there. These bases
will contain the layout of all the pages so the header footer title etc. All
the code that needs to be repeated for each page.
The
/my_bunq
page is where things get interesting. When the page loads, theuser will see some personal information. Because it takes time to gather all
the data from the bunq servers, the
/my_bunq
page will present empty witha loading msg and makes an
ajax
call to retrieve the users data. Each responsefrom the bunq server needs to get an html template, so the
ajax
call willhave raw html as response and will load this in the
/my_bunq.html
.So the 2 bases will be
base.html
andmy_bunq.html
, howevermy_bunq.html
will be an extension of
base.html
.my_bunq.html
will then be main htmlfile for the
my_bunq
page and eacht time JS makes anajax
call to theserver, raw html will be returned and this will then be pasted in the
my_bunq.html
base.base.html
The layout of all the pages. Basically the html code that you would need to
repeat in all the html files.
Homepage.html
code that is unique to the home page
When someone visit the home page the
homepage.html
andbase.html
will getcombined in
So each page template will be an extension from the
base.html
and eachresponse template will be pasted in the
my_bunq.html
base.Templates list
page templates
response Templates
Error templates
Louis Laureys
The text was updated successfully, but these errors were encountered: