Added configuration and testing docs.

master
Brandon Taylor 2014-08-20 23:57:01 -04:00
parent b031d458cd
commit 512440f9e5
15 changed files with 263 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
Configuring Django Admin Sortable
=================================
Configuring django-admin-sortable is quite simple:
1. Add ``adminsortable`` to your ``INSTALLED_APPS``.
2. Ensure ``django.core.context_processors.static`` is in your ``TEMPLATE_CONTEXT_PROCESSORS``.
Static Media
------------
django-admin-sortable includes a few CSS and JavaScript files. The preferred method of getting these files into your project is to use the `staticfiles app <https://docs.djangoproject.com/en/1.6/ref/contrib/staticfiles/>`_.
Alternatively, you can copy or symlink the ``adminsortable`` folder inside the ``static`` directory to the location you serve static files from.

View File

@ -36,6 +36,7 @@ What's New in |version|?
Contents: Contents:
---------
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
@ -45,6 +46,7 @@ Contents:
usage usage
django-cms django-cms
known-issues known-issues
testing
rationale rationale
status status
future future

View File

@ -0,0 +1,12 @@
Testing
=======
Have a look at the included :doc:`/sample_project` directory to see a working project. The login credentials for admin are: admin/admin
When a model is sortable, a tool-area link will be added that says "Change Order". Click this link, and you will be taken to the custom view where you can drag-and-drop the records into order.
Inlines may be drag-and-dropped into any order directly from the change form.
Unit and functional tests may be found in the ``app/tests.py`` file and run via:
$ python manage.py test app

View File

@ -7,7 +7,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>&lt;no title&gt; &mdash; Django Admin Sortable 1.7.0 documentation</title> <title>Configuring Django Admin Sortable &mdash; Django Admin Sortable 1.7.0 documentation</title>
@ -58,8 +58,12 @@
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li> <li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Configuring Django Admin Sortable</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#static-media">Static Media</a></li>
</ul>
</li>
</ul> </ul>
@ -83,7 +87,7 @@
<ul class="wy-breadcrumbs"> <ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li> <li><a href="index.html">Docs</a> &raquo;</li>
<li>&lt;no title&gt;</li> <li>Configuring Django Admin Sortable</li>
<li class="wy-breadcrumbs-aside"> <li class="wy-breadcrumbs-aside">
<a href="_sources/configuration.txt" rel="nofollow"> View page source</a> <a href="_sources/configuration.txt" rel="nofollow"> View page source</a>
@ -94,7 +98,22 @@
</div> </div>
<div role="main" class="document"> <div role="main" class="document">
<div class="section" id="configuring-django-admin-sortable">
<h1>Configuring Django Admin Sortable<a class="headerlink" href="#configuring-django-admin-sortable" title="Permalink to this headline"></a></h1>
<p>Configuring django-admin-sortable is quite simple:</p>
<blockquote>
<div><ol class="arabic simple">
<li>Add <code class="docutils literal"><span class="pre">adminsortable</span></code> to your <code class="docutils literal"><span class="pre">INSTALLED_APPS</span></code>.</li>
<li>Ensure <code class="docutils literal"><span class="pre">django.core.context_processors.static</span></code> is in your <code class="docutils literal"><span class="pre">TEMPLATE_CONTEXT_PROCESSORS</span></code>.</li>
</ol>
</div></blockquote>
<div class="section" id="static-media">
<h2>Static Media<a class="headerlink" href="#static-media" title="Permalink to this headline"></a></h2>
<p>django-admin-sortable includes a few CSS and JavaScript files. The preferred method of getting these files into your project is to use the <a class="reference external" href="https://docs.djangoproject.com/en/1.6/ref/contrib/staticfiles/">staticfiles app</a>.</p>
<p>Alternatively, you can copy or symlink the <code class="docutils literal"><span class="pre">adminsortable</span></code> folder inside the <code class="docutils literal"><span class="pre">static</span></code> directory to the location you serve static files from.</p>
</div>
</div>
</div> </div>
<footer> <footer>

