Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4814 -- Fixed some whitespace issues in tutorial01, thanks Joh…

…n Shaffer.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 541c9ff797f37e34cc2056b4ed483be8e192559c 1 parent 0be6d32
Gary Wilson Jr. authored July 10, 2007

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

  1. 30  docs/tutorial01.txt
30  docs/tutorial01.txt
@@ -22,10 +22,10 @@ installed.
22 22
 .. admonition:: Where to get help:
23 23
 
24 24
     If you're having trouble going through this tutorial, please post a message
25  
-    to `django-users`_ or drop by `#django`_ on ``irc.freenode.net`` and we'll 
  25
+    to `django-users`_ or drop by `#django`_ on ``irc.freenode.net`` and we'll
26 26
     try to help.
27 27
 
28  
-.. _django-users: http://groups.google.com/group/django-users 
  28
+.. _django-users: http://groups.google.com/group/django-users
29 29
 .. _#django: irc://irc.freenode.net/django
30 30
 
31 31
 Creating a project
@@ -42,7 +42,7 @@ code, then run the command ``django-admin.py startproject mysite``. This
42 42
 will create a ``mysite`` directory in your current directory.
43 43
 
44 44
 .. note::
45  
-    
  45
+
46 46
     You'll need to avoid naming projects after built-in Python or Django
47 47
     components. In particular, this means you should avoid using names like
48 48
     ``django`` (which will conflict with Django itself) or ``site`` (which
@@ -321,7 +321,7 @@ Now Django knows ``mysite`` includes the ``polls`` app. Let's run another comman
321 321
 
322 322
     python manage.py sql polls
323 323
 
324  
-You should see something similar to the following (the CREATE TABLE SQL statements 
  324
+You should see something similar to the following (the CREATE TABLE SQL statements
325 325
 for the polls app)::
326 326
 
327 327
     BEGIN;
@@ -341,7 +341,7 @@ for the polls app)::
341 341
 Note the following:
342 342
 
343 343
     * The exact output will vary depending on the database you are using.
344  
-    
  344
+
345 345
     * Table names are automatically generated by combining the name of the app
346 346
       (``polls``) and the lowercase name of the model -- ``poll`` and
347 347
       ``choice``. (You can override this behavior.)
@@ -371,8 +371,8 @@ If you're interested, also run the following commands:
371 371
       construction of your models.
372 372
 
373 373
     * ``python manage.py sqlcustom polls`` -- Outputs any custom SQL statements
374  
-      (such as table modifications or constraints) that are defined for the 
375  
-      application. 
  374
+      (such as table modifications or constraints) that are defined for the
  375
+      application.
376 376
 
377 377
     * ``python manage.py sqlclear polls`` -- Outputs the necessary ``DROP
378 378
       TABLE`` statements for this app, according to which tables already exist
@@ -494,19 +494,19 @@ admin.
494 494
 
495 495
 .. admonition:: Why ``__unicode__()`` and not ``__str__()``?
496 496
 
497  
-	If you're familiar with Python, you might be in the habit of adding
498  
-	``__str__()`` methods to your classes, not ``__unicode__()`` methods.
  497
+    If you're familiar with Python, you might be in the habit of adding
  498
+    ``__str__()`` methods to your classes, not ``__unicode__()`` methods.
499 499
     We use ``__unicode__()`` here because Django models deal with Unicode by
500 500
     default. All data stored in your database is converted to Unicode when it's
501 501
     returned.
502 502
 
503  
-	Django models have a default ``__str__()`` method that calls ``__unicode__()``
504  
-	and converts the result to a UTF-8 bytestring. This means that ``unicode(p)``
505  
-	will return a Unicode string, and ``str(p)`` will return a normal string,
506  
-	with characters encoded as UTF-8.
  503
+    Django models have a default ``__str__()`` method that calls
  504
+    ``__unicode__()`` and converts the result to a UTF-8 bytestring. This means
  505
+    that ``unicode(p)`` will return a Unicode string, and ``str(p)`` will return
  506
+    a normal string, with characters encoded as UTF-8.
507 507
 
508  
-	If all of this is jibberish to you, just remember to add ``__unicode__()``
509  
-	methods to your models. With any luck, things should Just Work for you.
  508
+    If all of this is jibberish to you, just remember to add ``__unicode__()``
  509
+    methods to your models. With any luck, things should Just Work for you.
510 510
 
511 511
 Note these are normal Python methods. Let's add a custom method, just for
512 512
 demonstration::

0 notes on commit 541c9ff

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