Peeking at file "demo_app3/models/menu.py"

<<back Edit

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations

#########################################################################
## Customize your APP title, subtitle and menus here
#########################################################################

response.logo = A(B('web',SPAN(2),'py'),XML('&trade;&nbsp;'),
_class="brand",_href="http://www.web2py.com/")
response.title = request.application.replace('_',' ').title()
response.subtitle = ''

## read more at http://dev.w3.org/html5/markup/meta.name.html
response.meta.author = 'Your Name <you@example.com>'
response.meta.description = 'a cool new app'
response.meta.keywords = 'web2py, python, framework'
response.meta.generator = 'Web2py Web Framework'

## your http://google.com/analytics id
response.google_analytics_id = None

#########################################################################
## this is the main application menu add/remove items as required
#########################################################################

response.menu = [
(
T('Home'), False, URL('default', 'index'), [])
]

DEVELOPMENT_MENU = True

#########################################################################
## provide shortcuts for development. remove in production
#########################################################################

def _():
# shortcuts
app = request.application
ctr = request.controller
# useful links to internal and external resources
response.menu += [
(
SPAN('web2py', _class='highlighted'), False, 'http://web2py.com', [
(
T('My Sites'), False, URL('demo_admin', 'default', 'site')),
(
T('This App'), False, URL('demo_admin', 'default', 'design/%s' % app), [
(
T('Controller'), False,
URL(
'demo_admin', 'default', 'edit/%s/controllers/%s.py' % (app, ctr))),
(
T('View'), False,
URL(
'demo_admin', 'default', 'edit/%s/views/%s' % (app, response.view))),
(
T('Layout'), False,
URL(
'demo_admin', 'default', 'edit/%s/views/layout.html' % app)),
(
T('Stylesheet'), False,
URL(
'demo_admin', 'default', 'edit/%s/static/css/web2py.css' % app)),
(
T('DB Model'), False,
URL(
'demo_admin', 'default', 'edit/%s/models/db.py' % app)),
(
T('Menu Model'), False,
URL(
'demo_admin', 'default', 'edit/%s/models/menu.py' % app)),
(
T('Database'), False, URL(app, 'appadmin', 'index')),
(
T('Errors'), False, URL(
'demo_admin', 'default', 'errors/' + app)),
(
T('About'), False, URL(
'demo_admin', 'default', 'about/' + app)),
]),
(
'web2py.com', False, 'http://www.web2py.com', [
(
T('Download'), False,
'http://www.web2py.com/examples/default/download'),
(
T('Support'), False,
'http://www.web2py.com/examples/default/support'),
(
T('Demo'), False, 'http://web2py.com/demo_admin'),
(
T('Quick Examples'), False,
'http://web2py.com/examples/default/examples'),
(
T('FAQ'), False, 'http://web2py.com/AlterEgo'),
(
T('Videos'), False,
'http://www.web2py.com/examples/default/videos/'),
(
T('Free Applications'),
False, 'http://web2py.com/appliances'),
(
T('Plugins'), False, 'http://web2py.com/plugins'),
(
T('Layouts'), False, 'http://web2py.com/layouts'),
(
T('Recipes'), False, 'http://web2pyslices.com/'),
(
T('Semantic'), False, 'http://web2py.com/semantic'),
]),
(
T('Documentation'), False, 'http://www.web2py.com/book', [
(
T('Preface'), False,
'http://www.web2py.com/book/default/chapter/00'),
(
T('Introduction'), False,
'http://www.web2py.com/book/default/chapter/01'),
(
T('Python'), False,
'http://www.web2py.com/book/default/chapter/02'),
(
T('Overview'), False,
'http://www.web2py.com/book/default/chapter/03'),
(
T('The Core'), False,
'http://www.web2py.com/book/default/chapter/04'),
(
T('The Views'), False,
'http://www.web2py.com/book/default/chapter/05'),
(
T('Database'), False,
'http://www.web2py.com/book/default/chapter/06'),
(
T('Forms and Validators'), False,
'http://www.web2py.com/book/default/chapter/07'),
(
T('Email and SMS'), False,
'http://www.web2py.com/book/default/chapter/08'),
(
T('Access Control'), False,
'http://www.web2py.com/book/default/chapter/09'),
(
T('Services'), False,
'http://www.web2py.com/book/default/chapter/10'),
(
T('Ajax Recipes'), False,
'http://www.web2py.com/book/default/chapter/11'),
(
T('Components and Plugins'), False,
'http://www.web2py.com/book/default/chapter/12'),
(
T('Deployment Recipes'), False,
'http://www.web2py.com/book/default/chapter/13'),
(
T('Other Recipes'), False,
'http://www.web2py.com/book/default/chapter/14'),
(
T('Buy this book'), False,
'http://stores.lulu.com/web2py'),
]),
(
T('Community'), False, None, [
(
T('Groups'), False,
'http://www.web2py.com/examples/default/usergroups'),
(
T('Twitter'), False, 'http://twitter.com/web2py'),
(
T('Live Chat'), False,
'http://webchat.freenode.net/?channels=web2py'),
]),
(
T('Plugins'), False, None, [
(
'plugin_wiki', False,
'http://web2py.com/examples/default/download'),
(
T('Other Plugins'), False,
'http://web2py.com/plugins'),
(
T('Layout Plugins'),
False, 'http://web2py.com/layouts'),
])
]
)]
if DEVELOPMENT_MENU: _()

if "auth" in locals(): auth.wikimenu()