ReportBro album application for web2py web framework (2.18.5+). This is a fully working demo app to showcase ReportBro and how you can integrate it in your web2py application.
The application is a simple web app and allows to manage a list of music albums. ReportBro Designer is included so you can modify a template which is used when you print a pdf of all your albums.
The Demo App is also avaiable for the Django and Flask web frameworks. See Album App for Django and Album App for Flask respectively.
All Instructions in this file are for a Linux/Mac shell but the commands are easy to adapt for Windows. If a command is different for Windows then it will be shown below. Commands which are usually done in Windows Explorer (e.g. copy file, create directory) are not explicitly listed.
Download web2py source code for Python 3.x and unpack the zip file (if you don't have web2py 2.18.5+ installed already).
Change into web2py applications directory:
$ cd web2py/applicationsClone the git repository:
$ git clone https://github.com/jobsta/albumapp-web2py.git albumsCreate a virtual environment in web2py root directory called env:
$ cd ..
$ python3 -m venv envActivate the virtual environment:
$ . env/bin/activateOn Windows the virtual environment is activated this way instead:
$ env\Scripts\activateOnce the virtual environment is activated you should see the environment name prepended to the shell prompt.
Install reportbro-lib:
$ pip install reportbro-libNo additional configuration is needed because the database and its tables are automatically created by web2py.
Activate the virtual environment (if not already active):
$ . env/bin/activateStart the web2py webserver (with default password for admin console):
$ python web2py.py --password=123Now your application is running and can be accessed here: http://127.0.0.1:8000/albums
- Open web2py directory
- Add virtual env to project:
- Select File -> Settings
- Project: web2py -> Project interpreter
- click Settings-Icon and select "Add Local" option, select the recently created virtual env
- Edit Configurations...
- Python interpreter: select virtual env (if not already set)
- Script parameters: --password=123
The PEP 8 (Python Enhancement Proposal) standard is used which is the de-facto code style guide for Python. An easy-to-read version of PEP 8 can be found at https://pep8.org/