35 Commits

Author SHA1 Message Date
Greg Kaleka
e0fe6d61e1 Integrate Wagtail CMS and set up landing page structure (#2014) 2025-11-21 18:56:59 -05:00
Foo Bar
a55111ca74 Use display_name for "username" instead of first_name, last_name (#1640) (#1638) 2025-03-03 11:03:49 -08:00
Greg Kaleka
6b0fafd70e Profile Setting Option to receive email on material Privacy and Terms changes (#1418)
Fixes #986 

- Adds a new notification preference to the existing `Preferences` model
and associated form.
- Adds data migration to populate the new preference
- Adds a new test and modifies several others to reflect the new
preference and its behavior

Note the ability to actually send notification will be added
post-launch. If the need comes up in the meantime, it would be
straightforward to manually trigger a notification to opted-in users.

### Manual testing
UI
<img width="553" alt="Screenshot 2024-11-06 at 9 52 52 AM"
src="https://github.com/user-attachments/assets/e7d8ef21-8e21-4fe4-81b0-2e401d10203f">

Data
<img width="478" alt="Screenshot 2024-11-06 at 10 35 11 AM"
src="https://github.com/user-attachments/assets/44237931-05dd-4c38-972f-057321c93945">

---------

Co-authored-by: Greg Kaleka <gkaleka@energy-solution.com>
2024-11-06 12:35:07 -05:00
daveoconnor
274777a2e6 Track user last login option and fixes (#1312)
This also hides the pop up notifications after 6 seconds

For review, a review and merge of #1311 on which this is built would
make this easier to review.
2024-10-04 10:23:25 -07:00
Brian Perrett
45a3fa7870 Create an avatar tag to be usable anywhere we need an avatar. (#1298)
- fixes https://github.com/boostorg/website-v2/issues/1285
- Use a django tag to render an avatar component.
2024-09-27 15:30:46 -07:00
Lacey Williams Henschel
bdb4af609c Rename user profile photo filename when uploaded
- Add cached property to get user image filename root
- Rename new profile photo in form, update test
2023-12-12 14:13:24 -08:00
Greg Newman
cdc2824afe 🐛 skip user views tests 2023-12-05 09:35:09 -05:00
Lacey Williams Henschel
1148248452 Delete old image file when user uploads new image 2023-11-08 16:06:56 -08:00
Lacey Williams Henschel
7507fa50b3 Limit file types of user and news images
- Add file type validator
- Apply validator to user image
- Save validator class to variable
- Add image validator to news image model field
- Add file size validator
- Enable file size validator on news and user model image fields
- Fix test
2023-11-03 10:21:36 -07:00
Lacey Williams Henschel
73c310fd1c Mark users as claimed when they reset passwords
from key

Mark users as claimed when they reset password from profile page

Add method to claim user, and use that method instead

Add docs on unclaimed user accounts
2023-10-06 08:10:30 -07:00
Lacey Williams Henschel
db542663fb Allow user to claim account via password reset when trying to connect via social auth 2023-10-05 06:18:26 -07:00
Lacey Williams Henschel
69565648b0 Remove preferences url, old profile templates 2023-08-08 12:19:46 -07:00
Lacey Williams Henschel
ebe07d249e Remove old profile page 2023-08-08 12:19:46 -07:00
Lacey Williams Henschel
ff193d9811 Add first name, last name, and email to profile form 2023-07-28 10:13:06 -04:00
Lacey Williams Henschel
ea2b45b49e Add a single-page profile update form
- Add password reset form to single-page profile
- Add profile photo form to single-page profile
- Add button to import photo from GitHub
- Add preferences form to single-page profile
- Add tests for unauthenticated/authenticated users
- Add tests that forms are present
- Add tests that the forms submit, without changing other data
2023-07-26 15:08:06 -04:00
Natalia
36a61d064a Send emails when a news is posted (using notification preferences accordingly). 2023-06-22 19:23:16 -03:00
Natalia
06cd04f263 Expose view for user preferences (email notifications so far).
Added tests for the new form and view for updating user preferences.
2023-06-20 12:24:40 -03:00
Natalia
80eae90184 Initial model for User's preferences, specifically for email notifications.
Part of #343. The news' notifications module was also changed to the user
preferences is honored when sending news emails.

Also exclude migrations from the black check.
2023-06-16 13:00:16 -03:00
Natalia
e2d2dd9ed2 Revert removal of imports 2023-05-30 23:21:53 -03:00
Natalia
a8cd8f507a Ran pre-commit run -a
Completed runs of black and rest of pre-commit checks.
2023-05-30 23:21:53 -03:00
Lacey Williams Henschel
5de95a9a4f Test that email signup works 2023-04-28 16:11:47 -07:00
Lacey Williams Henschel
f1095f031a 🏦 Add display_name field and property to User model
- Add a display_name field to the User model
- Implement get_display_name property to return display_name, full name, or a single name, depending on the available information
- Add tests for the get_display_name property
2023-03-28 10:44:40 -07:00
Lacey Williams Henschel
f64c2ad405 📝 Changes find_user method to find_contributor 2023-03-21 10:42:55 -07:00
Lacey Williams Henschel
6346497b04 📝 Match contributors by name when uploading
Reduces the duplicates by a lot. Some still remain, mostly related to differences in spelling (Jeff versus Jeffrey) or differences in diacritical marks.
2023-03-15 12:31:45 -07:00
Lacey Williams Henschel
f8d2910c1d 👕 Linter 2023-03-09 12:23:12 -08:00
Lacey Williams Henschel
37d6dbbb76 Add method to create stub user 2023-03-09 12:17:18 -08:00
Lacey Williams Henschel
5c7e39370c Allow user to update photo to their GH photo 2023-03-02 09:59:34 -08:00
Lacey Williams Henschel
85c2dfa650 Add task to update github photo 2023-03-02 09:19:25 -08:00
Lacey Williams Henschel
7791706ee5 User can upload their own profile photo 2023-02-22 12:58:18 -08:00
Lacey Williams Henschel
f2a0da771e Add signal for saving profile data upon a new GH login
I did skip the tests -- my first tries with `patch` didn't work and I wanted to have this working for the demo, at least locally.
2023-02-16 15:22:06 -08:00
Lacey Williams Henschel
59a72c9a9a 👕 Linter 2023-02-15 14:44:28 -08:00
Lacey Williams Henschel
0e452aaa5a 🏦 Add user profile image 2023-02-15 14:12:48 -08:00
Lacey Williams Henschel
80743c8a70 👚 Add tests and lint 2022-11-29 12:18:59 -08:00
Frank Wiles
29878c3f90 Rework versions models
- Added ListView and DetailView
- Move to pytest style tests
- Fix migrations to be clean to rebuild and throw away existing data
- Add model_bakery
2022-05-28 16:00:24 -05:00
GabbyPrecious
0ca0a0b9ac alphakit setup 2021-10-09 09:53:46 +01:00