Age | Commit message (Collapse) | Author |
|
|
|
The old edit URL parameter allowed to select one different HTML
template. A more generic approach is to provide a view parameter which
allows to use multiple alternative HTML templates for the same data
defined by the Go struct.
This makes implementing additional pages like a confirm page for recipe
deletion easier.
|
|
While forms can be send without JavaScript this new approach has the
benefit that the whole data is send as one JSON.
This JSON format can also be used for an API or testing.
|
|
|
|
The index page / provides a redirect to /recipes but this is inefficient
since two HTTP requests are required.
|
|
|
|
|
|
|