View File

@ -60,6 +60,11 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li> <li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring Django Admin Sortable</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#static-media">Static Media</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
</ul> </ul>

View File

@ -60,6 +60,11 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li> <li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring Django Admin Sortable</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#static-media">Static Media</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
</ul> </ul>
@ -121,10 +126,17 @@
<ul class="simple"> <ul class="simple">
<li>Python 2.6 backwards compatibility. Thanks <a class="reference external" href="https://github.com/EnTeQuAk">&#64;EnTeQuAk</a></li> <li>Python 2.6 backwards compatibility. Thanks <a class="reference external" href="https://github.com/EnTeQuAk">&#64;EnTeQuAk</a></li>
</ul> </ul>
<p>Contents:</p> </div>
<div class="section" id="contents">
<h2>Contents:<a class="headerlink" href="#contents" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li> <li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring Django Admin Sortable</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#static-media">Static Media</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -59,6 +59,11 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li> <li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring Django Admin Sortable</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#static-media">Static Media</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
</ul> </ul>

View File

@ -1 +1 @@
Search.setIndex({envversion:42,terms:{through:0,group:0,thank:0,easi:0,should:2,add:[0,2],adminsort:2,introduc:0,"return":2,get:2,python:0,context_processor:2,"import":2,now:2,tbd:[],template_context_processor:2,enabl:0,drop:[0,2],item:0,where:2,page:0,view:2,pleas:0,set:2,sortableadmin:2,individu:0,meta:2,"static":2,pass:2,compat:0,index:0,wire:2,content:0,"new":[],attribut:0,core:2,here:2,base:0,"super":0,"__unicode__":2,search:0,manag:0,charfield:2,chang:0,simpli:2,extra:2,modul:0,ensur:2,instal:2,installed_app:2,your:[0,2],from:2,wai:0,regist:2,start:2,max_length:2,more:2,desir:2,option:2,tupl:0,tool:2,site:2,link:2,entequak:0,inlin:0,present:2,made:0,project:2,defin:2,below:0,can:2,def:2,quickstart:[],almost:0,changelist:2,ani:[0,2],need:2,have:2,pip:2,mysortableadminclass:2,incompat:0,mysortableclass:2,titl:2,self:2,format:0,when:2,also:0,take:2,you:[0,2],updat:0,sorting_filt:0,object:2,drag:[0,2],mai:0,"class":2,inherit:2,model:[0,2],backward:0,order:[0,2],latest:0},objtypes:{},objnames:{},filenames:["index","configuration","quickstart"],titles:["Welcome to Django Admin Sortable&#8217;s documentation!","&lt;no title&gt;","Quickstart"],objects:{},titleterms:{what:0,sortabl:0,welcom:0,quickstart:2,admin:0,support:0,indic:0,django:0,version:0,tabl:0,"new":0,document:0,higher:[]}}) Search.setIndex({envversion:42,terms:{through:0,file:[1,2],group:0,thank:0,easi:0,should:3,add:[0,1,3],folder:1,adminsort:[1,3],modul:0,introduc:0,"return":3,get:[1,3],python:[0,2],context_processor:[1,3],"import":3,now:3,tbd:[],template_context_processor:[1,3],enabl:0,drop:[0,2,3],staticfil:1,item:0,found:2,where:[2,3],page:0,view:[2,3],pleas:0,set:3,sortableadmin:3,individu:0,see:2,meta:3,"static":3,pass:3,click:2,compat:0,index:0,wire:3,defin:3,content:[],"new":[],method:1,attribut:0,altern:1,core:[1,3],run:2,insid:1,javascript:1,here:3,base:0,symlink:1,locat:1,"super":0,"__unicode__":3,search:0,manag:[0,2],charfield:3,chang:[0,2],via:2,simpli:3,directli:2,extra:3,app:[1,2],prefer:1,ensur:[1,3],instal:3,installed_app:[1,3],your:[0,1,3],unit:2,quit:1,from:[1,2,3],wai:0,area:2,regist:3,custom:2,start:3,max_length:3,includ:[1,2],taken:2,more:3,"function":2,desir:3,option:3,form:2,tupl:0,tool:[2,3],copi:1,ani:[0,2,3],link:[2,3],entequak:0,inlin:[0,2],present:3,serv:1,made:0,look:2,work:2,project:[1,2,3],record:2,below:0,can:[1,2,3],def:3,sai:2,quickstart:[],few:1,almost:0,changelist:3,site:3,need:3,have:[2,3],pip:3,mysortableadminclass:3,incompat:0,mysortableclass:3,titl:3,self:3,format:0,when:[2,3],also:0,take:3,test:[],you:[0,1,2,3],simpl:1,css:1,updat:0,sorting_filt:0,"class":3,object:3,drag:[0,2,3],mai:[0,2],login:2,directori:[1,2],credenti:2,inherit:3,sample_project:2,thi:2,model:[0,2,3],backward:0,order:[0,2,3],latest:0},objtypes:{},objnames:{},filenames:["index","configuration","testing","quickstart"],titles:["Welcome to Django Admin Sortable&#8217;s documentation!","Configuring Django Admin Sortable","Testing","Quickstart"],objects:{},titleterms:{what:0,sortabl:[0,1],welcom:0,quickstart:3,admin:[0,1],media:1,support:0,configur:1,indic:0,django:[0,1],content:0,version:0,"static":1,tabl:0,test:2,"new":0,document:0,higher:[]}})

