Make a website with Django: Difference between revisions

imported>Jesstess
 
(12 intermediate revisions by 5 users not shown)
Line 14:
==Project setup==
 
'''''Bold text''''Italic text'''''=== Install Django ===
 
Please follow the instructions in [https://docs.djangoproject.com/en/1.5/intro/install/ the official installation guide] to install Django.
Line 33:
=== 1. Complete Part 1 of the tutorial ===
 
* Please visit https://docs.djangoproject.com/en/1.45/intro/tutorial01/ and complete part 1 of the tutorial.
 
In this part, you'll create a new project, learn how to run your development server, set up a database, and create some models for your polling app. Some of the setup that you are doing in this section will make more sense once you start actually using the code a bit later in the tutorial -- don't worry if the purpose of some of the steps you are going through is a bit unclear at first.
Line 43:
 
This tutorial covered a lot of ground quickly. If you have any questions or want to learn more, wave over a staff member!
 
 
=== 2. Complete Part 2 of the tutorial ===
 
* Please visit https://docs.djangoproject.com/en/1.45/intro/tutorial02/ and do almost all of part 2 of the tutorial. Stop when you get to the section "Customize the Adminadmin Looklook and Feel:feel" (you can go back https://docs.djangoproject.com/en/dev/intro/tutorial02/#customize-the-admin-look-and-feel read it later if you want, but it's not important for your first app).
 
<br />
Line 56 ⟶ 55:
=== 3. Complete Part 3 of the tutorial ===
 
* Please visit https://docs.djangoproject.com/en/1.45/intro/tutorial03/ and complete part 3 of the tutorial.
 
<br />
Line 77 ⟶ 76:
</li>
<li>
What is the purpose of <code>ttemplate.render</code> in this code snippet?
 
<pre>def index(request):
latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
ttemplate = loader.get_template('polls/index.html')
ccontext = Context({
'latest_poll_list': latest_poll_list,
})
return HttpResponse(ttemplate.render(ccontext))</pre>
</li>
</ol>
 
 
=== 4. Complete Part 4 of the tutorial ===
 
* Please visit https://docs.djangoproject.com/en/1.45/intro/tutorial04/ and complete part 4 of the tutorial.
 
<br />
Line 105 ⟶ 103:
 
[[File:Fireworks.png|150px]]
[[File:Balloons.png|150px]]150p
Anonymous user