Respira
Respira
← User guides

User guide · Administrators

Registering an institution, from zero to an active panel

How to create an institution in Respira's backoffice, link a user and a station to it, and confirm that its panel works.

  • For Respira's internal team
  • Requires an account with backoffice permissions
In this guide
  1. Signing in to the admin
  2. Creating the institution
  3. Linking a user
  4. Configuring alerts
  5. Linking a station
  6. Checking the panel
  7. Recovering your password
  8. If something goes wrong

Signing in to the admin

The admin is Respira's internal working interface: a set of web forms where the team creates and edits the system's data — institutions, users, stations. It is different from the institutional panel, which is what the end client sees and is explained in the guide for institutions. Think of the admin as the back room, and the panel as the shop window.

  1. Open the admin in your browser: https://proyectorespira.net/admin/
  2. You'll see a screen with two fields: email and password. Enter your account's credentials and press the login button.
  3. If everything went well, you land on the main screen: a list of sections grouped under Accounts and Api. That's your base of operations for everything that follows.
Respira's admin main screen. On the left, the list of sections grouped under Accounts (Roles, Users) and Api (Action logs, Institution alerts, Institution contracts, Institutions, Sensitive groups, Stations, among others), each with an «Add» link. Top right, the links to view the site, change the password and log out.
The admin's main screen. The sections you'll use in this guide are all under Api.

Don't have an account yet? There are two routes:

  • A superuser can always sign in and sees everything. Create one by running python manage.py createsuperuser, or reproducibly with python manage.py bootstrap_superuser (it uses the environment variables BACKEND_SUPERUSER_EMAIL / BACKEND_SUPERUSER_PASSWORD).
  • An account with the admin or editor role is enough for this guide — but it only works if someone has already run python manage.py sync_roles after assigning that role.

Creating the institution

It's the root record: everything else — the user who signs in to the panel, the station, the alerts — hangs off this institution.

Admin→Api→Institutions→Add institution
The admin's «Add institution» form, filled in. At the top, the Legal name, Display name and Institution type fields; then the Contact (name, email and phone), Location (address and city) and Notes blocks. Further down, the «Dashboard users» section with a user picker and the «Add another Dashboard user» link, and the «Institution alert config» section with the «Is enabled» checkbox, the «Alert threshold» field and the dual-list picker for sensitive groups. At the foot, the Save buttons.
A single form covers three things: the institution's details, the user who will sign in to the panel and the alert configuration.
legal_name
Required. The institution's registered name.
display_name
Short name for display. Optional.
institution_type
Institution type. Optional.
contact_name / contact_email / contact_phone
Contact details. Optional.
address / city
Location. Optional.
notes
Internal notes. Optional.

Save the form with just legal_name and the institution exists — the rest can be filled in later. You don't need to leave this screen for the next two steps: they are sections of this same form.

Linking a user — this is what grants panel access

Without this step the institution exists but nobody can sign in to its panel.

  • On the same institution page, scroll down to the "Dashboard users".
  • Use the search box to pick a User that already exists. If it doesn't exist yet, create it first in Admin → Accounts → Users and come back.
  • Save the Institution form — the link is created along with the rest of the data.

Configuring alerts — optional

Only if the institution is going to use the sensitive-group alert system.

Same page, the "Institution alert config"section. Tick the checkbox, set the AQI threshold at which an alert fires, and pick the sensitive groups in the dual-list selector. It can be skipped entirely without blocking the following steps.

Linking a station

This is the part that connects to the data pipeline — but from the admin it's just another form.

Admin→Api→Institution contracts→Add
The admin's «Add institution contract» form, with the Institution and Station fields as search boxes, the Contract status dropdown with the draft, active, expired and cancelled options, the Start date and End date fields, the Monthly fee field and the Signed contract url field.
The contract is what ties the institution to its sensor: without it, the panel opens but has no data to show.
institution
Required. Picked with the search box.
station
Required. Searched by name or by station_code.
contract_status
draft / active / expired / cancelled.
start_date
Required.
end_date / monthly_fee / signed_contract_url
Optional.

The station's station_code field is read-only here — the data pipeline generates it, it isn't edited from this form.

Checking that the panel works

You now have the institution, its user and its station. The check is to sign in as though you were that institution and see that it loads its own data.

  1. Open Acceso from the site's menu, or go straight to /institucion/login.
  2. Sign in with the email and password of the user you linked — not with your admin account. A backoffice account without that link doesn't get in here, even with correct credentials.
  3. You should land on the panel and see the institution's name in the top bar, with the sensor, the day's AQI and the history loaded. That confirms the five previous steps were done right.

If you want to know exactly what the institution will see when they sign in, the full walkthrough of the panel is in the guide for institutions.

Recovering your administrator password

If you've lost access to the admin, you don't need someone else to reset it for you.

  1. At /admin/login/, tap "Forgotten your password or username?", below the form.
  2. Enter your account's email and send.
  3. You'll get an email with a link. Open it and choose the new password, twice.
  4. Go back to /admin/login/ and sign in with the new one.

Institutions have their own flow, from the panel's sign-in screen — it's explained in the guide for institutions.

If something goes wrong

Back to top

Arrow top

A collaboration by

Facultad de ingenieria Logo
Mozilla logo
Girls code logo
MADES logo

Write to us at proyectorespirapy@gmail.com

Follow us on

Telegram Icon Instagram Icon Facebook Icon Slack Icon
Slack Join our Slack community