From v1.42, Gramex ships with an admin page. To include it in your page, use:
import:
admin/admin:
path: $GRAMEXAPPS/admin2/gramex.yaml # Note the "admin2" instead of "admin"
YAMLURL: /$YAMLURL/admin/ # URL to show the admin page at
Note the admin2
instead of admin
You can configure the admin page as follows:
import:
admin/admin-kwargs:
path: $GRAMEXAPPS/admin2/gramex.yaml
YAMLURL: /$YAMLURL/admin-kwargs/ # URL to show the admin page at
ADMIN_KWARGS:
logo: https://gramener.com/uistatic/gramener.png # Logo URL
title: Admin Page Options # Navbar title
components: [info, users, shell] # Components to show
theme: "?primary=%2320186f&dark=%2320186f&font-family-base=roboto&body-bg=%23f8f8f8" # Bootstrap theme query
The ADMIN_KWARGS
section accepts the following parameters:
logo
: Logo image URL. Either an absolute URL or relative to the admin page.title
: Title displayed on the navbar. Defaults to “Admin”theme
: The UI theme for the page. For example,
?font-family-base=Roboto
makes the font Roboto.components
: List of components to display. The admin page has pre-defined
components (documented below). By default, all components are displayed.Read the documentation on how to set it up admin page.
You can now install gramex with Offline Docker Install. This allows you to ship gramex applications to machines that aren’t always connected to internet.
webshell
now supports arrow keys to navigate history.
Read the documentation on how to set it up admin page.
YAML
merge with duplicate keys, are now reported with detailed key path.FormHandler
GET fails for unknown reason, we now report internal server error.WebSocketHandler
constructs methods dynamically and needs method order. This is now fixed.schedule
is changed, all schedules are stopped. Changed schedules are re-created.
Unchanged schedules should be scheduled again. This is noe fixed.Note: gramex >= 1.41
onwards requires Anaconda >= 5.2.0
To upgrade Gramex, run:
pip install --verbose gramex==1.42
To upgrade apps dependencies, run:
gramex setup --all
This downloads Chromium and other front-end dependencies. That may take time.