3. Aulabook Configuration
If you reached this guide proabably means that you setted up/are setting up your Aulabook server. In order to let Aulabook to work correctly you'll need to modify some variables in the app.py file located in the main directory of your Python Virtual Environment.
Open the file by giving the following command: (make sure you are in the virtual environment directory)
nano app.py
After you opened the file you'll see some code like this:
[...]
app.config['MAIL_SERVER'] = 'smtp.gmail.com' # Set your SMTP server URL
app.config['MAIL_PORT'] = 587 # Set your SMTP port
app.config['MAIL_USE_TLS'] = True # Use SSL
app.config['MAIL_USERNAME'] = 'hello@aulabook.com' # Set your smtp username
app.config['MAIL_PASSWORD'] = 'YouTried! ' # Set your smtp password
app.config['MAIL_DEFAULT_SENDER'] = 'hello@aulabook.com'
[...]
admin_token='ChangeMe' # The token for accessing /visualizza page
host = '10.111.10.111' # Active directory server IP
domain = 'LaboratorioXY' # Domain (without tld)
user = 'Administrator' # User with admin privilege
password = 'R@nd0mPass@' # Password
ou = 'Laboratorio' # OU where you want to create users
dc='laboratorioxy' # Domain (without tld)
dc2='local' # TLD
cn='UtentiLaboratorio' # Group where you want to add users
cdc='laboratoriosp.local' # Complete domain name
nomelab = "Aula VirtualSet - Sede Centrale" # Laboratory/room name
istituto = "I.I.S. Leonardo" # School name
indirizzo_responsabile = "mrossi@mymail.com" # Lab/room manager e-mail
indirizzo_viceresponsabile = "lab@yourschool.com" # Second manager e-mail
responsabile = "Simone Pagano" # Manager name
url = "demo.aulabook.com" # URL of aulabook instance
[...]
We'll divide the configuration in some steps: 1. SMTP Configuration 2. The Admin Token configuration 3. Setting the Windows Server connection parameter 4. Change information about your laboratory and school
1. SMTP Configuration
In the first section of the code you'll need to configure the SMTP parameters for sending e-mails.
In this example I used Google Workspace ones but you'll have to set yours.
Mind that if you're using Google Workspace/Gmail/Outlook you'll need to generate an app password.
app.config['MAIL_SERVER'] = 'smtp.gmail.com' # Set your SMTP server URL
app.config['MAIL_PORT'] = 587 # Set your SMTP port
app.config['MAIL_USE_TLS'] = True # Use SSL
app.config['MAIL_USERNAME'] = 'hello@aulabook.com' # Set your smtp username
app.config['MAIL_PASSWORD'] = 'YouTried! ' # Set your smtp password
app.config['MAIL_DEFAULT_SENDER'] = 'hello@aulabook.com'
2. The Admin Token configuration
In order to protect access to the full reservation list, you'll need to enter the Admin Token. The Admin Token is a string saved in your Python code and it may include letters, numbers and special characters.
Customize your own!
admin_token='ChangeMe'
3. Setting the Windows Server connection parameter
To let Aulabook generate credentials for your end-users that will reserve your laboratory you'll need to set the connection parameters for the Windows Server domain controller.
host = '10.111.10.111'
domain = 'LaboratorioXY'
user = 'Administrator'
password = 'R@nd0mPass@'
ou = 'Laboratorio'
dc='laboratorioxy'
dc2='local'
cn='UtentiLaboratorio'
cdc='laboratoriosp.local'
Here you'll find a detailed explaination of each variable and the value that you'll nedd to insert.
Variable | Value |
---|---|
host | Use the IP address of the Domain Controller |
domain | The domain name, without the TLD |
user | The user with administrator privileges |
password | The password of the previous user |
ou | The name of the Organizational Unit |
dc | The name of the domain controller without the TLD. All lowercase. |
dc2 | The tld of the domain |
cn | Common Name of the Group where users will be added |
cdc | The complete domain controller address |
4. Change information about your laboratory and school
Here you'll need to set up informations about your room/laboratory, like the room/laboratory name or the Aulabook instance URL.
nomelab = "Aula VirtualSet - Sede Centrale" # Laboratory/room name
istituto = "I.I.S. Leonardo" # School name
indirizzo_responsabile = "mrossi@mymail.com" # Lab/room manager e-mail
indirizzo_viceresponsabile = "lab@yourschool.com" # Second manager e-mail
responsabile = "Simone Pagano" # Manager name
url = "demo.aulabook.com" # URL of aulabook instance
Finished!😁
You completed Aulabook file configuration. Save by giving 'Control + X' and confirm with Y.