9 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
daabeccb60
db: Serialize most of the database queries using locks
See db.py for rationale.

Tests:

- Run functional tests and unit tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-23 12:40:13 -04:00
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Sunil Mohan Adapa
5c514e91d3
models: Add model for storing notifications
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-10 18:13:16 -05:00
Sunil Mohan Adapa
842000a01f
locale: Automatically save profile when user model is saved
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-21 21:08:27 +01:00
Sunil Mohan Adapa
903c47bc25
locale: Update profile model
- Update the size of the language field to 32 bytes.

- Rename preferred_language to just language for consistency with forms.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-21 21:08:11 +01:00
Sai Kiran Naragam
837e0b8384
locale: Adds preferred language for logged in user
- UserProfile model is created, it has one-to-one relationship with User.

- Language selection dropdown added to UserCreate and UserUpdate forms.

- Adds None to language selection dropdown to explicitly unselect.

- LANGUAGE_SESSION_KEY is set to User's preferred language on LogIn activity.

- LANGUAGE_SESSION_KEY is deleted on User's LogOut activity.

Signed-off-by: Sai Kiran Naragam <saikiran.rguiiit@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-21 21:06:14 +01:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Sunil Mohan Adapa
2bba8b07fe
models: New model to store module setup versions 2016-02-13 13:49:54 +05:30
Sunil Mohan Adapa
42d05bfe1f Use Django models to store variables
- Remove dependency on withsqlite and use Django models.
  This avoids depending on a module that is not available in PyPi.
  Withsqlite does not have Python3 support. It does not work when
  we choose a different database backend. Atleast partly duplicates
  what Django models are meant for.

- Check and update database schema on every run so that
  newly added modules can add tables and old ones can update.
2014-09-10 12:35:35 +05:30