basxsoftwareassociation / bread

Engine to create database applications based on Django and the IBM Carbon Design System
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Feature/eliminate django template system #63

Closed saemideluxe closed 3 years ago

saemideluxe commented 3 years ago

This a rather big refactoring in order to remove the django templating system from bread and bread applications. The motivation behind is:

Additionaly a small extension to the middleware has been brought in to allow sending state from the client to the server. As previsouly mentioned, UI state should reside on the client. However, when generating the interface on the server, some information is necessary to avoid "lagging" or flickering interface changes after the page has been loaded on the client. One example is the state of the sidebar. In order to send the HTML with the correct classes for expanded or collapsed navigation sidebar, the server needs to know what the current session's setting is. (In the past this has been solved with user preferences, but I think this is not a good solution because the collapse-state of the navigation menu does not exclusively depend on user preferences but also on the device or available space on the screen.) This has been implemented with cookies and the django session object.

saemideluxe commented 3 years ago

This refactroing should be almost completely API compatible, the only thing I had to add in basxconnect was the COMPANYNAME context variable.

saemideluxe commented 3 years ago

Okay, I also had to change views which were relying on bread/base.html inside basxconnect. So the two wizards.