Commit Graph

467 Commits

Author SHA1 Message Date
Marco H 603a429c13 Allow end of feeding to be in the future 2022-05-08 16:37:42 -07:00
Christopher C. Wells 379f9b1e86 Move tag widget customizations to form classes
This allows the custom tag widget to function normally in Baby Buddy's
frontend without breaking behaviors in the Django admin forms. The previous
setup would prevent the standard tag editor behavior from working in the
Django admin and give incorrect help text.
2022-04-16 14:59:28 -07:00
Christopher C. Wells 09e0853067 Add single tag filter support to core views 2022-04-16 13:42:29 -07:00
Christopher C. Wells 50339e1c71 Put core models views in alpha order 2022-04-16 13:29:40 -07:00
Marco H 123a0192ce Fix test 2022-04-15 20:56:34 -07:00
Marco H 3eba917b08 Allow diaper change without any contents (fixes #426) 2022-04-15 20:56:34 -07:00
jcgoette 5ba95b8cae migrate 2022-04-15 20:17:26 -07:00
jcgoette 807ba37de8 default date and time to now 2022-04-15 20:17:26 -07:00
jcgoette 2e5014f2c3 isort 2022-04-15 20:17:26 -07:00
jcgoette b62cb47130 remove unused imports 2022-04-15 20:17:26 -07:00
bugbountyguy 0d89574a65 Fix lint issues 2022-04-04 20:39:39 -07:00
bugbountyguy b21c193488 Add pumping migration 2022-04-04 20:39:39 -07:00
bugbountyguy 254e796020 Add migration 2022-04-04 20:39:39 -07:00
bugbountyguy 9b4bbef5bf Change reading to entry and other PR feedback 2022-04-04 20:39:39 -07:00
bugbountyguy 8b5c3eb5b9 Make gulp lint happy 2022-04-04 20:39:39 -07:00
bugbountyguy 4ceb6095d3 Rename breastpump to pumping 2022-04-04 20:39:39 -07:00
bugbountyguy b9e98b16a2 Fix lint errors 2022-04-04 20:39:39 -07:00
bugbountyguy 5c45b037f0 Finish up adding the brestpump measurement 2022-04-04 20:39:39 -07:00
bugbountyguy 44648ce33b add tests 2022-04-04 20:39:39 -07:00
Christopher C. Wells 97b1b8d9ce Add tag filtering to supported models in admin 2022-04-04 20:08:13 -07:00
Christopher C. Wells 4255dd61ef Add missing admin classes 2022-04-04 20:08:13 -07:00
Christopher C. Wells bdc28991cb Add basic import/export support for tags 2022-04-04 20:08:13 -07:00
Christopher C. Wells 1398239ecf Fix verbose name of Tags model 2022-04-03 16:42:23 -07:00
Paul Konstantin Gerke 5446c5a02c Add tags to timeline and all list views 2022-03-08 19:16:18 -08:00
Paul Konstantin Gerke 4919222d41 Rendering tag lists with templates 2022-03-08 19:16:18 -08:00
Paul Konstantin Gerke 3fa652cc25 Simple rendering of tags in lists 2022-03-08 19:16:18 -08:00
Paul Konstantin Gerke ce21f39ec7 Add tags to most things except: Timers and Children 2022-03-08 08:35:27 -08:00
Paul Konstantin Gerke b431c27835 Add color widget to the admin-UI 2022-03-08 12:55:50 +01:00
Paul Konstantin Gerke 98b0072634 Black 2022-03-08 12:01:51 +01:00
Paul Konstantin Gerke b8e7d31ded Add help text with short explanation how to use the tag editor 2022-03-08 12:01:12 +01:00
Paul Konstantin Gerke 7d8ead594c Add api tests 2022-03-06 19:47:47 +01:00
Paul Konstantin Gerke 5f23eecb84 Black 2022-03-06 18:31:29 +01:00
Paul Konstantin Gerke d0469caed5 Add missing notes-test (includes tests for tags-feature) 2022-03-06 18:30:58 +01:00
Paul Konstantin Gerke 7af66176aa Black 2022-03-05 13:09:08 +01:00
Paul Konstantin Gerke b27cf6c4b8 Black 2022-03-05 13:01:59 +01:00
Paul Konstantin Gerke 7bbaee1f80 Fix verbose_name for fields, update migrations 2022-03-05 13:01:28 +01:00
Paul Konstantin Gerke f31dbaf15c Add verbose_name for a bunch all new model-fields 2022-03-05 12:57:50 +01:00
Paul Konstantin Gerke 2c408ea479 Add docstrings 2022-03-05 12:47:16 +01:00
Paul Konstantin Gerke e5279f2d7a Fix tests 2022-03-02 23:31:11 +01:00
Paul Konstantin Gerke 8a37b44839 Black 2022-03-02 22:38:25 +01:00
Paul Konstantin Gerke db140cff98 Black 2022-03-02 22:31:35 +01:00
Paul Konstantin Gerke 4f325ba07b Remove BabyBuddy prefix from Tags-model 2022-03-02 21:53:51 +01:00
Paul Konstantin Gerke a35df92fe2 Code review comments 2022-02-27 21:12:01 +01:00
Paul Konstantin Gerke c665ebb181 Applied black 2022-02-27 20:36:31 +01:00
Paul Konstantin Gerke 3ac21ed67b Linting 2022-02-27 20:00:12 +01:00
Paul Konstantin Gerke cfdb9e1ade Made widget translateable, added German translation 2022-02-27 19:41:27 +01:00
Paul Konstantin Gerke a7f461551c Remove default help_text from tag editor 2022-02-27 17:42:01 +01:00
Paul Konstantin Gerke f1aa7c151c Replaced alert with bootstrap-modal 2022-02-27 02:19:19 +01:00
Paul Konstantin Gerke 332a5999bc Adding/removing tags works again 2022-02-26 15:50:38 +01:00
Paul Konstantin Gerke 747b398bd5 Create new javascript file for tags editor 2022-02-22 19:40:27 +01:00
Paul Konstantin Gerke f47d3c6b76 Implement last_used 2022-02-20 12:40:06 +01:00
Paul Konstantin Gerke 4fd55124f4 Basically everything works :) 2022-02-20 12:15:04 +01:00
Paul Konstantin Gerke c397836e68 Add dynamic tag creation 2022-02-18 00:22:01 +01:00
Paul Konstantin Gerke 5046b754e5 Add api-serializer 2022-02-15 22:24:13 +01:00
Paul Konstantin Gerke 56ebbd3181 Fix storing of tags 2022-02-15 15:46:07 +01:00
Paul Konstantin Gerke bf49cc92ad Initial (bugged) work on tag editor 2022-02-15 10:13:35 +01:00
Christopher C. Wells cd946280cb Format code with black 2022-02-09 16:00:30 -08:00
Paul Konstantin Gerke 8275d18d6c Fix linting 2022-01-17 07:27:07 -08:00
Paul Konstantin Gerke d34814260f Alternative implementation for item ordering 2022-01-17 07:27:07 -08:00
Paul Konstantin Gerke 847125b1c6 Add literal ordering of timeline object types
Makes it so that timline items registered at the same moment are
always ordered "start->end", not "end->start".

