CSS (forms) refactoring
* All forms now use the render_field helper.
* CSS is now compiled using PostCSS.
* Common form styles got extracted to more reusable & flexible classes.
Closes#12.
Co-authored-by: Wojciech Kwolek <wojciech@kwolek.xyz>
Reviewed-on: https://git.r23s.eu/wojciech/doneth.at-backend/pulls/13
add a script to pre-fill the timezone on the registration page
add created_on, copy values from accomplishment.time, normalize accomplishment.time
make the start_of_day and timezone migration work on pre-existing databases
Switched the code to use the Day class everywhere.
* Removed timeutils.py.
* Added from_str method to the Day class.
* Implemented __add__ and __sub__ operators for the Day class.
You can now get the next day by writing `day + 1` (or any other
integer.)
* Fixed Day.today: it used to take the "self" argument, despite being
a static method.
* Made the settings view use pytz.all_timezones instead of
pytz.common_timezones, to make sure everyone's included.
Made Day class aware of the user's settings.
It now takes the start-of-day hour and the timezone from the user's
profile.
Moreover, equality and comparison operators were implemented, as well as
__repr__.
Implemented is_today and is_future.
implement saving the settings form
Added settings templates + cosmetics
* Refactored render_field to support SelectFields to avoid code
duplication
* Introduced the /settings route, the logic for which the logic is not
yet implemented
* Fixed missing > in one of the favicon <link>s in <head>
* Added a Home and Settings link to the navigation area in the header
* Made the card width consistent (login/logout/register used to be less
wide than the other views)
* Centered the "Are you sure you want to log out?" text
added timezone selector to registration
basic implementation for getting the current day for the user
initial implementation of the new Day class
Co-authored-by: Wojciech Kwolek <wojciech@kwolek.xyz>
Reviewed-on: https://git.r23s.eu/wojciech/doneth.at-backend/pulls/11
Squashed commit of the following:
commit 97029311b8
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 22:29:53 2020 +0200
allow editing accomplishments
commit 199462a9a6
Merge: d094e324f1b750
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 21:48:09 2020 +0200
Merge branch 'master' into feature/edit
commit d094e321c7
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 20:59:53 2020 +0200
implement deleting accomplishments
commit 5c33caba1b
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 17:33:12 2020 +0200
add edit buttons to the day view
commit 6cc826c5cb
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 16:38:35 2020 +0200
add __pycache__ to gitignore
commit 1593e4c6cf
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 16:35:40 2020 +0200
extract a method for getting all day related data for a template
Squashed commit of the following:
commit 846aa01f3b
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 21:02:58 2020 +0200
remove unimplemented edit link
commit d094e321c7
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 20:59:53 2020 +0200
implement deleting accomplishments
commit 5c33caba1b
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 17:33:12 2020 +0200
add edit buttons to the day view
commit 6cc826c5cb
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 16:38:35 2020 +0200
add __pycache__ to gitignore
commit 1593e4c6cf
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Mon Aug 31 16:35:40 2020 +0200
extract a method for getting all day related data for a template
Allow browsing historical accomplishments.
Created a timeutils module, which contains all time-related logic, to
allow easier extension later (for when I'll be implementing timezones
and custom day-start hours)
show today's accomplishements on the main page
extract main.handle_accomplishment_submission function
handle adding new accomplishments to the database
add header and add accomplishment UI
extract .card css component
add Accomplishment model
Co-authored-by: Wojciech Kwolek <wojciech@kwolek.xyz>
Reviewed-on: https://git.r23s.eu/wojciech/doneth.at-backend/pulls/1
Squashed commit of the following:
commit 4e6ba2b6b8
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Sat Aug 29 13:59:50 2020 +0200
Implement registering, log in an out logic. Show errors in the forms.
commit d1c1ab6756
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Fri Aug 28 13:39:12 2020 +0200
add login form
commit 0b643968c7
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Fri Aug 28 13:14:32 2020 +0200
add tailwindcss and sign-up form template
commit 65c49de0f5
Author: Wojciech Kwolek <wojciech@kwolek.xyz>
Date: Thu Aug 27 19:38:35 2020 +0200
add db with migrations, add User model and signup form class