What is a Shape?

E
very page may be in one of two shapes. The two possible shapes are disp (shapes.DISP) and form (shapes.FORM). When a page is rendered in disp shape, all the controls output read only material, and hence no changes can take place in the database. When a page is in form shape, then the controls produce form elements which allow the user to change the data (edit / add). So very loosely speaking disp shape corresponds to display mode and form shape corresponds to edit/add mode. See What is a Mode? for more on the important distinction between shapes and modes.

All of this is the reason behind pieces of code like this:

if get_mode()='edit':
   self.shape = shapes.FORM
else:
   self.shape = shapes.DISP

One notable exception is in the Course Description where all the modes you see except for edit mode, actually correspond to display shape. So theoretically, pages rendered in display shape can still cause the database to change. If this paragraph was confusing, just disregard it and you will be fine.