-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
@mattbk this look good? |
@@ -71,6 +71,11 @@ if request.method == 'POST': | |||
)) | |||
|
|||
try: | |||
fields['slug'] = slugize(fields['name']) | |||
except AssertionError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd make more sense to throw a custom error - InvalidTeamName
, maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wokay! It did cross my mind too but it looked like a bit too much. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another reason I didn't do this is that slugize
is from community
model. So having Invalid*Team*Name
in there wouldn't really fit well. Now that you mentioned #3426, this would make sense since team
model would have a slugize
of its own.
I can't test right now, but looks like you're on the right track. |
It's funny that you can't use these characters when creating a new team, but you can edit your team name to include any characters you want. |
A team name of all underscores collapses into a team with a name of length zero, and the form completes. The team ends up under Review, but the link goes nowhere. It looks like all underscores and periods collapse into "-" if they are between alphanumerics. In that case, I wouldn't include them in the list of approved characters? |
Side-effect of #3426, looks like |
There's a reason for this. You can't include those characters while creating the team because we use those characters to create a (unique) |
Okay, thanks, that makes sense. |
6b05dc3
to
f7f1087
Compare
I added the team name regex such that things like #3943 (comment) can be avoided. |
f7f1087
to
8fa155e
Compare
It works for me. I'm happy with it as long as someone else thinks the new |
Reviewing ... |
8fa155e
to
0ef1a54
Compare
@@ -58,6 +57,7 @@ still_migrating = delta > 0 | |||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}"> | |||
|
|||
<label><h2>{{ _("Team Name") }}</h2></label> | |||
<p><i>{{ _("Must contain alphabets. Can optionally contain numbers, dashes (-), underscores (_), periods (.), comma (,) and whitespaces.") }}</i></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this usage of "alphabets." Perhaps it's part of Indian English?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh. It's petty common over here. I just realized myself that it's wrong though. 😳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries ... maybe we should have an Indian English translation! 💃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, "localization" is probably the better word. ;-)
"23456789" technically does not contain invalid characters. ;-)
48f9ae6
to
c444fe2
Compare
|
@aandis I'm ready to merge if you're good with my latest commits ... |
Commented on 3c0d72f#commitcomment-16714701 |
Looks good to me. 👍 |
!m @aandis |
!m @whit537 |
#3880