feat: add install handler and related logic
- Mako is now a core dependency - therefore no more 'email' extra - add `get_install_handler()` method for app handler - add `render_mako_template()` method for app handler - add `resource_path()` method for app handler - install handler thus far can: - confirm db connection - make appdir plus config/scripts: - wutta.conf - web.conf - upgrade.sh - upgrade db schema to create tables - from there web app can run, create admin user - quick start docs now describe "generated code" option
This commit is contained in:
parent
49e77d7407
commit
ceeff7e911
15 changed files with 1526 additions and 32 deletions
|
@ -2,6 +2,56 @@
|
|||
Quick Start
|
||||
===========
|
||||
|
||||
We have two varieties of "quick start" instructions:
|
||||
|
||||
* :ref:`quick-start-generated`
|
||||
* :ref:`quick-start-manual`
|
||||
|
||||
|
||||
.. _quick-start-generated:
|
||||
|
||||
From Generated Code
|
||||
-------------------
|
||||
|
||||
Note that this section describes an app based on WuttaWeb (i.e. not
|
||||
just WuttJamaican).
|
||||
|
||||
There is a tool to `generate new project code`_, on the Rattail Demo
|
||||
site. Use it to download a ZIP file (e.g. ``poser.zip``) for your
|
||||
project.
|
||||
|
||||
.. _generate new project code: https://demo.rattailproject.org/generated-projects/new/wutta
|
||||
|
||||
Make a local :term:`virtual environment` for your project.
|
||||
|
||||
Also make a new e.g. ``poser`` database in PostgreSQL (or MySQL).
|
||||
|
||||
Unzip and install the source code to the virtual environment, then run
|
||||
the app installer:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
mkdir -p ~/src
|
||||
unzip ~/Downloads/poser.zip -d ~/src
|
||||
|
||||
cd /path/to/venv
|
||||
bin/pip install -e ~/src/poser
|
||||
bin/poser install
|
||||
|
||||
Assuming all goes well, you can run the web app with:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
bin/pserve --reload file+ini:app/web.conf
|
||||
|
||||
And browse it at http://localhost:9080
|
||||
|
||||
|
||||
.. _quick-start-manual:
|
||||
|
||||
From Scratch
|
||||
------------
|
||||
|
||||
This shows the *minimum* use case, basically how to make/use the
|
||||
:term:`config object` and :term:`app handler`.
|
||||
|
||||
|
@ -67,7 +117,7 @@ For more info see:
|
|||
.. _db-setup:
|
||||
|
||||
Database Setup
|
||||
==============
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
You should already have the package installed (see previous section).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue