Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > f57b2cbc6bd4a90f10089095b1f7fb88 > files > 81

python3-routes-2.4.1-1.mga7.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="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Introduction &#8212; Routes 2.4.1 documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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/language_data.js"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Setting up routes" href="setting_up.html" />
    <link rel="prev" title="Routes Documentation" href="index.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="setting_up.html" title="Setting up routes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Routes Documentation"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Routes 2.4.1 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="introduction">
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
<p>Routes tackles an interesting problem that comes up frequently in web
development, <em>how do you map URLs to your application’s actions</em>? That is, how
do you say that <em>this</em> should be accessed as “/blog/2008/01/08”, and “/login”
should do <em>that</em>? Many web frameworks have a fixed dispatching system; e.g.,
“/A/B/C” means to read file “C” in directory “B”, or to call method “C” of
class “B” in module “A.B”. These work fine until you need to refactor your code
and realize that moving a method changes its public URL and invalidates users’
bookmarks.  Likewise, if you want to reorganize your URLs and make a section
into a subsection, you have to change your carefully-tested logic code.</p>
<p>Routes takes a different approach. You determine your URL hierarchy and
actions separately, and then link them together in whichever ways you decide.
If you change your mind about a particular URL, just change one line in your
route map and never touch your action logic. You can even have multiple URLs
pointing to the same action; e.g., to support legacy bookmarks.  Routes was
originally inspired by the dispatcher in Ruby on Rails but has since diverged.</p>
<p>Routes is the primary dispatching system in the Pylons web framework, and an
optional choice in CherryPy. It can be added to any
framework without much fuss, and used for an entire site or a URL subtree.
It can also forward subtrees to other dispatching systems, which is how
TurboGears 2 is implemented on top of Pylons.</p>
<p>Current features:</p>
<ul class="simple">
<li>Sophisticated route lookup and URL generation</li>
<li>Named routes</li>
<li>Redirect routes</li>
<li>Wildcard paths before and after static parts</li>
<li>Sub-domain support built-in</li>
<li>Conditional matching based on domain, cookies, HTTP method (RESTful), and more</li>
<li>Easily extensible utilizing custom condition functions and route generation
functions</li>
<li>Extensive unit tests</li>
</ul>
<p>Buzzword compliance:  REST, DRY.</p>
<p>If you’re new to Routes or have not read the Routes 1.11 manual before, we
recommend reading the <a class="reference external" href="glossary.html">Glossary</a> before continuing.</p>
<p>This manual is written from the user’s perspective: how to use Routes in a
framework that already supports it. The <a class="reference external" href="porting.html">Porting</a>
manual describes how to add Routes support to a new framework.</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Routes Documentation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="setting_up.html"
                        title="next chapter">Setting up routes</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/introduction.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <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>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="setting_up.html" title="Setting up routes"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="Routes Documentation"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Routes 2.4.1 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2005-2017, Ben Bangert, Mike Orr, and numerous contributers.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.3.
    </div>
  </body>
</html>