Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #311 -- Small change to docstring. Thanks, rmunn

git-svn-id: http://code.djangoproject.com/svn/django/trunk@496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2c3067b5e5c7f4a818337760c029267d8658eb0a 1 parent bf10818
Adrian Holovaty authored

Showing 1 changed file with 14 additions and 14 deletions. Show diff stats Hide diff stats

  1. 28  django/core/defaulttags.py
28  django/core/defaulttags.py
@@ -387,9 +387,9 @@ def do_firstof(parser, token):
387 387
     Sample usage::
388 388
 
389 389
         {% firstof var1 var2 var3 %}
390  
-        
  390
+
391 391
     This is equivalent to::
392  
-    
  392
+
393 393
         {% if var1 %}
394 394
             {{ var1 }}
395 395
         {% else %}{% if var2 %}
@@ -397,7 +397,7 @@ def do_firstof(parser, token):
397 397
         {% else %}{% if var3 %}
398 398
             {{ var3 }}
399 399
         {% endif %}{% endif %}{% endif %}
400  
-        
  400
+
401 401
     but obviously much cleaner!
402 402
     """
403 403
     bits = token.contents.split()[1:]
@@ -471,15 +471,15 @@ def do_if(parser, token):
471 471
     The ``{% if %}`` tag evaluates a variable, and if that variable is "true"
472 472
     (i.e. exists, is not empty, and is not a false boolean value) the contents
473 473
     of the block are output:
474  
-    
  474
+
475 475
     ::
476  
-    
  476
+
477 477
         {% if althlete_list %}
478 478
             Number of athletes: {{ althete_list|count }}
479 479
         {% else %}
480 480
             No athletes.
481 481
         {% endif %}
482  
-        
  482
+
483 483
     In the above, if ``athlete_list`` is not empty, the number of athletes will
484 484
     be displayed by the ``{{ athlete_list|count }}`` variable.
485 485
 
@@ -488,24 +488,24 @@ def do_if(parser, token):
488 488
 
489 489
     ``if`` tags may use ``or`` or ``not`` to test a number of variables or to
490 490
     negate a given variable::
491  
-    
  491
+
492 492
         {% if not athlete_list %}
493 493
             There are no athletes.
494 494
         {% endif %}
495  
-        
  495
+
496 496
         {% if athlete_list or coach_list %}
497 497
             There are some athletes or some coaches.
498 498
         {% endif %}
499  
-        
  499
+
500 500
         {% if not athlete_list or coach_list %}
501  
-            There are no athletes or there are some coaches (OK, so 
502  
-            writing English translations of boolean logic sounds 
  501
+            There are no athletes or there are some coaches (OK, so
  502
+            writing English translations of boolean logic sounds
503 503
             stupid; it's not my fault).
504 504
         {% endif %}
505  
-    
  505
+
506 506
     For simplicity, ``if`` tags do not allow ``and`` clauses; use nested ``if``
507 507
     tags instead::
508  
-    
  508
+
509 509
         {% if athlete_list %}
510 510
             {% if coach_list %}
511 511
                 Number of athletes: {{ athlete_list|count }}.
@@ -637,7 +637,7 @@ def do_regroup(parser, token):
637 637
             * Margaret Thatcher
638 638
             * Colendeeza Rice
639 639
         * Unknown:
640  
-            * Janet Reno
  640
+            * Pat Smith
641 641
 
642 642
     The following snippet of template code would accomplish this dubious task::
643 643
 

0 notes on commit 2c3067b

Please sign in to comment.
Something went wrong with that request. Please try again.