On Jun 27, 2012, at 6:15 AM, Massimo Di Pierro wrote:
> Me neither but look into routes.
There's an obscure reason that this message can be generated: if init/compiled/
exists, but init/compiled/controllers_default_generic.pyc does not, you'll get
it.
(The main reason is that the controller exists but the function-finding regex
doesn't find the function.)
>
> On Wednesday, 27 June 2012 01:40:50 UTC-5, Annet wrote:
> I have the following menu:
>
> response.util_menu=[
> ['Disclaimer',request.function=='generic' and
> request.args(0)=='disclaimer',URL('util','generic',args='disclaimer')],
> ['Privacy',request.function=='generic' and
> request.args(0)=='privacy',URL('util','generic',args='privacy')],
> ['Copyright',request.function=='generic' and
> request.args(0)=='copyright',URL('util','generic',args='copyright')],
> ['Cookies',request.function=='generic' and
> request.args(0)=='cookies',URL('util','generic',args='cookies')],
> ['Site map',request.function=='generic' and
> request.args(0)=='sitemap',URL('util','generic',args='sitemap')],
> ['Contact',request.function=='contact',URL('util','contact')]]
>
> ... and in a controller util.py the following function:
>
> def generic():
> if request.args(0) in
> ['disclaimer','privacy','copyright','cookies','sitemap']:
> response.view='util/' + str(request.args(0)) + '.html'
> else:
> redirect(URL('default','error'))
> return dict()
>
> ... and the following view named util/disclaimer.html:
>
> {{extend 'default/layout.html'}}
>
> <div class="row-fluid">
> <div class="span12">
> Disclaimer text here
> </div> <!-- /span -->
> </div> <!-- /row -->
>
> When I request: http://127.0.0.1:8000/init/util/generic/disclaimer
> I get: invalid function (default/util)
>
> I don't understand why.
--