175
docs/_build/html/testing.html vendored 100644
View File

@ -0,0 +1,175 @@
<!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>Testing &mdash; Django Admin Sortable 1.7.0 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="Django Admin Sortable 1.7.0 documentation" href="index.html"/>
<link rel="prev" title="Configuring Django Admin Sortable" href="configuration.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/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-nav-search">
<a href="index.html" class="fa fa-home"> Django Admin Sortable</a>
<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"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring Django Admin Sortable</a><ul>
<li class="toctree-l2"><a class="reference internal" href="configuration.html#static-media">Static Media</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Testing</a></li>
</ul>
</div>
&nbsp;
</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 Admin Sortable</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>Testing</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/testing.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document">
<div class="section" id="testing">
<h1>Testing<a class="headerlink" href="#testing" title="Permalink to this headline"></a></h1>
<p>Have a look at the included <code class="xref doc docutils literal"><span class="pre">/sample_project</span></code> directory to see a working project. The login credentials for admin are: admin/admin</p>
<p>When a model is sortable, a tool-area link will be added that says &#8220;Change Order&#8221;. Click this link, and you will be taken to the custom view where you can drag-and-drop the records into order.</p>
<p>Inlines may be drag-and-dropped into any order directly from the change form.</p>
<p>Unit and functional tests may be found in the <code class="docutils literal"><span class="pre">app/tests.py</span></code> file and run via:</p>
<blockquote>
<div>$ python manage.py test app</div></blockquote>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="configuration.html" class="btn btn-neutral" title="Configuring Django Admin Sortable"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2014, Brandon Taylor.
</p>
</div>
<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx 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:'1.7.0',
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>

View File

@ -46,7 +46,7 @@ Contents:
usage usage
django-cms django-cms
known-issues known-issues
tests testing
rationale rationale
status status
future future

12
docs/testing.rst 100644
View File

@ -0,0 +1,12 @@
Testing
=======
Have a look at the included :doc:`/sample_project` directory to see a working project. The login credentials for admin are: admin/admin
When a model is sortable, a tool-area link will be added that says "Change Order". Click this link, and you will be taken to the custom view where you can drag-and-drop the records into order.
Inlines may be drag-and-dropped into any order directly from the change form.
Unit and functional tests may be found in the ``app/tests.py`` file and run via:
$ python manage.py test app