Conversation
Profile data existed but was only reachable by its owner, so a curator seeing an artwork had no way to find out anything about the person who made it. Adds users/<username>/, reusing the existing profile page with the edit and delete controls gated behind is_owner, and turns the usernames in the marker, object, sound and artwork modals and on exhibit cards into links to it. Email addresses are deliberately not shown; see the PR for the reasoning. Closes #255 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXUw7kyELDu8ycGQxtaFbb
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Profiles existed but only their owner could reach one, so a curator looking at an artwork had no way to learn anything about the person who made it — which is the gap the issue describes.
This adds
users/<username>/. It reuses the existing profile page rather than building a second one: the edit and delete controls were hardcoded aseditable=true, deletable=true, and are noweditable=is_owner, deletable=is_owner, so a visitor sees the same content with no actions they could not perform. The owner visiting their own public URL still gets the controls.Usernames now link there from the marker, object, sound and artwork modals, and from exhibit cards.
Resolves (Issues)
Closes #255
General tasks performed
_profile_context()and_profile_queryset()fromprofile(), and addedpublic_profile()usingget_object_or_404.path("<str:username>/", ...)last inusers/urls.py, with a comment saying why — it matches any single segment, so every literal route has to resolve before it.src/users/tests/test_public_profile.py— 8 tests.One deliberate omission
The issue asks for e-mail addresses on the page, and I did not add them. Publishing a user's e-mail on a page anyone can fetch by guessing a username is a scraping target and a privacy problem the users never opted into. If the goal is "a curator can reach the author", the right shape is a contact form that relays the message, or a per-user opt-in — both worth their own issue.
test_the_page_does_not_expose_the_email_addresslocks the current behaviour so this cannot regress by accident.Two things worth flagging
A username can be empty in existing data. My first version rendered the link unconditionally and 500'd on a marker whose owner had an empty username —
NoReverseMatch— which the existingtest_api_markersmodal tests caught. The link is now conditional, andtest_marker_modal_renders_when_the_owner_has_no_usernamecovers it. Removing the guard makes that test fail, so it does exercise the path. It may be worth a separate look at why users with empty usernames exist.A user literally named
profilewould be shadowed by the existingprofile/route. Left as-is rather than adding a reserved-name check, but say the word and I will.Verification: full suite
pytest src/core src/users src/blogpasses — 279 passed.Have you confirmed the application builds locally without error? See here.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HXUw7kyELDu8ycGQxtaFbb
Generated by Claude Code