Skip to content

Commit

Permalink
Rip configure-aspen.py out of doc
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Sep 2, 2014
1 parent eb3721e commit c37ab3e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 54 deletions.
18 changes: 7 additions & 11 deletions doc/api/website/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ doc_next = ""

<p>Aspen creates an instance of <code>aspen.website.Website</code> when it
starts up. It holds all of the global configuration for your application. It is
placed in the namespace of your <a
href="/configure-aspen.py/">configuration scripts</a> and <a
href="/simplates/">simplates</a>, where it is available from the first page
onwards.</p>
placed in the namespace of your <a href="/simplates/">simplates</a>, where it
is available from the first page onwards.</p>

<p>The following attributes are defined when aspen starts up based on
configuration in the environment (<code>ASPEN_NAME</code>) and on the command
Expand Down Expand Up @@ -38,9 +36,7 @@ line (<code>--name</code>):</p>
<h3>Computations</h3>

<p>The following computations are performed after environment and command line
configuration is processed, and before your <a
href="/configure-aspen.py/">configuration
scripts</a> run.</p>
configuration is processed.</p>

<ul>

Expand All @@ -51,10 +47,10 @@ configuration is processed, and before your <a

<li>If <b>project_root</b> is set, then the directory it points to is used
to resolve <code>{&#37; extends %}</code> and {&#37; include %} <a
href="/simplates/template/">templates</a> tags; any <a
href="/mime.types/">mime.types</a> file in there will be loaded; any
configure-aspen.py script in there will be executed; and it will be placed
at the front of sys.path, so you can import Python modules from there</li>
href="/simplates/template/">templates</a> tags; any <a
href="/mime.types/">mime.types</a> file in there will be loaded; and it will be
placed at the front of sys.path, so you can import Python modules from
there</li>

<li>Two dictionaries associated with resolving <a
href="/simplates/rendered/">renderers</a> are instantiated and
Expand Down
12 changes: 2 additions & 10 deletions doc/configuration/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ line. For each of the following there is an environment variable like
<tr><td>changes_reload</td> <td>yes</td> </tr>
<tr><td>charset_dynamic</td> <td>ISO-8859-1</td> </tr>
<tr><td>charset_static</td> <td>windows-1252</td> </tr>
<tr><td>configuration_scripts&nbsp;</td><td>script-one.py,another.py</td> </tr>
<tr><td>indices</td> <td>index.html, README</td> </tr>
<tr><td>list_directories</td> <td>False</td> </tr>
<tr><td>logging_threshold</td> <td>1</td> </tr>
Expand All @@ -26,11 +25,8 @@ line. For each of the following there is an environment variable like
<tr><td>unavailable</td> <td>0</td> </tr>
</table>

<p>Once aspen is initially configured, the <a
href="/configure-aspen.py/">scripts named by
<code>configuration_scripts</code></a> are executed with <a
href="/api/website/">the website object</a> in their namespace. Please
refer to <a href="/api/website/">the website page</a> for defaults.</p>
<p>Please refer to <a href="/api/website/">the website page</a> for
defaults.</p>

<h4 id="command-line-options">Command Line Options</h4>

Expand All @@ -52,10 +48,6 @@ Options:
-h, --help show this help message and exit

Basic Options:
-f CONFIGURATION_SCRIPTS, --configuration_scripts=CONFIGURATION_SCRIPTS
comma-separated list of paths to configuration files
in Python syntax to exec in addition to
$ASPEN_PROJECT_ROOT/configure-aspen.py
-l LOGGING_THRESHOLD, --logging_threshold=LOGGING_THRESHOLD
a small integer; 1 will suppress most of aspen's
internal logging, 2 will suppress all it [0]
Expand Down
20 changes: 0 additions & 20 deletions doc/configure-aspen.py/index.html.spt

This file was deleted.

1 change: 0 additions & 1 deletion doc/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ homepage = True
<li><a href="/deployment/">Deployment</a></li>
<li>Configuration Files
<ul>
<li><a href="/configure-aspen.py/"><code>configure-aspen.py</code></a></li>
<li><a href="/mime.types/"><code>mime.types</code></a></li>
<li><a href="/project_root/"><code>project_root</code></a></li>
</ul>
Expand Down
3 changes: 1 addition & 2 deletions doc/mime.types/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ browser:</p>

You get a <code>text/plain</code> response, because the <code>.smpl</code>
extension is unknown to Aspen, and <code>text/plain</code> is Aspen&rsquo;s
default (you can change this default in <code><a
href="/configure-aspen.py/">configure-aspen.py</a></code>).</p>
default.</p>

<p>Now put the following line in a file named <code>mime.types</code> in your
site&rsquo;s <code><a href="/project_root/">project_root</a></code> directory
Expand Down
8 changes: 2 additions & 6 deletions doc/project_root/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ flat.</p>

<h4>configuration files</h4>

<p>Aspen will read the following files from <code>project_root</code>.</p>

<ul>
<li><code><a href="/configure-aspen.py/">configure-aspen.py</a></code></li>
<li><code><a href="/mime.types/">mime.types</a></code></li>
</ul>
<p>Aspen will read the <code><a href="/mime.types/">mime.types</a></code> file
from <code>project_root</code>.</p>


<h4>Python modules</h4>
Expand Down
4 changes: 2 additions & 2 deletions doc/simplates/rendered/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Greetings, {&#123; program }}!</pre>


<p>You can set the default renderer for a given media type (presuming it is
installed) in <a href="/configure-aspen.py/">configure-aspen.py</a> like so:
installed) like so:
</p>

<pre>website.default_renderers_by_media_type['text/html'] = 'pystache'</pre>
Expand All @@ -43,7 +43,7 @@ installed) in <a href="/configure-aspen.py/">configure-aspen.py</a> like so:

<pre>website.default_renderers_by_media_type.default_factory = lambda: 'pystache'</pre>

<p>If this is being done in configure-aspen.py, it can also be phrased as:</p>
<p>It can also be phrased as:</p>

<pre>website.renderer_default = 'pystache'</pre>

Expand Down
3 changes: 1 addition & 2 deletions doc/virtual-paths/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ in it, then that real file will be preferred over the virtual one.
and are then unquoted (per <a
href="http://docs.python.org/library/urllib.html#urllib.unquote">urllib.unquote</a>).
You can also typecast path parts to arbitrary objects, by registering
typecasters in the <code>website.typecasters</code> dictionary in your <a
href="/configure-aspen.py/"><code>configure-aspen.py</code></a>. Typecasters
typecasters in the <code>website.typecasters</code> dictionary. Typecasters
for <code>int</code> and <code>float</code> are included out of the box.</p>

<p>Make a directory called <code style="white-space: nowrap">%year.int</code>
Expand Down

0 comments on commit c37ab3e

Please sign in to comment.