Django Tutorial: The Local Library website

Pada artikel pertama ini dalam seri latihan praktek menjelaskan apa yang akan Anda pelajari, dan menyediakan sebuah gambaran mengenai percobaan website "local library" Kita akan bekerja dan terus berkembang pada artikel-artikel selanjuntya.
Prerequisites: Read the Django Introduction. For the following articles you'll also need to have set up a Django development environment
Objective: To introduce the example application used in this tutorial, and allow readers to understand what topics will be covered. 


Selamat datang di tutorial django MDN "Local Library", dimana kita akan mengembangakn sebuah website yang memungkinkan untuk mengatur sebuah katalog untuk perpustakaan lokal. 

Pada seri ini Anda akan:

  • Menggunakan alat Django untuk membuat sebuah kerangka website dan aplikasi.
  • Memulai dan memberhentikan development server.
  • Membuat models untuk mempresentasikan data aplikasi Anda.
  • Menggunakan Django admin site untuk menempati data situs Anda.
  • Membuat views untuk mengembalikan suatu data yang spesifik sebagai tanggapan atas permintaan-permintaan yang berbeda, dan templates untuk me-render data tersebut ke HTML untuk ditampilkan kedalam browser.
  • Membuat mappers untuk menyatukan URL yang berbeda dengan spesifik views.
  • Menambahkan user authorization dan sessions untuk mengontrol perilaku dan akses.
  • Bekerja dengan forms.
  • Menulis test code untuk app Anda.
  • Menggunakan Django security secara efektif.
  • Men-deploy aplikasi anda kedalam produksi

Anda sudah belajar mengenai beberapa topik-topik yang akan dibahas. Pada akhir seri tutorial Anda seharusnya cukup tahu untuk mengembangkan aplikasi simple Django secara pribadi.

The LocalLibrary website

LocalLibrary is the name of the website that we'll create and evolve over the course of this series of tutorials. As you'd expect, the purpose of the website is to provide an online catalog for a small local library, where users can browse available books and manage their accounts.

This example has been carefully chosen because it can scale to show as much or as little detail as we need, and can be used to show off almost any Django feature. More importantly, it allows us to provide a guided path through the most important functionality in the Django web framework:

  • In the first few tutorial articles we will define a simple browse-only library that library members can use to find out what books are available. This allows us to explore the operations that are common to almost every website: reading and displaying content from a database.
  • As we progress, the library example naturally extends to demonstrate more advanced Django features. For example we can extend the library to allow users to reserve books, and use this to demonstrate how to use forms, and support user authentication.

Even though this is a very extensible example, it's called LocalLibrary for a reason — we're hoping to show the minimum information that will help you get up and running with Django quickly. As a result we'll store information about books, copies of books, authors and other key information. We won't however be storing information about other items a library might store, or provide the infrastructure needed to support multiple library sites or other "big library" features. 

I'm stuck, where can I get the source?

As you work through the tutorial we'll provide the appropriate code snippets for you to copy and paste at each point, and there will be other code that we hope you'll extend yourself (with some guidance).

If you get stuck, you can find the fully developed version of the website on Github here.


Now that you know a bit more about the LocalLibrary website and what you're going to learn, it's time to start creating a skeleton project to contain our example.

In this module