Django for ISchoolers: Difference between revisions

no edit summary
imported>Aldeka
imported>Aldeka
No edit summary
Line 23:
<code>
$ virtualenv --no-site-packages django-tutorial-env
 
$ source django-tutorial-env/bin/activate
 
(django-tutorial-env)$ pip install django
 
(django-tutorial-env)$ pip install south
</code>
Line 77 ⟶ 80:
 
<code>$ cd mysite
 
$ ls
 
__init__.py
 
manage.py
 
settings.py
 
urls.py</code>
 
Line 95 ⟶ 103:
 
** Run the command:
 
<code>python manage.py runserver</code>
 
Line 100 ⟶ 109:
 
<code>Validating models...
 
0 errors found.
 
 
Django version 1.2, using settings 'myproject.settings'
 
Development server is running at http://127.0.0.1:8000/
 
Quit the server with CONTROL-C.</code>
 
* Now that the server’s running, visit [http://127.0.0.1:8000/ http://127.0.0.1:8000/] with your Web browser. You’ll see a “Welcome to Django” page, in pleasant, light-blue pastel. It worked!
 
* Observe the logging that happens in the terminal where your server is running:
 
<code>[24/Mar/2011 11:50:18] "GET / HTTP/1.1" 200 2057</code>
 
which has the format:
 
<code>DATE METHOD URL PROTOCOL RESPONSE_CODE CONTENTSIZE</code>
 
* Navigate to http://127.0.0.1:8000/some/url/. What changes in the terminal log?
 
* Exit the server by returning to the terminal instance where the development server is running and pressing CONTROL-C on your keyboard.
 
== Using version control ==
Anonymous user