.. Quick install guide =================== インストールガイド ================== :revision-up-to: 17812 (1.4) .. Before you can use Django, you'll need to get it installed. We have a :doc:`complete installation guide ` that covers all the possibilities; this guide will guide you to a simple, minimal installation that'll work while you walk through the introduction. Django を動かすには、まずインストールせねばなりません。ここでは、 Django を 学んでみるにあたって必要な、簡単で最小限のインストール方法を示します。 色々なインストール方法をカバーしている :doc:`詳細なインストールガイド ` も用意してあります。 .. Install Python -------------- Python のインストール --------------------- .. Being a Python Web framework, Django requires Python. It works with any Python version from 2.5 to 2.7 (due to backwards incompatibilities in Python 3.0, Django does not currently work with Python 3.0; see :doc:`the Django FAQ ` for more information on supported Python versions and the 3.0 transition), these versions of Python include a lightweight database called SQLite_ so you won't need to set up a database just yet. Django は Python の Web フレームワークなので Python が必要です。 Django は バージョン 2.5 から 2.7 までの Python で動作します (Python 3.0 には以前のバー ジョンと互換性のない変更が加わっているので、 Django は現在のところ Python 3.0 で動作しません。サポートされている Python のバージョンと、 3.0 への移行 に関する情報は :doc:`FAQ ` を参照してください)。 Python 2.5 から は、 SQLite_ という軽量なデータベースが付属していて、すぐにデータベースの セットアップをすることなく開発できます。 .. _sqlite: http://sqlite.org/ .. Get Python at http://www.python.org. If you're running Linux or Mac OS X, you probably already have it installed. http://www.python.org から Python を取ってきましょう。 Linux や Mac OSX を 動かしているのなら、おそらくインストール済みのはずです。 .. admonition:: Jython で Django を動かす .. If you use Jython_ (a Python implementation for the Java platform), you'll need to follow a few additional steps. See :doc:`/howto/jython` for details. Jython_ (Java プラットフォームで動く Python 実装) を使っているなら、他 にもいくつかステップを踏む必要があります。詳しくは :doc:`/howto/jython` を参照してください。 .. _jython: http://www.jython.org/ .. You can verify that Python is installed by typing ``python`` from your shell; you should see something like:: インストールされている Python のバージョンを調べるには、シェル上で ``python`` と入力します。出力は以下のようになるでしょう:: Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> .. Set up a database ----------------- データベースをセットアップする ------------------------------ .. If you installed Python 2.5 or later, you can skip this step for now. バージョン 2.5 以降の Python をインストールしていれば、この節は読み飛ばして もかまいません。 .. If not, or if you'd like to work with a "large" database engine like PostgreSQL, MySQL, or Oracle, consult the :ref:`database installation information `. バージョン 2.5 よりも前の Python を使っているか、 PostgreSQL や MySQL, Oracle といった、SQLite 以外の「大掛かりな」データベースエンジンを扱いたけ れば、 :ref:`データベースのインストールに関する情報 ` を参照してください。 .. Remove any old versions of Django --------------------------------- 旧バージョンの Django の除去 ---------------------------- .. If you are upgrading your installation of Django from a previous version, you will need to :ref:`uninstall the old Django version before installing the new version `. 以前のバージョンからアップグレードする形で Django をインストールする場合、 :ref:`新しいバージョンをインストールする前に、まず旧バージョンをアンインス トールしておく ` 必要があります。 .. Install Django -------------- Django のインストール --------------------- .. You've got three easy options to install Django: 3 通りの簡単な方法で、Django をインストールできます: .. * Install a version of Django :doc:`provided by your operating system distribution `. This is the quickest option for those who have operating systems that distribute Django. * :doc:`オペレーティングシステムの提供している ` バージョンの Django をインストールする場合。お使いのオペレーティング システム向けに Django が配布されている場合はもっとも簡単な選択肢です。 .. * :ref:`Install an official release `. This is the best approach for users who want a stable version number and aren't concerned about running a slightly older version of Django. * :ref:`公式リリース版のインストール ` 。 安定したバージョンの Django を使いたくて、少々古いものでも構わない場 合にはベストのアプローチです。 .. * :ref:`Install the latest development version `. This is best for users who want the latest-and-greatest features and aren't afraid of running brand-new code. * :ref:`最新の開発版のインストール ` 最新の素晴らしい機能を使ってみたい、書き立てのコードを実行することに 抵抗のない人のための選択肢です。 .. admonition:: 常に使用している Django のバージョンと一致するドキュメントを 参照するようにしてください。 .. If you do either of the first two steps, keep an eye out for parts of the documentation marked **new in development version**. That phrase flags features that are only available in development versions of Django, and they likely won't work with an official release. 上に挙げた選択肢のうち、最初の二つを選んだ場合は、ドキュメントを読む際 に「 **開発版で登場した機能です** 」とマークされた部分に気をつけてくだ さい。この文は、開発版の Django でのみ利用可能な機能をマークしています。 そうした機能は、公式リリースでは動かないでしょう。 .. Verifying --------- 確認 ---- .. To verify that Django can be seen by Python, type ``python`` from your shell. Then at the Python prompt, try to import Django:: Django が Python から使用できるか確認するために、シェル上で ``python`` と 入力します。 Python プロンプトの中で、 Django を import してみます:: >>> import django >>> print django.get_version() 1.4 .. That's it! ---------- 以上です! ---------- .. That's it -- you can now :doc:`move onto the tutorial `. これだけです。さあ、 :doc:`チュートリアルをやってみましょう `.