clone3wizardapp
Abiword HTML Document

example[code01]... clone3wizardapp entered code:

Models 0.py

from gluon.storage import Storage

settings = Storage()

settings.migrate = True

settings.title ='clone3 WizardApp'

settings.subtitle = ''

settings.author = 'you'

#wizard more lines...

Models db_wizard.py

### we prepend t_ to tablenames and f_ to fieldnames for disambiguity

db.define_table('DIARYORGANIZER',Field('DIARYDATE','datetime',length=250,label='Date'),

Field('DIARYNOTES','text',label='Note'),

Field('ID_DIARYALLERT','integer',label='Id Allert'),

Field('EMAIL','string',length=512,label='E-mail'))

# end.

Models menu,py

response.title = settings.title

response.subtitle = settings.subtitle

response.meta.author = '%(author)s <%(author_email)s>' % settings

response.meta.keywords = settings.keywords

response.meta.description = settings.description

response.menu = [

(T('only index'),URL('default','index')==URL(),URL('default','index'),[]),

(T('new page01'),URL('default','page01')==URL(),URL('default','page01'),[]),

(T('new page02'),URL('default','page02')==URL(),URL('default','page02'),[]),

]

# end.

Controllers default.py

# -*- coding: utf-8 -*-

### required - do no delete

def user(): return dict(form=auth())

def download(): return response.download(request,db)

def call(): return service()

### end requires

def index():

   return dict()

@auth.requires_login()

def page01():

   grid=SQLFORM.grid(db.DIARYORGANIZER)

   return dict(AssAllert_grid = grid)

@auth.requires_login()

def page02():

   # Creamo tramite SQLFORM() la form di input/output tabella DIARYORGANIZER

   # db.DIARYORGANIZER tramite l'oggetto web2py (form)

   form=SQLFORM(db.DIARYORGANIZER)

   #ALL per tutti i records della tabella DIARYORGANIZER

   rows=db().select(db.DIARYORGANIZER.ALL)

   # Controllo inserimento e/o modifica sui singoli campi

   if form.accepts(request.vars,session):

       # messaggio di conferma inserimento corretto

       response.flash='Insert new record done'

   elif form.errors:

       # messaggio di errore inserimento errato e/o incompleto

       response.flash='Fields value Error!!! '

   return dict(AssAllert_form = form)

# end.

Views index.html

{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}

{{extend 'layout.html'}}

<div class="panel-body">

{{=T("panel-body")}}

</div>

<div class="panel panel-info">

 <div class="panel-heading"><h3 class="panel-title"><a class="btn-block"

     href="{{=URL('default','index')}}">

     <i class="glyphicon glyphicon-cog"></i>

     {{=T("URL=index")}}

   </a></h3></div>

{{block header}}

   <header class="container-fluid background">

     <div class="jumbotron text-left">

       {{if response.title:}}

       <h1>{{=response.title}}

         <small>{{=response.subtitle or ''}}</small></h1>

       {{pass}}

     </div>

   </header>

{{end}}

{{if 'message' in globals():}}

<h2>{{=message}}</h2>

<p class="lead">{{=T('skole.org how did you get here?')}}</p>

<ol>

 <li>{{=T('You are successfully running web2py')}}</li>

 <li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>

 <li>{{=XML(T('Which called the function %s located in the file %s',

   (A(request.function+'()',_href='#'),

   A('web2py/applications/%(application)s/controllers/%(controller)s.py' % request,

   _href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>

 <li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',

   A('web2py/applications/%(application)s/views/%(controller)s/index.html' % request,

   _href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>

 <li>{{=T('You can modify this application and adapt it to your needs')}}</li>

</ol>

{{elif 'content' in globals():}}

{{=content}}

{{else:}}

{{=BEAUTIFY(response._vars)}}

{{pass}}

{{block right_sidebar}}

<div class="panel panel-info">

 <div class="panel-heading"><h3 class="panel-title"><a class="btn-block"

     href="{{=URL('admin','default','index')}}">

     <i class="glyphicon glyphicon-cog"></i>

     {{=T("admin")}}

   </a></h3></div>

 <div class="panel-body">

   {{=T("Don't know what to do?")}}

 </div>

 <ul class="list-group">

   <li class="list-group-item">{{=A(T("skole online examples"), _href=URL('examples','default','index'))}}</li>

   <li class="list-group-item"><a href="http://www.pi-ppo.org/pi-ppo">skole www.pi-ppo.org</a></li>

   <li class="list-group-item"><a href="http://www.pi-ppo.org/book">{{=T('Documentation')}}</a></li>

 </ul>

</div>

{{end}}

# end

Views page01.html

{{extend 'layout.html'}}

<h1>This is the page01.htmlwizard front end engineering design</h1>

{{=BEAUTIFY(response._vars)}}

{{AssAllert_grid}}

# end

Views page02.html

{{extend 'layout.html'}}

<h1>This is the page02.htmlwizard front end engineering design</h1>

{{=BEAUTIFY(response._vars)}}

{{AssAllert_form}}

# end

Layout.html

...

0204.png

are not defined...

CONTACT US

 

  Tel: .....

FOLLOW US

PROFILE

Profile ...

© Copyright 2016-2019 All Rights Reserved.