mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-30 03:50:40 +00:00
Merge pull request #375 from mouse-reeve/username-regex
Allow usernames with dots
This commit is contained in:
commit
8fb8e93e37
1 changed files with 3 additions and 3 deletions
|
@ -6,8 +6,8 @@ from django.urls import path, re_path
|
|||
from bookwyrm import incoming, outgoing, views, settings, wellknown
|
||||
from bookwyrm import view_actions as actions
|
||||
|
||||
username_regex = r'(?P<username>[\w\-_]+@[\w\-\_\.]+)'
|
||||
localname_regex = r'(?P<username>[\w\-_]+)'
|
||||
username_regex = r'(?P<username>[\w\-_\.]+@[\w\-\_\.]+)'
|
||||
localname_regex = r'(?P<username>[\w\-_\.]+)'
|
||||
user_path = r'^user/%s' % username_regex
|
||||
local_user_path = r'^user/%s' % localname_regex
|
||||
|
||||
|
@ -61,8 +61,8 @@ urlpatterns = [
|
|||
# should return a ui view or activitypub json blob as requested
|
||||
# users
|
||||
re_path(r'%s/?$' % user_path, views.user_page),
|
||||
re_path(r'%s/?$' % local_user_path, views.user_page),
|
||||
re_path(r'%s\.json$' % local_user_path, views.user_page),
|
||||
re_path(r'%s/?$' % local_user_path, views.user_page),
|
||||
re_path(r'%s/shelves/?$' % local_user_path, views.user_shelves_page),
|
||||
re_path(r'%s/followers(.json)?/?$' % local_user_path, views.followers_page),
|
||||
re_path(r'%s/following(.json)?/?$' % local_user_path, views.following_page),
|
||||
|
|
Loading…
Reference in a new issue