Commit Graph

359 Commits

Author SHA1 Message Date
Christopher C. Wells cd946280cb Format code with black 2022-02-09 16:00:30 -08:00
Christopher C. Wells 226f67f02c Update Django to 4.x 2022-01-16 15:49:09 -08:00
Christopher C. Wells 81f0fb94e7 Replace easy-thumbnails with imagekit
Closes #373
2022-01-16 15:49:09 -08:00
Yulian Kuncheff 0af4521005 Linting and faker changes 2021-12-31 09:19:53 -05:00
Yulian Kuncheff 9b604627a1 Add Height, Head Circumference, and BMI, corresponding reports, and move to separate menu with Weight and Temperature. 2021-12-31 09:19:53 -05:00
Christopher Charbonneau Wells 8f6d0295f3
Improve PWA experience (#359) 2021-12-25 14:31:58 -05:00
Christopher C. Wells c69fc603af Add logo to login page 2021-12-24 14:54:03 -05:00
Christopher C. Wells e62f4a6426 Use `sticky-top` instead of `fixed-top` for navbar 2021-12-24 14:48:14 -05:00
Christopher C. Wells 49919c2cbb Decrease size of login page logo 2021-12-24 14:42:58 -05:00
Christopher C. Wells 6cc9890f5a Use named patterns for settings URLs
This should improve support for subdirectory hosted installations.
2021-12-24 14:28:24 -05:00
Christopher C. Wells db703c07ec Merge remote-tracking branch 'origin/master' 2021-12-21 15:58:42 -05:00
MagiX13 498eddf5b6 Serve login pages using the SCRIPT_NAME if available 2021-12-21 15:51:20 -05:00
MagiX13 17e35e6469 Adjust paths to / to be dynamic
This is useful if you want to run babybuddy in a subdirectory
2021-12-21 15:51:20 -05:00
Christopher C. Wells 542e0dacb3 Ignore any unknown settings files 2021-12-20 09:41:32 -05:00
Christopher C. Wells 97fa8d7000 Support POST only for logout 2021-12-18 17:42:53 -05:00
Christopher C. Wells 32bfede6e2 Re-add non-svg favicon metadata files
Fixes #357
2021-12-18 17:11:55 -05:00
MagiX13 34038652b8 Convert envir variables that are supposed to be boolean to boolean
dotenv does not take allow for boolean environment variables and thus they have to be converted before
2021-12-15 06:26:50 -05:00
Christopher C. Wells 9722d540ec Create v1.9.3 release 2021-12-14 09:50:27 -05:00
Christopher C. Wells 9585443218 Revert "Treat `en` as `en-US` for date formatting"
This reverts commit c06ce032. Proper handling for this language setting is
added in commit 59372a01.
2021-12-14 09:25:21 -05:00
Christopher C. Wells 59372a01d2 Add migration for `en` to `en-US` language setting
Fixes #337
2021-12-13 16:34:36 -05:00
Christopher C. Wells c06ce0325b Treat `en` as `en-US` for date formatting
Fixes #337
2021-12-13 16:28:53 -05:00
Christopher Charbonneau Wells 2ad48940c1
Merge pull request #335 from Amith211/333-en-gb-datetimeformat
Add en-gb datetime overrides
2021-12-13 16:19:45 -05:00
Christopher C. Wells b302cc853f Create v1.9.2 release 2021-12-04 06:44:41 -05:00
Christopher C. Wells f0a7f53752 Merge remote-tracking branch 'origin/master' into 333-en-gb-datetimeformat 2021-11-28 14:44:36 -05:00
Christopher C. Wells 4920f4341b Use request language code when available (#346)
Enables translation on the login page.
2021-11-28 14:18:00 -05:00
Christopher C. Wells 0250faec6e Ensure "settings saved" is translated (#346) 2021-11-28 14:05:56 -05:00
Christopher C. Wells c28620b3d8 Activate and deactivate user language in middleware
Fixes #346
2021-11-28 14:02:23 -05:00
Amith211 429c85cd5a
fix en_GB display format 2021-11-15 17:30:12 +00:00
Amith211 df51cc05d8
fix en_GB tests 2021-11-15 17:15:57 +00:00
Amith211 0312a4210d
add en-gb format tests 2021-11-14 01:20:20 +00:00
Amith211 36318a05e3
add en-gb datetime overrides
close #333
2021-11-14 01:18:29 +00:00
Christopher C. Wells 10f12f6a13 Create v1.9.1 release 2021-11-13 06:24:50 -08:00
Christopher C. Wells 09714f5810 Update Python dependencies 2021-11-13 06:07:08 -08:00
Christopher C. Wells fd9a0eb656 Replace usages of `darken` and `lighten` 2021-11-13 05:47:11 -08:00
Christopher Charbonneau Wells d74f35d765
Handle format customization in middelware (#332)
This is done to allow for format difference between `en-US` (`en`) and `en-GB` that are not well supported by Django's format handling.
2021-11-12 10:13:08 -08:00
codisart c33ace2bf9 feat(sleep): #323 Add napping field to the sleep model 2021-10-30 07:16:37 -07:00
Christopher C. Wells 0c0d4baf41 Combine `en` and `en_GB` date input formats 2021-10-26 19:55:16 -07:00
Christopher C. Wells b5d9875e9a Fix linting issues 2021-10-26 19:55:16 -07:00
Christopher C. Wells 0efe0e4f0b Remove deprecated use of session-based language handling
Session-based language handling is deprecated in Django 3.x and will be
removed in 4.x.

https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#explicitly-setting-the-active-language
2021-10-26 19:55:16 -07:00
Christopher C. Wells 9e2048b26c Change default locale to en-US 2021-10-26 19:55:16 -07:00
Amith211 52fab47735 add en-GB 'translations' 2021-10-26 19:55:16 -07:00
Christopher C. Wells 821aa34fed Update language option configurations 2021-10-07 05:58:03 -07:00
Christopher C. Wells fe7e16800a Create v1.9.0 release 2021-09-25 14:44:55 -07:00
Christopher C. Wells 05c5b68d28 Remove link blank targets (let user decide) 2021-09-25 14:19:53 -07:00
Christopher Charbonneau Wells 4cf523dff0
Improve logo/favicon styling (#312)
* Update brand logo color (WIP)

Need more SVG hackery for proper transparency...

* Add SVG favicon (WIP)

👻

* Create transparent logo variant; use for brand icon

* Update primary color for all logo assets

* Add small white stroke to favicon

* Switch to SVG favicon
2021-09-25 14:16:48 -07:00
Christopher C. Wells 3f57b196b4 Disable secure cookies
This feature breaks login on non-HTTPs connections. Additional work needed.
2021-09-16 20:44:05 -07:00
Nick Trecina a844aa7613
Date picker changes (#304)
Only open datepicker on calendar click

Co-authored-by: Christopher C. Wells <git@chris-wells.net>
2021-09-16 20:29:47 -07:00
Christopher C. Wells c8d48945f2 Set `HttpOnly` flag on cookies 2021-09-16 19:37:04 -07:00
Christopher C. Wells 0e6a5cb08a Prevent caching of pages requiring authentication 2021-09-16 19:34:33 -07:00
Christopher C. Wells 45cb43958d Set default password policies in base settings 2021-09-16 19:14:48 -07:00
Christopher C. Wells 8ea68eed54 Default session and CSRF cookie setting to secure 2021-09-16 18:59:25 -07:00
Christopher C. Wells 956453b206 Add Portuguese to README 2021-09-16 18:53:46 -07:00
José Pedro Sousa 699c573162 Adding Portuguese Translation 2021-09-15 08:32:31 -07:00
Christopher C. Wells 53f249d1af Default to time in datetime picker
Closes #284
2021-09-03 20:46:12 -07:00
Christopher C. Wells 4b95ad48dc Adjust style of datetime picker trigger 2021-09-03 20:42:37 -07:00
Christopher C. Wells 690a270185 Replace datetime picker icons
Fixes #302
2021-09-03 20:17:38 -07:00
Christopher C. Wells bc1d4a707b Fix refresh icon name 2021-08-31 08:08:13 -07:00
Christopher C. Wells bafa1dec6e Separate "information" and "action" icons for small screens 2021-08-31 08:08:13 -07:00
Christopher C. Wells e1f20db2cb Update back/forward arrow icon classes 2021-08-31 08:08:13 -07:00
Christopher C. Wells 2c029d3579 Prevent top menus from line breaking on small screens 2021-08-31 08:08:13 -07:00
Christopher C. Wells 49aa852fe8 Fix activities icon spelling 2021-08-31 08:08:13 -07:00
Christopher C. Wells c850998b64 Remove deprecated `icon` base class usage 2021-08-31 08:08:13 -07:00
Christopher C. Wells d2decc03b6 Replace Font Awesome with a Fontello custom font 2021-08-31 08:08:13 -07:00
Christopher C. Wells 0990678325 Add basic timeline view (WIP) 2021-08-31 08:08:13 -07:00
Ohad Lutzky 5e4e3753e7 Nav items linking to timeline from dashboard
Fixes #271
2021-08-31 08:08:13 -07:00
Christopher C. Wells 4de006783e Create v1.8.3 release 2021-08-27 21:16:00 -07:00
Christopher C. Wells 32a6ea1960 Ensure datetimepicker is not behind submit button on mobile
Fixes #265
2021-08-27 20:57:27 -07:00
jcgoette 81fad7d30e add SECURE_PROXY_SSL_HEADER env arg option 2021-08-21 06:04:56 -07:00
Christopher C. Wells ee5f7a682a Create v1.8.2 release 2021-08-06 14:31:34 -07:00
Christopher C. Wells 359846fe57 Ensure default database name is set
Closes #279
2021-08-06 14:28:45 -07:00
Christopher C. Wells 5598482d53 Create v1.8.1 release 2021-08-06 09:01:29 -07:00
Christopher C. Wells ddf4c70739 Add support for DB config overrides to base settings
Closes #273
2021-08-06 08:52:51 -07:00
Christopher C. Wells 1aad600f6c Only use `SHORT_MONTH_DAY_FORMAT` with supported locales
Closes #276
2021-08-06 08:24:07 -07:00
Christopher C. Wells 4c9848ec4e Create v1.8.0 release 2021-08-05 07:39:38 -07:00
Christopher C. Wells f29269869c Only add sessions refresh data to existing sessions
Prior to change session were created for _every_ request (including API
requests).
2021-08-05 06:34:08 -07:00
Ohad Lutzky e2779c006f Hide child column if only one child is shown
Fixes #233
2021-08-04 08:47:56 -07:00
Christopher C. Wells 16c34ca7f0 Add test for custom date format 2021-08-01 04:42:38 -07:00
Christopher C. Wells 94cb7d771a Use short datetime string for lists 2021-08-01 04:42:38 -07:00
Christopher C. Wells c1dab44596 Use POST for timer quick add functionality 2021-07-31 13:56:48 -07:00
Christopher C. Wells 4673c2b8bd Move cookie secure attributes to example production settings 2021-07-31 05:56:29 -07:00
Christopher C. Wells d9f6c44f59 Add secure attribute to cookies 2021-07-31 05:56:29 -07:00
Christopher C. Wells eac0942acd Remove unsupported eb setting config 2021-07-31 05:56:29 -07:00
Christopher C. Wells 605660ff94 Only use full width submit on smaller screens 2021-07-19 20:55:30 -07:00
Christopher C. Wells f4134cd226 Make form submit full width fixed 2021-07-19 20:55:30 -07:00
Ohad Lutzky 798d7663fd Dashboard: Auto-refresh even if focus is supported
* No change if unsupported
* If supported, still auto-refresh at the selected frequency (if any),
  but only if not hidden.

This is useful for always-on displays (e.g. a "baby clock"). Fixes #253
2021-07-19 19:52:19 -07:00
Ohad Lutzky e2e2c8c43a
Brighten blue and cyan colors (#251)
For slightly easier viewing on mobile phones in daylight
2021-07-09 07:36:38 -07:00
Christopher C. Wells 67e78fec8c Bump version to v1.7.0 2021-07-07 20:14:17 -07:00
Christopher C. Wells 1689bc8e20 Refactor API key reset as part of settings form
This adds core CSRF protection to the reset functionality.
2021-06-21 21:27:45 -07:00
Christopher C. Wells 97b17447df Disable axes during tests 2021-06-21 20:47:57 -07:00
Christopher C. Wells 27ea845bbb Add basic log in brute force protection 2021-06-21 20:41:23 -07:00
Benjamin Häublein e8696a8b00
Dashboard: Hide old data (#215)
* filter card data by age

* add setting for hide_age

* add option to settings form

* fix name to consistently use hide_age

* rename filter, use setting for filter

* add test for old hiding old data

* fix migration to contain correct imports, remove month from timedelta

* remove months from timedelta, allow blank

* fix with block

* add settings test

* add test for filter

* mock localtime

* fix timezone issues with tests

* linting

* linting

* Adjust migration

Co-authored-by: Benjamin Häublein <benjaminh@debian.vm.hp>
Co-authored-by: Christopher C. Wells <git@chris-wells.net>
2021-06-19 14:09:05 -07:00
Christopher C. Wells 5a7b5f5e5c Add latest timezone migrations 2021-06-16 06:31:21 -07:00
Christopher C. Wells a9a1f17204 Update settings migration 2021-06-07 20:26:27 -07:00
Christopher Charbonneau Wells c8e1fee3e4
Replace Travis with GitHub Actions (#216)
* Replace Travis config with GitHub Actions config

* Use Coveralls GitHub Action

* Correct Coveralls flag name

* Try AndreMiras/coveralls-python-action@develop

* Prevent double-run on push to PRs

Closes #216.
2021-05-19 21:12:03 -07:00
Christopher C. Wells 25fb295d7b Bump version to v1.6.0 2021-05-13 20:37:31 -07:00
Benjamin Häublein 1dca1cc050
Add option for hiding empty dashboard cards (#213)
* add option for hiding empty dashboard cards

* rework add option for hiding empty dashboard cards

missed statistics.html

* don't exit early in cards

* add forms test for dashboard_hide_empty

* add tests for cards

* fix early exit in card_diaperchange_latest

* change dependency of migration

* rename migration

* introduce hiding of cards in templates

* linting

* add context to test_card_diaperchange_last

* setup MockUserRequest

* add context to all cards test cases

* add test for settings_dashboard_hide_empty_on

* change dashboard_hide_test, but it doesn't work

* add test for _user_wants_hide

* fix test_user_wants_hide user object, simpliy check for data['empty']

* add test for user_wants_hide to every card

* linting

* fix trailing whitespace

* rename user_wants_hide to hide_empty

* fix hidden statistics

* add user.refresh_from_db to test case, add test case for dashboard_refresh_rate

* Follow redirect and correct assertion

Co-authored-by: jcgoette <jcgoette@gmail.com>
Co-authored-by: Benjamin Häublein <benjaminh@debian.vm.hp>
Co-authored-by: Christopher C. Wells <git@chris-wells.net>
2021-05-13 20:28:39 -07:00
Christopher C. Wells 250e07e739 Set default timezone as UTC
The previous setting of "Etc/UTC" appears to no longer be valid in certain
circumstances. This was causes tests to fail on user settings because the
provided default was invalid. "UTC" should be more uniformly recognized so
hopefully this does not have any downstream effects.

Closes #203
2021-05-05 05:58:32 -07:00
Christopher C. Wells fe454013da Update Python dependencies and runtime 2021-04-11 12:49:15 -07:00
Christopher C. Wells 6fb958d6b3 Add Italian translations 2021-03-04 06:03:29 -08:00
Christopher C. Wells 5aae21cebe Bump version to 1.5.1 2021-02-25 06:01:28 -08:00