Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pyramid.pdf
Скачиваний:
10
Добавлен:
24.03.2015
Размер:
3.82 Mб
Скачать

37. SQLALCHEMY + URL DISPATCH WIKI TUTORIAL

<div id="middle">

<div class="middle align-right">

<div id="left" class="app-welcome align-left"> Viewing <b><span tal:replace="page.name">Page Name

Goes Here</span></b><br/>

You can return to the

<a href="${request.application_url}">FrontPage</a>.<br/>

</div>

<div id="right" class="app-welcome align-right"> <span tal:condition="logged_in">

<a href="${request.application_url}/logout">Logout</a>

</span>

</div>

</div>

</div>

<div id="bottom">

<div class="bottom">

<div tal:replace="structure content"> Page text goes here.

</div>

<p>

<a tal:attributes="href edit_url" href=""> Edit this page

</a>

</p>

</div>

</div>

</div>

<div id="footer"> <div class="footer"

>© Copyright 2008-2011, Agendaless Consulting.</div>

</div>

</body>

</html>

(Only the highlighted lines need to be added.)

37.7.9 Viewing the Application in a Browser

We can finally examine our application in a browser (See Starting the Application). Launch a browser and visit each of the following URLs, check that the result is as expected:

http://localhost:6543/ invokes the view_wiki view. This always redirects to the view_page view of the FrontPage page object. It is executable by any user.

486

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]