Signed-off-by: Paul Konstantin Gerke <paulkgerke@craftware.info>
2022-01-17 07:27:07 -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 648d46dc94 Adjust migrations 2021-12-31 09:19:53 -05: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
Marcelino Alberdi Pereira 89ed408acc
Make last name optional (#361) 2021-12-29 16:41:39 -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 457598e3da Translate untranslated strings
Fixes #352
2021-12-18 13:45:05 -05:00
Christopher C. Wells e13f00e024 Force AM/PM for en-GB 12H setting combination 2021-11-28 15:51:51 -05:00
Marcelino Alberdi Pereira 462459964c Add notes to child timeline 2021-11-20 18:16:10 -05:00
Christopher C. Wells 09714f5810 Update Python dependencies 2021-11-13 06:07:08 -08:00
Christopher C. Wells c215ad9d0f Ensure overridden Sleep.save() is run on migration 2021-10-30 10:47:44 -07:00
codisart c33ace2bf9 feat(sleep): #323 Add napping field to the sleep model 2021-10-30 07:16:37 -07:00
Christopher C. Wells 774504bce2 Prevent potential sleep entry intersection errors in tests 2021-10-26 19:55:16 -07:00
Christopher C. Wells 0e6a5cb08a Prevent caching of pages requiring authentication 2021-09-16 19:34:33 -07:00
Nicholas Trecina fc8b230928 Selecting one of the breast feeding methods will auto select breast milk as the type 2021-09-09 04:45:32 -07:00
Christopher C. Wells 0a74061a7a Remove readonly state from datetime picker fields (#284) 2021-09-03 20:38:15 -07:00
Christopher C. Wells 83b9177dbe Add basic timeline page load test 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 8fd9680284 Update existing test for icon class changes 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 10af931279 Populate the all-children timeline 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
Christopher C. Wells fad8f1500e Make entry intersection check exclusive
Closes #263
2021-08-17 05:59:08 -07:00
Ohad Lutzky 3922966815 Add date-nav to bottom
Only if date has any events (otherwise no scrolling is necessary)

Fixes #229
2021-08-11 14:27:26 -07:00
Ohad Lutzky 5bc98bd7f0 Show notes in timeline
For Tummy Time, show milestone instead

Fixes #272
2021-08-11 06:11:42 -07:00
Ohad Lutzky 508292317f Add "time since previous" to feedings in timeline
Fixes #266
2021-08-07 20:24:29 -07:00
Ohad Lutzky ce507761cd Split get_objects to short functions 2021-08-07 20:24:29 -07:00
Christopher C. Wells 858436e840 Convert passed datetime object to localetime
Closes #274
2021-08-06 08:33:41 -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
Ohad Lutzky 207a5bc236 Move Actions column to far left
This allows the columns to be ordered in a descending order of
importance from left to right, reducing scrolling.

Also un-center the column, as it is now flush to the left.

Fixes #236
2021-08-04 14:59:28 -07:00
Ohad Lutzky e2779c006f Hide child column if only one child is shown
Fixes #233
2021-08-04 08:47:56 -07:00
Ohad Lutzky 20538ce59d Unify "wet" and "solid" columns
Note that change is always at least either wet or solid.

Fixes #235
2021-08-03 19:17:51 -07:00
Christopher C. Wells 51c70c1746 Fix linting issue 2021-08-01 04:42:38 -07:00
Christopher C. Wells 273c365bef Add test for short datetime template tag 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 58acccfddb Use short datetime string for lists (WIP) 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 824d2af0da Correct method names 2021-07-31 13:16:50 -07:00
Christopher C. Wells c873f84a2c Return to timer detail on delete cancel 2021-07-31 13:15:23 -07:00
Christopher C. Wells c2513ff843 Use POST for timer stop and restart operations 2021-07-31 13:11:21 -07:00
Ohad Lutzky 411641903f
Move Time column to be first in list view (#250)
Fixes #232
2021-07-09 19:32:53 -07:00
Ohad Lutzky beaf366079
Show duration in timeline (#247) 2021-07-09 13:45:07 -07:00
Ohad Lutzky 73a04af9b2
Timeline: Add edit links (#246)
* Timeline: Show diaper change details

* Timeline: Add edit links

Suggested in #229

Co-authored-by: Christopher Charbonneau Wells <10456740+cdubz@users.noreply.github.com>
2021-07-07 20:09:22 -07:00
Ohad Lutzky 8861933738 Timeline: Show diaper change details 2021-07-07 19:54:43 -07:00
Ohad Lutzky 2a7402283c Clarify "no events" on timeline
Suggested in #229
2021-07-06 20:38:31 -07:00
Ohad Lutzky e3b6f79c09 Show feeding amount on timeline 2021-07-05 12:51:05 -07:00
Christopher C. Wells a2da7e32f9 Disable autocomplete on datetime form fields (#224)
The actual issue here is that the readonly property is no longer working. This
should be fixed in a separate commit.
2021-06-19 15:20:03 -07:00
jcgoette a33b0cadff default feeding start to now 2021-06-19 14:17:34 -07:00
jcgoette 0001281d66 default last feed method if not left/right breast 2021-06-19 14:17:34 -07:00
Christopher C. Wells 71da84a47b Add missed migration from #206 2021-06-07 20:26:15 -07:00
Beni Cherniavsky-Paskin 29ef9f4f75 child slugs: allow unicode
This results in %-encoded URLs, but modern browsers display the unicode
chars (e.g. https://babybuddy.../children/мааян-паскин-чернявский).
2021-04-30 14:47:08 -07:00
Beni Cherniavsky-Paskin f58571bf17 child slugs: require non-blank
Currently it is easy for a child with non-ascii name to get empty slug:
'Мааян' 'Паскин-Чернявский' => '-'
'Мааян' 'Паскин' => ''

Once any child has an empty slug, many pages break with NoReverseMatch
errors.  This commit at least prevents setting such names;
slug computation to be fixed later.
2021-04-30 14:47:08 -07:00
Christopher C. Wells dadb84ec6a Add migrations 2021-04-15 05:45:25 -07:00
0x4161726f6e f4b9053c00 Add solid food option to feeding types
I would find this helpful as I coordinate with day care
2021-04-15 05:45:25 -07:00
Christopher C. Wells e27f7b76a0 Use Django 3.2 timesince depth parameter for child age 2021-04-11 13:35:07 -07:00
Christopher C. Wells b009a0bebc Revert timesince chunks after monkey patch (fixes #181) 2021-01-03 19:08:11 -08:00
Christopher C. Wells 95a2cdf06d Use day precision for child age (#167) 2020-10-25 20:06:21 -07:00
Christopher C. Wells 3f0694dc9d Make datetime editable for Note model
Closes #151
2020-08-12 19:47:58 -07:00
Christopher C. Wells 7abe7b2a5f Add test for USE_24_HOUR_TIME_FORMAT (#148)
Note: this new test has been tagged "isolate" and excluded from regular tests
because the locale behavior being tested involves Django internals that must
be handled at initialization and cannot be changed during runtime (i.e. this
new test with PASS when run alone, but FAIL when run with other tests).

A future commit or set of commits should come up with a way to execute all
tests tagged "isolate" in isolated test environments as part of the full test
suite. For now, this test simply does not run until it is run manually.
2020-07-22 21:56:29 -07:00
Christopher C. Wells 8f3f8e5104 Add tests for template tag (#148) 2020-07-22 20:16:23 -07:00
Christopher C. Wells 4d71f9c5ec Add 24 hour time format override support to input fields (#148) 2020-07-21 22:03:08 -07:00
Christopher Charbonneau Wells cbf6f0ce1e
Fix minor linting issues 2020-03-30 05:25:57 -07:00
Peter Hardy dfd89ae339 Tests for initial feeding methods (#127) 2020-03-28 21:54:07 +11:00
Peter Hardy 4581722e0b Actually check for FBM as well (#127). 2020-03-26 22:28:27 +11:00
Peter Hardy dce0cd1e10 Update method select for when formula types selected (#127) 2020-03-26 22:16:07 +11:00
Peter Hardy 4978208d7f Prepopulate method for formula types (#127). 2020-03-26 22:15:08 +11:00
Christopher C. Wells d0b33c2b1b Use user first and last name, when available, in UI 2020-02-18 14:41:33 -08:00
Christopher C. Wells 2346995cb3 Remove bottle-formula validation test
This is not really necessary and only serves as validation that will need to updated if model choices ever change.
2020-02-18 14:41:33 -08:00
Christopher C. Wells 959649f5f7 Add data import tests 2020-02-18 14:41:33 -08:00
Christopher C. Wells 8c64dd8cae Configure support for imports 2020-02-18 14:41:33 -08:00
Christopher C. Wells e81d3c100c Fix linting issues 2020-02-18 14:41:33 -08:00
Christopher C. Wells 796ba1ae7f Exclude duration (calculated) from model exports 2020-02-18 14:41:33 -08:00
Christopher C. Wells c9f39437c2 Add child name data to exports 2020-02-18 14:41:33 -08:00
Christopher C. Wells 014b373a78 Add initial basic admin import/export support 2020-02-18 14:41:33 -08:00
Christopher C. Wells 37fc8aa5a8 Update list templates to include notes 2020-02-16 15:09:57 -08:00
Christopher C. Wells f681c579e5 Add missing `form_class` value to core model update forms 2020-02-16 15:09:57 -08:00
Christopher C. Wells 11164f0cd0 Set notes textarea to 5 rows 2020-02-16 15:09:57 -08:00
Christopher C. Wells e3c2f0c0b9 Implement example notes handling in Diaper Change list 2020-02-16 15:09:57 -08:00
Christopher C. Wells 48a0093700 Add general notes to most models 2020-02-16 15:09:57 -08:00
Christopher C. Wells 60cd90ca80 Use `last()` instead of `latest()`
With `latest()`, an exception is thrown if there is one child in the database and no feeding entries.
2020-02-08 14:02:47 -08:00
Christopher C. Wells af710b977a Add tests for inactive Timer delete functionality 2020-02-06 21:50:22 -08:00
Christopher C. Wells 127c3d5cb0 Add ability to delete all inactive Timers (#108) 2020-02-06 21:15:36 -08:00
Christopher C. Wells 005a4f180e Correct timer urls to use plural form 2020-02-06 20:14:01 -08:00
Christopher C. Wells 6333b0b1ea Move add button to header in list views 2020-02-06 20:09:24 -08:00
Christopher C. Wells 703782b21c Use provided `end` in Timer.stop() (#111) 2020-02-06 19:56:26 -08:00
Christopher C. Wells 17ed16bc8b Hide Child from Timer detail in one child use cases 2020-01-31 12:01:17 -08:00
Christopher C. Wells 05266d4b76 Mute child name on timer detail 2020-01-31 09:09:01 -08:00
Christopher C. Wells 8c28e8941e Update admin fields for core Timer model 2020-01-31 09:09:01 -08:00
Christopher C. Wells 6ba6e429cd Add core Timer tests 2020-01-31 09:09:01 -08:00