Mercurial > p > roundup > code
view 3rdparty/bootstrap/less/tests/navbar.html @ 5525:bb7865241f8a
Make CSV import/export compatible across Python versions (also RDBMS journals) (issue 2550976, issue 2550975).
The roundup-admin export and import commands are used for migrating
between different database backends. It is desirable that they should
be usable also for migrations between Python 2 and Python 3, and in
some cases (e.g. with the anydbm backend) this may be required.
To be usable for such migrations, the format of the generated CSV
files needs to be stable, meaning the same as currently used with
Python 2. The export process uses repr() to produce the fields in the
CSV files and eval() to convert them back to Python data structures.
repr() of strings with non-ASCII characters produces different results
for Python 2 and Python 3.
This patch adds repr_export and eval_import functions to
roundup/anypy/strings.py which provide the required operations that
are just repr() and eval() in Python 2, but are more complicated in
Python 3 to use data representations compatible with Python 2. These
functions are then used in the required places for export and import.
repr() and eval() are also used in storing the dict of changed values
in the journal for the RDBMS backends. It is similarly desirable that
the database be compatible between Python 2 and Python 3, so that
export and import do not need to be used for a migration between
Python versions for non-anydbm back ends. Thus, this patch changes
rdbms_common.py in the places involved in storing journals in the
database, not just in those involved in import/export.
Given this patch, import/export with non-ASCII characters appear based
on some limited testing to work across Python versions, and an
instance using the sqlite backend appears to be compatible between
Python versions without needing import/export, *if* the sessions/otks
databases (which use anydbm) are deleted when changing Python version.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Sun, 02 Sep 2018 23:48:04 +0000 |
| parents | c109f7c1e477 |
| children |
line wrap: on
line source
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap, from Twitter</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../../docs/assets/css/bootstrap.css" rel="stylesheet"> <style> body { padding-top: 0; padding-bottom: 30px; } .navbar { margin-top: 20px; } </style> <link href="../../docs/assets/css/bootstrap-responsive.css" rel="stylesheet"> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../../docs/assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../../docs/assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../../docs/assets/ico/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="../../docs/assets/ico/apple-touch-icon-57-precomposed.png"> <link rel="shortcut icon" href="../../docs/assets/ico/favicon.png"> </head> <body> <div class="container"> <!-- Static navbar --> <div class="navbar"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="#">Project name</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li class="nav-header">Nav header</li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> <ul class="nav pull-right"> <li class="active"><a href="./navbar.html">Default</a></li> <li><a href="./navbar-static-top.html">Static top</a></li> <li><a href="./navbar-fixed-top.html">Fixed top</a></li> </ul> </div><!--/.nav-collapse --> </div> </div> </div> <!-- Main hero unit for a primary marketing message or call to action --> <div class="hero-unit"> <h1>Navbar example</h1> <p>This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.</p> <p> <a class="btn btn-large btn-primary" href="../components.html#navbar">View navbar docs »</a> </p> </div> </div> <!-- /container --> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="../../docs/assets/js/jquery.js"></script> <script src="../../docs/assets/js/bootstrap-transition.js"></script> <script src="../../docs/assets/js/bootstrap-alert.js"></script> <script src="../../docs/assets/js/bootstrap-modal.js"></script> <script src="../../docs/assets/js/bootstrap-dropdown.js"></script> <script src="../../docs/assets/js/bootstrap-scrollspy.js"></script> <script src="../../docs/assets/js/bootstrap-tab.js"></script> <script src="../../docs/assets/js/bootstrap-tooltip.js"></script> <script src="../../docs/assets/js/bootstrap-popover.js"></script> <script src="../../docs/assets/js/bootstrap-button.js"></script> <script src="../../docs/assets/js/bootstrap-collapse.js"></script> <script src="../../docs/assets/js/bootstrap-carousel.js"></script> <script src="../../docs/assets/js/bootstrap-typeahead.js"></script> </body> </html>
