Skip to content

Commit

Permalink
Merge branch 'main' into INTR-394
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLamb committed Dec 9, 2024
2 parents ac7b226 + deb59ab commit de97c9c
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 59 deletions.
3 changes: 2 additions & 1 deletion .copilot/image_build_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Exit early if something goes wrong
set -e
export DJANGO_SETTINGS_MODULE=config.settings.build

echo "Running post build script"

Expand All @@ -11,7 +12,7 @@ mv ".env.ci" ".env"
cd src

echo "Running collectstatic"
python manage.py collectstatic --settings=config.settings.build --noinput
python manage.py collectstatic --noinput

echo "Renaming .env to .env.ci"
cd ../
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ services:
- opensearch

wagtail:
env_file: ".env"
build:
context: .
cache_from:
Expand Down
33 changes: 28 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions src/content/templates/content/navigation_page.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{% extends "dwds_content.html" %}
{% load wagtailcore_tags %}

{% block body_classes %}dwds-body dwds-navigation-page{% endblock %}
{% block primary_content_classes %}
content-stack large
{% endblock primary_content_classes %}

{% block page_title %}
<div class="content-sidebar-right flex-end">
<div class="content-sidebar-right">
<h1>{{ page.title }}</h1>
<div>
<div class="dwds-title-question">
{% include "feedback.html" with form_id="hr-v1" classes="" prefix="navigation-page" custom_submit_data_function="navigationFeedbackData" %}
</div>
</div>
{% endblock page_title %}

{% block primary_content %}
<div class="content-grid grid-cards">
{% for block in page.primary_elements %}
<div class="dwds-content-item-card">{% include_block block %}</div>
{% endfor %}
<div class="content-stack">
<div class="content-grid grid-cards">
{% for block in page.primary_elements %}
<div class="dwds-content-item-card">{% include_block block %}</div>
{% endfor %}
</div>
</div>
{% endblock primary_content %}

Expand Down
5 changes: 5 additions & 0 deletions src/dw_design_system/dwds/components/cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
{% if description %}<p>{{ description }}</p>{% endif %}
{{ extra_content }}
</div>
{% if footer_text %}
<div class="content-footer content-stack">
<p>{{ footer_text }}</p>
</div>
{% endif %}
</div>
4 changes: 4 additions & 0 deletions src/dw_design_system/dwds/utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@
// a user unintentionally copying more text than they intended and needing to
// manually trim it down again.
user-select: none;
}

.dwds-title-question {
align-self: center;
}
34 changes: 13 additions & 21 deletions src/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,31 @@


def initialize_debugpy():
import debugpy

try:
import debugpy
except ImportError:
sys.stdout.write(
"debugpy is not installed, please install it with: pip install debugpy\n"
)
return

if not os.getenv("RUN_MAIN"):
debugpy.listen(("0.0.0.0", 5678))
sys.stdout.write("debugpy listening on port 5678...\n")
except Exception as exc:
sys.stderr.write(f"Failed to initialize debugpy: {exc}\n")


def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.prod")
from django.conf import settings

if settings.DEBUG and settings.ENABLE_DEBUGPY:
initialize_debugpy()

try:
from django.core.management import execute_from_command_line
except ImportError:
try:
import django
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == "__main__":
ENABLE_DEBUGPY = os.getenv("ENABLE_DEBUGPY")
if ENABLE_DEBUGPY and ENABLE_DEBUGPY.lower() == "true":
initialize_debugpy()
main()
4 changes: 4 additions & 0 deletions src/peoplefinder/services/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
AuditLogService,
ObjectRepr,
)
from peoplefinder.services.team import TeamService
from peoplefinder.tasks import notify_user_about_profile_changes, person_update_notifier
from peoplefinder.types import EditSections, ProfileSections
from user.models import User
Expand Down Expand Up @@ -299,6 +300,9 @@ def profile_updated(
# Notify external services
person_update_notifier.delay(person.id)

for team_id in person.roles.all().values_list("team__pk", flat=True).distinct():
TeamService().clear_profile_completion_cache(team_id)

def profile_deletion_initiated(
self, request: Optional[HttpRequest], person: Person, initiated_by: User
) -> None:
Expand Down
Loading

0 comments on commit de97c9c

Please sign in to comment.