Re: Spaces between argument separator and argument in template filter generate error

2018-06-06 Thread oliver
Sorry my mistake. It means white spaces character not spaces 2018년 6월 6일 수요일 오후 6시 3분 48초 UTC+9, Florian Apolloner 님의 말: > > > > On Tuesday, June 5, 2018 at 4:30:03 AM UTC+2, oli...@kidsnote.com wrote: >> >> allowing spaces can be done by simply adding \s* after (arg_sep)s >> > > \s is __not__

Re: Spaces between argument separator and argument in template filter generate error

2018-06-06 Thread Florian Apolloner
On Tuesday, June 5, 2018 at 4:30:03 AM UTC+2, oli...@kidsnote.com wrote: > > allowing spaces can be done by simply adding \s* after (arg_sep)s > \s is __not__ the regex for spaces -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions

Re: Spaces between argument separator and argument in template filter generate error

2018-06-04 Thread oliver
filter_raw_string = r""" ^(?P%(constant)s)| ^(?P[%(var_chars)s]+|%(num)s)| (?:\s*%(filter_sep)s\s* (?P\w+) (?:%(arg_sep)s (?: (?P%(constant)s)| (?P[%(var_chars)s]+|%(num)s) ) )? )""" % { 'constant':

Re: Spaces between argument separator and argument in template filter generate error

2018-06-04 Thread oliver
filter_raw_string = r""" ^(?P%(constant)s)| ^(?P[%(var_chars)s]+|%(num)s)| (?:\s*%(filter_sep)s\s* (?P\w+) (?:%(arg_sep)s (?: (?P%(constant)s)| (?P[%(var_chars)s]+|%(num)s) ) )? )""" % { 'constant':

Re: Spaces between argument separator and argument in template filter generate error

2018-06-04 Thread oliver
Currently, spaces between filter separator( | ) and filter name is allowed. Also, value name and filter separator. So, following is allowed. {{ value|filter:"arg" }} {{ value|filter:"arg" }} But, following is not allowed. {{ value|filter: "arg" }} users are confused by the

Re: Spaces between argument separator and argument in template filter generate error

2018-06-04 Thread oliver
2018년 6월 5일 화요일 오전 10시 52분 16초 UTC+9, oli...@kidsnote.com 님의 말: > > Currently, django template system allow spaces between filter separator > and filter name, also value name and filter separator. > So, following is ok. > > {{ value|filter:"arg" }} > {{ value|filter:"arg" }} >

Re: Spaces between argument separator and argument in template filter generate error

2018-06-04 Thread oliver
Currently, django template system allow spaces between filter separator and filter name, also value name and filter separator. So, following is ok. {{ value|filter:"arg" }} {{ value|filter:"arg" }} But, following can't be parsed {{ value|filter: "arg" }} I think that this

Re: Spaces between argument separator and argument in template filter generate error

2018-06-01 Thread Curtis Maloney
On 05/31/2018 06:39 PM, oli...@kidsnote.com wrote: Are there any reasons that not allow spaces between separator and arg? My first thought would be that it starts making the syntax looser, meaning more things that are currently error cases would be accepted as valid. Which means mistakes

Re: Spaces between argument separator and argument in template filter generate error

2018-06-01 Thread Alasdair Nicol
On Friday, 1 June 2018 03:06:01 UTC+1, Collin Anderson wrote: > Maybe it would be worth having a more friendly error message? > > I agree, it would be good to improve the message. I've also seen users confused by the "could not parse the remainder" message when they forget the spaces around

Re: Spaces between argument separator and argument in template filter generate error

2018-05-31 Thread Collin Anderson
Maybe it would be worth having a more friendly error message? On Thu, May 31, 2018 at 8:59 PM, wrote: > Thank you for your reply. > I understand your opinion well > > 2018년 5월 31일 목요일 오전 11시 41분 22초 UTC+9, oli...@kidsnote.com 님의 말: >> >> In the template filter system now, >> >> spaces between

Re: Spaces between argument separator and argument in template filter generate error

2018-05-31 Thread oliver
Thank you for your reply. I understand your opinion well 2018년 5월 31일 목요일 오전 11시 41분 22초 UTC+9, oli...@kidsnote.com 님의 말: > > In the template filter system now, > > spaces between augment separator and augments generate error. > For example, the following template code generates the following

Re: Spaces between argument separator and argument in template filter generate error

2018-05-31 Thread James Bennett
On Thu, May 31, 2018 at 1:39 AM, wrote: > Are there any reasons that not allow spaces between separator and arg? > Every optional variant of template syntax is a potential source of bugs or compatibility issues for the future. And a potential source of confusion when someone is trying to learn

Re: Spaces between argument separator and argument in template filter generate error

2018-05-31 Thread oliver
Are there any reasons that not allow spaces between separator and arg? 2018년 5월 31일 목요일 오전 11시 41분 22초 UTC+9, oli...@kidsnote.com 님의 말: > > In the template filter system now, > > spaces between augment separator and augments generate error. > For example, the following template code generates the

Re: Spaces between argument separator and argument in template filter generate error

2018-05-31 Thread Adam Johnson
I think it's better to be conservative here and leave it as-is, the current syntax has worked for years and this change doesn't really reduce the risk of bugs. On Thu, 31 May 2018 at 03:34, wrote: > In the template filter system now, > > spaces between augment separator and augments generate