15 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
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
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
Natalia
36a61d064a Send emails when a news is posted (using notification preferences accordingly). 2023-06-22 19:23:16 -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
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
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
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
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