/demo/exe/templates/website/db_test.tmpl
http://github.com/ThomasLocke/yolk · Go Template · 88 lines · 88 code · 0 blank · 0 comment · 0 complexity · 777d3a9ba8480c04ef6468c19553beaa MD5 · raw file
- @@-----------------------------------------------------------------------------
- @@-- --
- @@-- Yolk --
- @@-- --
- @@-- Copyright (C) 2000-2012, Thomas Løcke --
- @@-- --
- @@-- This is free software; you can redistribute it and/or modify it --
- @@-- under terms of the GNU General Public License as published by the --
- @@-- Free Software Foundation; either version 3, or (at your option) any --
- @@-- later version. This library is distributed in the hope that it will be --
- @@-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
- @@-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
- @@-- You should have received a copy of the GNU General Public License and --
- @@-- a copy of the GCC Runtime Library Exception along with this program; --
- @@-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
- @@-- <http://www.gnu.org/licenses/>. --
- @@-- --
- @@-----------------------------------------------------------------------------
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <link rel="stylesheet" type="text/css" href="/css/index.css"/>
- <link rel="icon" href="/images/favicon.ico" type="image/x-icon"/>
- <title>
- Yolk Web Toolbox
- </title>
- </head>
- <body>
- <h3>PostgreSQL test</h3>
- @@IF@@ @_POSTGRESQL_SETUP_@
- <p>
- Connection to PostgreSQL database succeeded.
- </p>
- <p>
- The test will now proceed with creating a table, inserting and querying some data and finally dropping the table.
- </p>
- <h4>Test output</h4>
- <ul>
- @@TABLE@@
- <li>@_POSTGRESQL_MESSAGES_@</li>
- @@END_TABLE@@
- @@IF@@ @_POSTGRESQL_SUCCESS_@
- <li class="green">Test successfully completed!</li>
- @@ELSE@@
- <li class="red">Test failed!</li>
- @@END_IF@@
- </ul>
- @@ELSE@@
- <p>
- In order to test if Yolk can connect and interact with a PostgreSQL database, you must create an empty PostgreSQL database and then set the four database parameters in configuration/my_config.ini accordingly:
- </p>
- <ul>
- <li>DB_Host</li>
- <li>DB_Name</li>
- <li>DB_Password</li>
- <li>DB_User</li>
- </ul>
- <p>
- You do not need to create any tables in the DB_Name database.
- </p>
- <p>
- When you've done this, simply refresh this page, or drop this test and go back to the <a href="/">main page</a>.
- </p>
- @@END_IF@@
- <h3>SQLite test</h3>
- <p>
- Connection to SQLite database succeeded.
- </p>
- <p>
- The test will now proceed with inserting, querying and deleting some data.
- </p>
- <h4>Test output</h4>
- <ul>
- @@TABLE@@
- <li>@_SQLITE_MESSAGES_@</li>
- @@END_TABLE@@
- @@IF@@ @_SQLITE_SUCCESS_@
- <li class="green">Test successfully completed!</li>
- @@ELSE@@
- <li class="red">Test failed!</li>
- @@END_IF@@
- </ul>
- <p>
- If all went well, go back to the <a href="/">main page</a>. If you have some red output, check the log files, fix the error and try again.
- </p>
- </body>
- </html>