aboutsummaryrefslogtreecommitdiff
path: root/files/tr/learn/server-side/django/index.html
blob: d4a8864ffbf21acd16a7e88cf874dde6d2948389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
title: Django Web Framework (Python)
slug: Öğren/Server-side/Django
tags:
  - Beginner
  - CodingScripting
  - Intro
  - Learn
  - NeedsTranslation
  - Python
  - Server-side programming
  - TopicStub
  - django
translation_of: Learn/Server-side/Django
---
<p>{{draft("Contact Hamish Willee via ~~chrisdavidmills if you have any questions about this work.")}}</p>

<p class="summary">Django is an extremely popular and fully featured server-side web framework, written in Python. The module shows you why Django is one of the most popular web server frameworks, how to set up a development environment, and how to get started with using it to create your own web applications.</p>

<h2 id="Prerequisites">Prerequisites</h2>

<p>Before starting this module you don't need to have any knowledge of Django. You will need to understand what server-side web programming and web frameworks are, ideally by reading the topics in our <a href="/en-US/docs/Learn/Server-side/First_steps">Server-side website programming first steps</a> module.</p>

<p>A general knowledge of programming concepts and <a href="/en-US/docs/Glossary/Python">Python</a> is recommended, but not essential to understanding the core concepts.</p>

<div class="note">
<p><strong>Note</strong>: Python is one of the easiest programming languages for novices to read and understand. That said, if you want to understand this module better then there are numerous free books and tutorials available on the Internet (new programmers might want to check out the <a href="https://wiki.python.org/moin/BeginnersGuide/NonProgrammers">Python for Non Programmers</a> page on the python.org wiki).</p>
</div>

<h2 id="Guides">Guides</h2>

<dl>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Introduction">Django Introduction</a></dt>
 <dd>In this first Django article we answer the question "What is Django?" and give you an overview of what makes this web framework special. We'll outline the main features, including some of the advanced functionality that we won't have time to cover in detail in this module. We'll also show you some of the main building blocks of a Django application, to give you an idea of what it can do before you then go on to set it up and start playing.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/development_environment">Setting up a Django development environment</a></dt>
 <dd>Now that you know what Django is for, we'll show you how to setup and test a Django development environment on Windows, Linux (Ubuntu), and Mac OS X — whatever common operating system you are using, this article should give you what you need to be able to start developing Django apps.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website">Django Tutorial — The Local Library website</a></dt>
 <dd>The first article in our practical tutorial series explains what you'll learn, and provides an overview of the "local library" example website we'll be working through and evolving in subsequent articles.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/skeleton_website">Django Tutorial Part 2: Creating a skeleton website</a></dt>
 <dd>This article shows how you can create a "skeleton" website project as a basis, which you can then go on to populate with site-specific settings, urls, models, views, and templates.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Models">Django Tutorial Part 3: Using models</a></dt>
 <dd>This article shows how to define models for the <em>LocalLibrary</em> website — models represent the data structures we want to store our app's data in, and also allow Django to store data in a database for us (and modify it later on). It explains what a model is, how it is declared, and some of the main field types. It also briefly shows a few of the main ways you can access model data.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Admin_site">Django Tutorial Part 4: Django admin site</a></dt>
 <dd>Now that we've created models for the <em>LocalLibrary </em>website, we'll use the Django Admin site to add some "real" book data. First we'll show you how to register the models with the admin site, then we'll show you how to login and create some data. At the end we show some of ways you can further improve the presentation of the admin site.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Home_page">Django Tutorial Part 5: Creating our home page</a></dt>
 <dd>We're now ready to add the code to display our first full page — a home page for the <em>LocalLibrary</em> that shows how many records we have of each model type and provides sidebar navigation links to our other pages. Along the way we'll gain practical experience in writing basic URL maps and views, getting records from the database, and using templates.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Generic_views">Django Tutorial Part 6: Generic list and detail views</a></dt>
 <dd>This tutorial extends our <em>LocalLibrary</em> website, adding list and detail pages for books and authors. Here we'll learn about generic class-based views, and show how they can reduce the amount of code you have to write for common use cases. We'll also go into URL handling in greater detail, showing how to perform basic pattern matching.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/Sessions">Django Tutorial Part 7: Sessions framework</a></dt>
 <dd>This tutorial extends our <em>LocalLibrary</em> website, adding a session-based visit-counter to the home page. This is a relatively simple example, but it does shows how you can use the session framework to provide peristent behaviour for anonymous users in your own sites.</dd>
 <dt><a href="/en-US/docs/Learn/Server-side/Django/authentication_and_sessions">Django Tutorial Part 8: User authentication and permissions</a></dt>
 <dd>In this tutorial we'll show you how to allow users to login to your site with their own accounts, and how to control what they can do and see based on whether or not they are logged in and their <em>permissions</em>. As part of this demonstration we'll extend the <em>LocalLibrary</em> website, adding login and logout pages, and user- and staff-specific pages for viewing books that have been borrowed.</dd>
 <dd> </dd>
 <dt>Forms (TBD)</dt>
 <dd><a href="/en-US/docs/Web/Guide/HTML/Forms">HTML Forms</a> are used to collect user data and send it to a website for processing. Form handling can be complicated, and includes creating the HTML code for the form, validating the entered data on both the client and server, processing/storing the returned data, and returning a response. Django simplifies much of this work, and is even capable of reusing data defined in the model for creating a form — this article shows how.</dd>
 <dt> </dt>
 <dt>Testing Django code (TBD)</dt>
 <dd>For very basic sites with only a few lines of code, you may be able to get away with manual testing. As your site gets larger, an automated test suite can help to validate new code as it is written and is the only practical way to ensure that changes to not introduce new bugs. This article provides a very brief overview of the recommended way to write and run unit tests in your Django web application.</dd>
 <dt>Django web application security (TBD)</dt>
 <dd>Protecting user data is an essential part of any website design. We already explained some of the more common security threats in the topic <a href="/en-US/docs/Web/Security">Web security</a> — this article builds on that information,  providing a brief overview of the security features that are provided for Django users out of the box.</dd>
 <dt>Deployment to production (TBD)</dt>
 <dd>Now that your web application is finished, you will want to upload it to a production server. To make this easier, here we help you find a hosting site that might meet your budget and scaling needs. We then explain some of the changes you need to make to hide any "development settings". Last of all we provide a real "worked example" of how you can install a web application, using hosting on the free tier of the <a href="https://www.heroku.com/">Heroku</a> cloud hosting service.</dd>
</dl>

<h2 id="Assessments">Assessments</h2>

<p>The following assessment will test your understanding of how to create a website using Django, as described in the guides listed above</p>

<dl>
 <dt>DIY Mini Blog (TBD)</dt>
 <dd>In this assessment you'll use some of the knowledge you've learned from this module to create your own blog.</dd>
</dl>