here is my menu.py:
# -*- 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.title = ' '.join(word.capitalize() for word in request.application.
split('_'))
response.subtitle = T('customize me!')
## read more at http://dev.w3.org/html5/markup/meta.name.html
response.meta.author = 'xxx'
response.meta.description = 'xxx'
response.meta.keywords = 'xxx'
response.meta.generator = 'Web2py Web Framework'
#response.meta.copyright = 'Copyright
2012-'+str(datetime.datetime.now().year)
## your http://google.com/analytics id
response.google_analytics_id = "xxx"
#########################################################################
## this is the main application menu add/remove items as required
#########################################################################
response.menu = [
('',
False,A('START',_href=URL('default','index'),_title="Zurück
zur Startseite"), []),
('', False,A('ARTIKEL', _href=URL('default','Articles'),
_title="Liste aller Artikel"), []),
('', False,A('FILME',
_href=URL('default','Movies'),_title="Liste
aller Filme"), []),
('', False,A('KRITIKEN', _href=URL('default','Reviews'),
_title="Liste aller Kritiken"), [])
]
#########################################################################
## 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('INFOS',_style='color:white'),False, None, [
('',False,A('Impressum', _href=URL(r=request,c='default'
,f='Impressum'), _title="Informationen zu Movie-Alarm, Haftungsausschluss"
)),
('',False,A('Partnerschaft', _href=URL(r=request,c=
'default',f='Partner'), _title="Unsere Partnerseiten /Partner werden")),
('',False,A('Unterstütze MovieAlarm', _href=URL(r=
request,c='default',f='SupportMovieAlarm'), _title="Informationen wie du
dafür sorgen kannst das wir weiterhin gute inhalte für dich erstellen."))
]
)
]
#--------------------------Require
Authorization-----------------------------
if auth.has_membership('Author'):
response.menu+=[
(SPAN('AUTOREN',_style='color:yellow'),False, None, [
(T('Unfinished'),False,URL(r=request,c='author',f=
'unfinished')),
(T('Neuen Artikel Anlegen'),False,URL(r=request,c=
'author',f='newArticle')),
(T('Neues Review Schreiben'),False,URL(r=request,c=
'author',f='newReview')),
(T('Neuen Film Anlegen'),False,URL(r=request,c='author',
f='newMovie')),
(T('Neues Bild'),False,URL(r=request,c='author',f=
'newImage')),
(T('Hilfe für Autoren'),False,URL(r=request,c='manage',f
='Manuals')),
(T('Anleitung Schreiben'),False,URL(r=request,c='manage'
,f='WriteManual')),
(T('§ Infos zu Medien §'),False,URL(r=request,c='author'
,f='RInfos'))
]
)
]
_()
@anthony: I will look up how to connect to sqlite in python dbs and try it
@stifan: I am not sure what the problem is. I will keep your solution in
mind and try it tomorrow.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.