mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	Rolled comments from template page into FAQ
git-svn-id: http://code.djangoproject.com/svn/django/trunk@112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		
							
								
								
									
										21
									
								
								docs/faq.txt
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								docs/faq.txt
									
									
									
									
									
								
							| @@ -97,8 +97,8 @@ Lawrence, Kansas, USA. | |||||||
| 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? | 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? | ||||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ||||||
|  |  | ||||||
| That's because Django isn't strictly a MVC framework.  We don't really belive in | That's because Django isn't strictly a MVC framework.  We don't really believe in | ||||||
| any capital-M Methodoligies; we do what "feels" right.  If you squint the right | any capital-M Methodologies; we do what "feels" right.  If you squint the right | ||||||
| way, you can call Django's ORM the "Model", the view functions the "View", and | way, you can call Django's ORM the "Model", the view functions the "View", and | ||||||
| the API automatically generated from the models the "Controller" -- but not | the API automatically generated from the models the "Controller" -- but not | ||||||
| really. | really. | ||||||
| @@ -152,7 +152,7 @@ How do I install mod_python on Windows? | |||||||
|  |  | ||||||
|     * If you are running Python 2.4, check out this `guide to mod_python & Python 2.3`_. |     * If you are running Python 2.4, check out this `guide to mod_python & Python 2.3`_. | ||||||
|  |  | ||||||
|     * For Python 2.3, grab mod_python from http://ww.mod_python.org/, the read |     * For Python 2.3, grab mod_python from http://www.mod_python.org/, the read | ||||||
|       `Running mod_python on Apache on Windows2000`_. |       `Running mod_python on Apache on Windows2000`_. | ||||||
|  |  | ||||||
|     * Also try this (not windows-specific) `guide to getting mod_python working`_. |     * 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)? | |||||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ||||||
|  |  | ||||||
| Right now, no, unless you can get your host to install mod_python.  However, as | Right now, no, unless you can get your host to install mod_python.  However, as | ||||||
| the previous question says, WSGI support is comming!. | the previous question says, WSGI support is coming!. | ||||||
|  |  | ||||||
|  | Using Django | ||||||
|  | ============ | ||||||
|  |  | ||||||
| Why do I get an error about importing DJANGO_SETTINGS_MODULE? | Why do I get an error about importing DJANGO_SETTINGS_MODULE? | ||||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ||||||
|  |  | ||||||
| Make sure that: | Make sure that: | ||||||
|  |  | ||||||
|     * The environment variable DJANGO_SETTINGS_MODULE is set to a fully-qualifed |     * The environment variable DJANGO_SETTINGS_MODULE is set to a fully-qualified | ||||||
|       Python module (i.e. "mysite.settings.main"). |       Python module (i.e. "mysite.settings.main"). | ||||||
|      |      | ||||||
|     * Said module is on ``sys.path`` (``import mysite.settings.main`` should work). |     * Said module is on ``sys.path`` (``import mysite.settings.main`` should work). | ||||||
| @@ -197,6 +200,14 @@ Make sure that: | |||||||
|             os.environ.update(req.subprocess_env) |             os.environ.update(req.subprocess_env) | ||||||
|              |              | ||||||
|       (where ``req`` is the mod_python request object). |       (where ``req`` is the mod_python request object). | ||||||
|  |        | ||||||
|  | I can't stand your template language; do I have to use it? | ||||||
|  | ---------------------------------------------------------- | ||||||
|  |  | ||||||
|  | We happen to think our template engine is the best thing since chunky bacon, | ||||||
|  | but we recognize that choosing a template language runs close to religion.   | ||||||
|  | There's nothing about Django that requires using the template language, so | ||||||
|  | if you're attached to ZPT, Cheetah, or whatever, feel free to use those.  | ||||||
|  |  | ||||||
| The admin interface | The admin interface | ||||||
| =================== | =================== | ||||||
|   | |||||||
| @@ -97,7 +97,9 @@ your site and defines **blocks** that child templates can override. | |||||||
|  |  | ||||||
| It's easiest to understand template inheritance by starting with an example:: | It's easiest to understand template inheritance by starting with an example:: | ||||||
|  |  | ||||||
|     <html> |     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||||||
|  |         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||||||
|  |     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||||||
|     <head> |     <head> | ||||||
|         <link rel="stylesheet" href="style.css" /> |         <link rel="stylesheet" href="style.css" /> | ||||||
|         <title>{% block title %}My Amazing Site{% endblock %}</title> |         <title>{% block title %}My Amazing Site{% endblock %}</title> | ||||||
| @@ -150,7 +152,9 @@ At that point, the template engine will notice the three blocks in | |||||||
| ``base.html``, and replace those blocks with the contents of the child template. | ``base.html``, and replace those blocks with the contents of the child template. | ||||||
| Depending on the value of ``blog_entries``, the output might look like:: | Depending on the value of ``blog_entries``, the output might look like:: | ||||||
|  |  | ||||||
|     <html> |     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||||||
|  |         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||||||
|  |     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||||||
|     <head> |     <head> | ||||||
|         <link rel="stylesheet" href="style.css" /> |         <link rel="stylesheet" href="style.css" /> | ||||||
|         <title>My Amazing Blog</title> |         <title>My Amazing Blog</title> | ||||||
| @@ -173,6 +177,8 @@ Depending on the value of ``blog_entries``, the output might look like:: | |||||||
|         </div> |         </div> | ||||||
|     </body> |     </body> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Note that since the child template did not define the ``sidebar`` block, the | Note that since the child template did not define the ``sidebar`` block, the | ||||||
| value from the parent template is used instead. | value from the parent template is used instead. | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user