Added the ability to receive tables from IRIS in Telegram chat:
Apptools-admin includes support for the Django platform for implementing the functions of the IRIS management portal.
Added the ability to receive tables from IRIS in Telegram chat:
git clone https://github.com/SergeyMi37/apptools-django.git
cd apptools-django
Create virtual environment (optional)
python3 -m venv dtb_venv
source dtb_venv/bin/activate
# deactivate
For Windows source dtb_venv/Scripts/activate
Install all requirements:
pip install -r requirements.txt
Create .env file in root directory and copy-paste this or just run cp .env_example .env
, don’t forget to change telegram token:
DJANGO_DEBUG=True
DATABASE_URL=sqlite:///db.sqlite3
TELEGRAM_TOKEN=<PASTE YOUR TELEGRAM TOKEN HERE> # To start a project, a token is required
ISC_Username=_system
ISC_Password=SYS
ISC_Namespace=USER
DJANGO_SUPERUSER_PASSWORD=demo
Run migrations to setup SQLite database:
python manage.py makemigrations
python manage.py migrate
Load test data
python manage.py loaddata db-test.json
Create a superuser adm
with the password demo
to get access to the admin panel:
python manage.py createsuperuser --noinput --username adm --email adm@localhost.com # .env DJANGO_SUPERUSER_PASSWORD=demo
Compile multilingual dictionaries
django-admin compilemessages -i dtb_venv -i src
Run bot in polling mode:
python run_polling.py
If you want to open Django admin panel which will be located on http://localhost:8000/admin/
python manage.py runserver
If the current ZPM instance is not installed, then in one line you can install the latest version of ZPM even with a proxy.
s r=##class(%Net.HttpRequest).%New(),proxy=$System.Util.GetEnviron("https_proxy") Do ##class(%Net.URLParser).Parse(proxy,.pr) s:$G(pr("host"))'="" r.ProxyHTTPS=1,r.ProxyTunnel=1,r.ProxyPort=pr("port"),r.ProxyServer=pr("host") s:$G(pr("username"))'=""&&($G(pr("password"))'="") r.ProxyAuthorization="Basic "_$system.Encryption.Base64Encode(pr("username")_":"_pr("password")) set r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
If ZPM is installed, then ZAPM can be set with the command
zpm:USER>install apptools-django
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
$ git clone https://github.com/SergeyMi37/apptools-django.git
Open the terminal in this directory and run:
$ docker-compose build
$ docker-compose up -d
Open the link in your browser: http://127.0.0.1:8000/
The project is based on a template ohld and inspired by applications from Dmitry and Oleksandr.