Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
688de03d
Unverified
Commit
688de03d
authored
6 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
docs: dev/web: update model/view/controller paths
Fixes #1491
parent
fead411f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/dev/web/controller.rst
+4
-2
4 additions, 2 deletions
docs/dev/web/controller.rst
docs/dev/web/model.rst
+7
-2
7 additions, 2 deletions
docs/dev/web/model.rst
docs/dev/web/view.rst
+5
-2
5 additions, 2 deletions
docs/dev/web/view.rst
with
16 additions
and
6 deletions
docs/dev/web/controller.rst
+
4
−
2
View file @
688de03d
Controllers
Controllers
===========
===========
Controllers live in ``/lib/gluon/web/controller``. They define which pages ("routes")
Controllers live in the ``controller`` subdirectory of a gluon-web application
exist under the ``/cgi-bin/gluon`` path, and what code is run when these pages are requested.
(``/lib/gluon/config-mode/controller`` for the config mode,
``/lib/gluon/status-page/controller`` for the status page). They define which pages ("routes")
exist under the application base URL, and what code is run when these pages are requested.
Controller scripts usually start with a *package* declaration, followed by calls
Controller scripts usually start with a *package* declaration, followed by calls
to the *entry* function, which each define one route:
to the *entry* function, which each define one route:
...
...
This diff is collapsed.
Click to expand it.
docs/dev/web/model.rst
+
7
−
2
View file @
688de03d
Models
Models
======
======
Models are defined in ``/lib/gluon/web/model``. Each model defines one or more
Models are defined in the ``model`` subdirectory of a gluon-web application
forms to display on a page, and how the submitted form data is handled.
(``/lib/gluon/config-mode/model`` for the config mode; the status
page does not use any models). Model support is not part of the gluon-web core
anymore, but is provided by the *gluon-web-model* package.
Each model defines one or more forms to display on a page, and how the submitted
form data is handled.
Let's start with an example:
Let's start with an example:
...
...
This diff is collapsed.
Click to expand it.
docs/dev/web/view.rst
+
5
−
2
View file @
688de03d
Views
Views
=====
=====
The template parser reads views from ``/lib/gluon/web/view``. Writing own view
The template parser reads views from the ``view`` subdirectory of a
should be avoided in favour of using :doc:`model` with their predefined views.
gluon-web application (``/lib/gluon/config-mode/view`` for the config mode,
``lib/gluon/status-page/view`` for the status page).
Writing own views should usually be avoided in favour of using :doc:`model`
with their predefined views.
Views are partial HTML pages, with additional template tags that allow
Views are partial HTML pages, with additional template tags that allow
to embed Lua code and translation strings. The following tags are defined:
to embed Lua code and translation strings. The following tags are defined:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment