Sophie

Sophie

distrib > Fedora > 20 > x86_64 > media > updates > by-pkgid > 3732cf025cb346736dec18a159b95d9b > files > 523

python3-django-doc-1.6.8-1.fc20.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>How to install Django on Windows &mdash; Django 1.6.8 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.6.8',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Django 1.6.8 documentation" href="../index.html" />
    <link rel="up" title="“How-to” guides" href="index.html" />
    <link rel="next" title="Django FAQ" href="../faq/index.html" />
    <link rel="prev" title="Deploying static files" href="static-files/deployment.html" />



 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>


  </head>
  <body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 1.6.8 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="static-files/deployment.html" title="Deploying static files">previous</a> 
     |
    <a href="index.html" title="&amp;#8220;How-to&amp;#8221; guides" accesskey="U">up</a>
   |
    <a href="../faq/index.html" title="Django FAQ">next</a> &raquo;</div>
    </div>
    
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="howto-windows">
            
  <div class="section" id="s-how-to-install-django-on-windows">
<span id="how-to-install-django-on-windows"></span><h1>How to install Django on Windows<a class="headerlink" href="#how-to-install-django-on-windows" title="Permalink to this headline">¶</a></h1>
<p>This document will guide you through installing Python and Django for basic
usage on Windows. This is meant as a beginner&#8217;s guide for users working on
Django projects and does not reflect how Django should be installed when
developing patches for Django itself.</p>
<p>The steps in this guide have been tested with Windows 7 and 8. In other
versions, the steps would be similar.</p>
<div class="section" id="s-install-python">
<span id="install-python"></span><h2>Install Python<a class="headerlink" href="#install-python" title="Permalink to this headline">¶</a></h2>
<p>Django is a Python web framework, thus requiring Python to be installed on your
machine.</p>
<p>To install Python on your machine go to <a class="reference external" href="http://python.org/download/">http://python.org/download/</a>, and
download a Windows MSI installer for Python. Once downloaded, run the MSI
installer and follow the on-screen instructions.</p>
<p>After installation, open the command prompt and check the Python version by
executing <tt class="docutils literal"><span class="pre">python</span> <span class="pre">--version</span></tt>. If you encounter a problem, make sure you
have set the <tt class="docutils literal"><span class="pre">PATH</span></tt> variable correctly. You might need to adjust your
<tt class="docutils literal"><span class="pre">PATH</span></tt> environment variable to include paths to the Python executable and
additional scripts. For example, if your Python is installed in
<tt class="docutils literal"><span class="pre">C:\Python34\</span></tt>, the following paths need to be added to <tt class="docutils literal"><span class="pre">PATH</span></tt>:</p>
<div class="highlight-python"><pre>C:\Python34\;C:\Python34\Scripts;</pre>
</div>
</div>
<div class="section" id="s-install-setuptools">
<span id="install-setuptools"></span><h2>Install Setuptools<a class="headerlink" href="#install-setuptools" title="Permalink to this headline">¶</a></h2>
<p>To install Python packages on your computer, Setuptools is needed. Download the
latest version of <a class="reference external" href="http://pypi.python.org/pypi/setuptools">Setuptools</a> for
your Python version and follow the installation instructions given there.</p>
</div>
<div class="section" id="s-install-pip">
<span id="install-pip"></span><h2>Install PIP<a class="headerlink" href="#install-pip" title="Permalink to this headline">¶</a></h2>
<p><a class="reference external" href="http://www.pip-installer.org/">PIP</a> is a package manager for Python that
uses the <a class="reference external" href="http://pypi.python.org">Python Package Index</a> to install Python
packages. PIP will later be used to install Django from PyPI.</p>
<p>Open a command prompt and execute <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">pip</span></tt>. This will install
<tt class="docutils literal"><span class="pre">pip</span></tt> on your system. This command will work if you have successfully
installed Setuptools.</p>
<p>Alternatively, go to <a class="reference external" href="http://www.pip-installer.org/en/latest/installing.html">http://www.pip-installer.org/en/latest/installing.html</a>
for installing/upgrading instructions.</p>
</div>
<div class="section" id="s-install-django">
<span id="install-django"></span><h2>Install Django<a class="headerlink" href="#install-django" title="Permalink to this headline">¶</a></h2>
<p>Django can be installed easily using <tt class="docutils literal"><span class="pre">pip</span></tt>.</p>
<p>In the command prompt, execute the following command: <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">django</span></tt>.
This will download and install Django.</p>
<p>After the installation has completed, you can verify your Django installation
by executing <tt class="docutils literal"><span class="pre">django-admin.py</span> <span class="pre">--version</span></tt> in the command prompt.</p>
<div class="versionchanged">
<span class="title">Changed in Django Development version:</span> In Django 1.7, a <tt class="docutils literal"><span class="pre">.exe</span></tt> has been introduced, so just use
<tt class="docutils literal"><span class="pre">django-admin</span></tt> in place of <tt class="docutils literal"><span class="pre">django-admin.py</span></tt> in the command prompt.</div>
<p>See <a class="reference internal" href="../topics/install.html#database-installation"><em>Get your database running</em></a> for information on database installation
with Django.</p>
</div>
<div class="section" id="s-common-pitfalls">
<span id="common-pitfalls"></span><h2>Common pitfalls<a class="headerlink" href="#common-pitfalls" title="Permalink to this headline">¶</a></h2>
<ul>
<li><p class="first">If <tt class="docutils literal"><span class="pre">django-admin.py</span></tt> only displays the help text no matter what arguments
it is given, there is probably a problem with the file association in
Windows. Check if there is more than one environment variable set for
running Python scripts in <tt class="docutils literal"><span class="pre">PATH</span></tt>. This usually occurs when there is more
than one Python version installed.</p>
</li>
<li><p class="first">If you are connecting to the internet behind a proxy, there might be problem
in running the commands <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">pip</span></tt> and <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">django</span></tt>.
Set the environment variables for proxy configuration in the command prompt
as follows:</p>
<div class="highlight-python"><pre>set http_proxy=http://username:password@proxyserver:proxyport
set https_proxy=https://username:password@proxyserver:proxyport</pre>
</div>
</li>
<li><p class="first">Executing <tt class="docutils literal"><span class="pre">django-admin.py</span></tt> opens up a text file. This is due to the text
editor being the default program for <tt class="docutils literal"><span class="pre">.py</span></tt> files. This must be changed
to the <tt class="docutils literal"><span class="pre">python.exe</span></tt> located in the folder where Python is installed.</p>
</li>
</ul>
</div>
</div>


          </div>         
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">How to install Django on Windows</a><ul>
<li><a class="reference internal" href="#install-python">Install Python</a></li>
<li><a class="reference internal" href="#install-setuptools">Install Setuptools</a></li>
<li><a class="reference internal" href="#install-pip">Install PIP</a></li>
<li><a class="reference internal" href="#install-django">Install Django</a></li>
<li><a class="reference internal" href="#common-pitfalls">Common pitfalls</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="static-files/deployment.html">Deploying static files</a></li>
    
    
      <li>Next: <a href="../faq/index.html">Django FAQ</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django 1.6.8 documentation</a>
        
          <ul><li><a href="index.html">&#8220;How-to&#8221; guides</a>
        
        <ul><li>How to install Django on Windows</li></ul>
        </li></ul>
      </li>
  </ul>  

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/howto/windows.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Nov 11, 2014</p>
          </div> 
        
      
    </div>
    
    <div id="ft">
      <div class="nav">
    &laquo; <a href="static-files/deployment.html" title="Deploying static files">previous</a> 
     |
    <a href="index.html" title="&amp;#8220;How-to&amp;#8221; guides" accesskey="U">up</a>
   |
    <a href="../faq/index.html" title="Django FAQ">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>