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>
- 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>
- 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>
- 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.