django-oidc-provider/docs/_build/html/installation.html
2016-02-11 17:24:34 -03:00

249 lines
No EOL
7.7 KiB
HTML

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Installation &mdash; django-oidc-provider 0.2.5 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="django-oidc-provider 0.2.5 documentation" href="index.html"/>
<link rel="prev" title="Welcome to Django OIDC Provider Documentation!" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> django-oidc-provider
</a>
<div class="version">
0.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="#quick-installation">Quick Installation</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">django-oidc-provider</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>Installation</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/installation.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="installation">
<span id="id1"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<div class="section" id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Python: <code class="docutils literal"><span class="pre">2.7</span></code> <code class="docutils literal"><span class="pre">3.4</span></code></li>
<li>Django: <code class="docutils literal"><span class="pre">1.7</span></code> <code class="docutils literal"><span class="pre">1.8</span></code> <code class="docutils literal"><span class="pre">1.9</span></code></li>
</ul>
</div>
<div class="section" id="quick-installation">
<h2>Quick Installation<a class="headerlink" href="#quick-installation" title="Permalink to this headline"></a></h2>
<p>If you want to get started fast see our <code class="docutils literal"><span class="pre">/example_project</span></code> folder.</p>
<p>Install the package using pip:</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip install django-oidc-provider
</pre></div>
</div>
<p>Add it to your apps:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">INSTALLED_APPS</span> <span class="o">=</span> <span class="p">(</span>
<span class="s1">&#39;django.contrib.admin&#39;</span><span class="p">,</span>
<span class="s1">&#39;django.contrib.auth&#39;</span><span class="p">,</span>
<span class="s1">&#39;django.contrib.contenttypes&#39;</span><span class="p">,</span>
<span class="s1">&#39;django.contrib.sessions&#39;</span><span class="p">,</span>
<span class="s1">&#39;django.contrib.messages&#39;</span><span class="p">,</span>
<span class="s1">&#39;django.contrib.staticfiles&#39;</span><span class="p">,</span>
<span class="s1">&#39;oidc_provider&#39;</span><span class="p">,</span>
<span class="c1"># ...</span>
<span class="p">)</span>
</pre></div>
</div>
<p>Add the provider urls:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">urlpatterns</span> <span class="o">=</span> <span class="n">patterns</span><span class="p">(</span><span class="s1">&#39;&#39;</span><span class="p">,</span>
<span class="c1"># ...</span>
<span class="n">url</span><span class="p">(</span><span class="s1">r&#39;^openid/&#39;</span><span class="p">,</span> <span class="n">include</span><span class="p">(</span><span class="s1">&#39;oidc_provider.urls&#39;</span><span class="p">,</span> <span class="n">namespace</span><span class="o">=</span><span class="s1">&#39;oidc_provider&#39;</span><span class="p">)),</span>
<span class="c1"># ...</span>
<span class="p">)</span>
</pre></div>
</div>
<p>Generate server RSA key and run migrations (if you don&#8217;t):</p>
<div class="highlight-python"><div class="highlight"><pre>$ python manage.py creatersakey
$ python manage.py migrate
</pre></div>
</div>
<p>Add required variables to your project settings:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">SITE_URL</span> <span class="o">=</span> <span class="s1">&#39;http://localhost:8000&#39;</span>
<span class="n">LOGIN_URL</span> <span class="o">=</span> <span class="s1">&#39;/accounts/login/&#39;</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="index.html" class="btn btn-neutral" title="Welcome to Django OIDC Provider Documentation!" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2016, Juan Ignacio Fiorentino.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.2.5',
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>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>