Re: When to use single quotes and double quotes

2013-11-02 Thread German Larrain
> Use double quotes for strings meant for human consumption, use single > quotes for everything else. > > Text, trans strings, model verbose_names: double quotes > Dict keys, HTML tags, flags, and similar: single quotes > > Use triple quotes for long blocks of text, ideally only necessary

Re: When to use single quotes and double quotes

2013-10-29 Thread Aymeric Augustin
On 29 oct. 2013, at 04:41, Andres Osinski wrote: > Use double quotes for strings meant for human consumption, use single > quotes for everything else. I’m usually doing that in new code. I don’t think it’s worth retrofitting the entire Django codebase, though. --

Re: When to use single quotes and double quotes

2013-10-28 Thread Andres Osinski
I don't know where I got this from, but I consider it to be the best convention for choosing quote types: Use double quotes for strings meant for human consumption, use single quotes for everything else. Text, trans strings, model verbose_names: double quotes Dict keys, HTML tags, flags, and

Re: When to use single quotes and double quotes

2013-10-28 Thread Zach Borboa
> Here's an example from the django source where we are using double quotes > in python instead of single quotes. The following code prints out html > using single quotes instead of the double quotes regularly seen in html. > > return format_html(" value='{0}' />", csrf_token) > > instead

Re: When to use single quotes and double quotes

2013-10-28 Thread Zach Borboa
Here's an example from the django source where we are using double quotes in python instead of single quotes. The following code prints out html using single quotes instead of the double quotes regularly seen in html. return format_html("", csrf_token) instead of: return

Re: When to use single quotes and double quotes

2013-10-27 Thread Zach Borboa
I believe we should prefer one over the other. That being said, legibility, consistency, and context should be taken into account. Should our documentation examples prefer one rather over the other? > > Daniele > > -- You received this message because you are subscribed to the Google Groups

Re: When to use single quotes and double quotes

2013-10-27 Thread Daniele Procida
On Sun, Oct 27, 2013, Zach Borboa wrote: >I'm seeing a mix of both singly- and doubly-quoted strings in django source. >Other than docstrings wrapped in triple-double-quotes, when is it >appropriate >to use double quotes instead single quotes? As far as I understand it