Allow “@” in user names in URLs. #34

Closed
opened 2023-05-02 01:42:42 +02:00 by anselm · 4 comments
anselm commented 2023-05-02 01:42:42 +02:00 (Migrated from gitlab.anselms.net)

Sentry Issue: ACE4-1W

NoReverseMatch: Reverse for 'profile-view' with keyword arguments '{'username': 'hedleyd2002@yahoo.co.uk'}' not found. 1 pattern(s) tried: ['profile/(?P<username>[-a-zA-Z0-9_]+)/\\Z']
(44 additional frame(s) were not displayed)
...
  File "ace4/db/templatetags/db_extras.py", line 42, in render
    self.nodelist.render(context)
  File "ace4/db/templatetags/db_extras.py", line 106, in render
    tab['content'] = self.nodelist.render(context)

Django officially allows @ and + in user names now, presumably so it is easier to use e-mail addresses as user names. This means that it is no longer possible to use <slug:username> in URLs, because slugs cannot contain @ or +.

Sentry Issue: [ACE4-1W](https://sentry.strathspey.org/organizations/strathspey/issues/147/?referrer=gitlab_integration) ``` NoReverseMatch: Reverse for 'profile-view' with keyword arguments '{'username': 'hedleyd2002@yahoo.co.uk'}' not found. 1 pattern(s) tried: ['profile/(?P<username>[-a-zA-Z0-9_]+)/\\Z'] (44 additional frame(s) were not displayed) ... File "ace4/db/templatetags/db_extras.py", line 42, in render self.nodelist.render(context) File "ace4/db/templatetags/db_extras.py", line 106, in render tab['content'] = self.nodelist.render(context) ``` Django officially allows `@` and `+` in user names now, presumably so it is easier to use e-mail addresses as user names. This means that it is no longer possible to use `<slug:username>` in URLs, because slugs cannot contain `@` or `+`.
anselm commented 2023-05-02 01:43:09 +02:00 (Migrated from gitlab.anselms.net)

assigned to @anselm

assigned to @anselm
anselm commented 2023-05-02 01:43:41 +02:00 (Migrated from gitlab.anselms.net)

created branch 34-allow-in-user-names-in-urls to address this issue

created branch [`34-allow-in-user-names-in-urls`](/strathspey/ace4/-/compare/main...34-allow-in-user-names-in-urls) to address this issue
anselm commented 2023-05-02 01:45:01 +02:00 (Migrated from gitlab.anselms.net)

mentioned in merge request !7

mentioned in merge request !7
anselm commented 2023-05-02 01:50:27 +02:00 (Migrated from gitlab.anselms.net)

mentioned in commit f747ca16bf

mentioned in commit f747ca16bf12e766fea1c03c8532a648a3541111
anselm (Migrated from gitlab.anselms.net) closed this issue 2023-05-02 01:50:27 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Strathspey/ace4#34
No description provided.