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

36. ZODB + TRAVERSAL WIKI TUTORIAL

40<div id="right" class="app-welcome align-right">

41<span tal:condition="logged_in">

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

43</span>

44</div>

45</div>

46</div>

47<div id="bottom">

48<div class="bottom">

49<div tal:replace="structure content">

50Page text goes here.

51</div>

52<p>

53<a tal:attributes="href edit_url" href="">

54Edit this page

55</a>

56</p>

57</div>

58</div>

59</div>

60<div id="footer">

61<div class="footer"

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

63</div>

64</body>

65</html>

36.7.10 View the Application in a Browser

We can finally examine our application in a browser. The views we’ll try are as follows:

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

Visiting http://localhost:6543/FrontPage/ in a browser invokes the view_page view of the FrontPage Page resource. This is because it’s the default view (a view without a name) for Page resources. It is executable by any user.

Visiting http://localhost:6543/FrontPage/edit_page in a browser invokes the edit view for the FrontPage Page resource. It is executable by only the editor user. If a different user (or the anonymous user) invokes it, a login form will be displayed. Supplying the credentials with the username editor, password editor will show the edit page form being displayed.

430

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