Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Rolled comments from template page into FAQ

git-svn-id: http://code.djangoproject.com/svn/django/trunk@112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 058c526ef9995fa54d64f5e6362c9f93a935fbb0 1 parent fca1ef1
Jacob Kaplan-Moss authored July 16, 2005
21  docs/faq.txt
@@ -97,8 +97,8 @@ Lawrence, Kansas, USA.
97 97
 Django appears to be a MVC framework, but you call the Controller the "view", and the View the "template". How come you don't use the standard names?
98 98
 -----------------------------------------------------------------------------------------------------------------------------------------------------
99 99
 
100  
-That's because Django isn't strictly a MVC framework.  We don't really belive in
101  
-any capital-M Methodoligies; we do what "feels" right.  If you squint the right
  100
+That's because Django isn't strictly a MVC framework.  We don't really believe in
  101
+any capital-M Methodologies; we do what "feels" right.  If you squint the right
102 102
 way, you can call Django's ORM the "Model", the view functions the "View", and
103 103
 the API automatically generated from the models the "Controller" -- but not
104 104
 really.
@@ -152,7 +152,7 @@ How do I install mod_python on Windows?
152 152
 
153 153
     * If you are running Python 2.4, check out this `guide to mod_python & Python 2.3`_.
154 154
 
155  
-    * For Python 2.3, grab mod_python from http://ww.mod_python.org/, the read
  155
+    * For Python 2.3, grab mod_python from http://www.mod_python.org/, the read
156 156
       `Running mod_python on Apache on Windows2000`_.
157 157
 
158 158
     * Also try this (not windows-specific) `guide to getting mod_python working`_.
@@ -175,14 +175,17 @@ Will Django run under shared hosting (like TextDrive or Dreamhost)?
175 175
 -------------------------------------------------------------------
176 176
 
177 177
 Right now, no, unless you can get your host to install mod_python.  However, as
178  
-the previous question says, WSGI support is comming!.
  178
+the previous question says, WSGI support is coming!.
  179
+
  180
+Using Django
  181
+============
179 182
 
180 183
 Why do I get an error about importing DJANGO_SETTINGS_MODULE?
181 184
 -------------------------------------------------------------
182 185
 
183 186
 Make sure that:
184 187
 
185  
-    * The environment variable DJANGO_SETTINGS_MODULE is set to a fully-qualifed
  188
+    * The environment variable DJANGO_SETTINGS_MODULE is set to a fully-qualified
186 189
       Python module (i.e. "mysite.settings.main").
187 190
     
188 191
     * Said module is on ``sys.path`` (``import mysite.settings.main`` should work).
@@ -197,6 +200,14 @@ Make sure that:
197 200
             os.environ.update(req.subprocess_env)
198 201
             
199 202
       (where ``req`` is the mod_python request object).
  203
+      
  204
+I can't stand your template language; do I have to use it?
  205
+----------------------------------------------------------
  206
+
  207
+We happen to think our template engine is the best thing since chunky bacon,
  208
+but we recognize that choosing a template language runs close to religion.  
  209
+There's nothing about Django that requires using the template language, so
  210
+if you're attached to ZPT, Cheetah, or whatever, feel free to use those. 
200 211
 
201 212
 The admin interface
202 213
 ===================
10  docs/templates.txt
@@ -97,7 +97,9 @@ your site and defines **blocks** that child templates can override.
97 97
 
98 98
 It's easiest to understand template inheritance by starting with an example::
99 99
 
100  
-    <html>
  100
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  101
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  102
+    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
101 103
     <head>
102 104
         <link rel="stylesheet" href="style.css" />
103 105
         <title>{% block title %}My Amazing Site{% endblock %}</title>
@@ -150,7 +152,9 @@ At that point, the template engine will notice the three blocks in
150 152
 ``base.html``, and replace those blocks with the contents of the child template.
151 153
 Depending on the value of ``blog_entries``, the output might look like::
152 154
 
153  
-    <html>
  155
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  156
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  157
+    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
154 158
     <head>
155 159
         <link rel="stylesheet" href="style.css" />
156 160
         <title>My Amazing Blog</title>
@@ -173,6 +177,8 @@ Depending on the value of ``blog_entries``, the output might look like::
173 177
         </div>
174 178
     </body>
175 179
 
  180
+
  181
+
176 182
 Note that since the child template did not define the ``sidebar`` block, the
177 183
 value from the parent template is used instead.
178 184
 

0 notes on commit 058c526

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