On 02/17/2011 01:13 AM, Ahmed Bani wrote:
Problem solved: {{ #---- (CSS) -----) import random response.files.append(URL('static','css/menu.css')) response.files.append(URL('static','css/home.css')) #---- (JavaScript) --- response.files.append(URL('static','js/ajquery.scrollTo-min.js')) response.files.append(URL('static','js/bjquery.localscroll-1.2.7-min.js')) response.files.append(URL('static','js/zexamples.scroll.js')) #------ include web2py specific js code (jquery, calendar, form stuff) ------ }} {{include 'web2py_ajax.html'}} {{=toggle_menuclass()}} {{=response.flash or ''}} /web2py Enterprise web framework/ <%7B%7B=URL%28%27default%27,%27index%27%29%7D%7D> /{{=T('Home')}}/ <%7B%7B=URL%28%27default%27,%27index%27%29%7D%7D> /{{=T('About')}}/ <%7B%7B=URL%28%27default%27,%27what%27%29%7D%7D> /{{=T('Download')}}/ <%7B%7B=URL%28%27default%27,%27download%27%29%7D%7D> /{{=T('Staff')}}/ <%7B%7B=URL%28%27default%27,%27who%27%29%7D%7D> /{{=T('Support')}}/ <%7B%7B=URL%28%27default%27,%27support%27%29%7D%7D> /{{=T('Documentation')}}/ <%7B%7B=URL%28%27default%27,%27documentation%27%29%7D%7D> {{include}} {{block sidebar}} {{=T('Download')}} {{=T('Latest Stable ')}}{{=request.env.web2py_version[:15]}} <%7B%7B=URL%28%27default%27,%27download%27%29%7D%7D> {{=T('User groups')}} <%7B%7B=URL%28%27default%27,%27usergroups%27%29%7D%7D> {{=T('User Voice')}} <http://web2py.uservoice.com/> Twitter <http://twitter.com/web2py> {{=T('Live Chat (IRC)')}} <http://webchat.freenode.net/?channels=web2py> {{=T('F.A.Q.')}} <http://www.web2py.com/AlterEgo> {{=T('Quick Examples')}} <%7B%7B=URL%28%27default%27,%27examples%27%29%7D%7D> {{=T('Videos')}} <%7B%7B=URL%28%27default%27,%27videos%27%29%7D%7D> web2py Slices <http://www.web2pyslices.com/main/default/index> {{=T('Interactive demo')}} <http://www.web2py.com/demo_admin> {{=T('Free appliances')}} <http://www.web2py.com/appliances> {{=T('Plugins')}} <http://www.web2py.com/plugins> {{end}} © 2010 by Massimo Di Pierro # Download : hg clone https://web2py.googlecode.com/hg/ web2py # Follow the instructions: Title : Using psycopg2 with virtualenv on UbuntuLink: http://www.saltycrane.com/blog/2009/07/using-psycopg2-virtualenv-ubuntu-jaunty/Check your syntax : # /db/ = /DAL/('/postgres/://myself:mypass@127.0.0.1:5432/mydatabase') Enjoy it! Follow the instructions: Now, do we have to migrate web2py database and reimport it again? : Short tutorial to migrate web2py database - model and data <http://alexandremas.blogspot.com/2009/11/short-tutorial-to-migrate-web2py.html>
{{ ### # response._vars contains the dictionary returned by the controller action ### try: from gluon.serializers import json response.write(json(response._vars),escape=False) response.headers['Content-Type']='text/json' except: raise HTTP(405,'no json') }}
<<< text/html; name="appadmin.html": Unrecognized >>>
{{extend 'layout.html'}} {{""" You should not modify this file. It is used as default when a view is not provided for your controllers """}} {{=BEAUTIFY(response._vars)}}
request
{{=BEAUTIFY(request)}}session
{{=BEAUTIFY(session)}}response
{{=BEAUTIFY(response)}}{{response.headers['web2py-response-flash']=response.flash}}{{if len(response._vars)==1:}}{{=response._vars.values()[0]}}{{else:}}{{=BEAUTIFY(response._vars)}}{{pass}}