[web2py:18507] MVC question

2009-03-24 Thread Joseph Jude

All,
Just a question on the best practice - in terms of development 
continuous maintenance. web2py (like django) allows to define forms in
controller itself. And it allows having 'business logic' embedded in
views too. To bring out the application quickly, such mixing is fine.
But what about long term maintenance and also to call the application
truly MVC? What are your thoughts basis of your experience.

Thank you for sharing your thoughts on this,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18508] Re: MVC question

2009-03-24 Thread Yarko Tymciurak
Let's look at what is meant by the term business logic --- this is what
implementspart of a solution for a problem statement.  If we were talking
4-tier model, then
we would say business logic and engineering logic; it
is the implementation in language of the solution/problem space, and just a
further
decomposition --- still  implementation logic, still about the solution.

With me so far?

Now - what is presentation?  It is how something is shown to the user.

Does that require logic?  Yes, it certainly can (consider javascript, etc.).

What differentiates the logic of presentation form the logic of business?
 The concern, the
type of processing.  Is there some point at the boundary between these two
where it might be fuzzy?  Yes.  How do you resolve that?  You just make
a choice, and do it however you choose.  You'll probably do it differntly
than
I would.  In the details, there's rarely a right or wrong - there's a
better for this,
or better for that.

Back to this question about where do you define forms.

What is a form?  Is it strictly a presentation statement?  Or is it a
statement of
required interaction with the user?  Look:

Business logic:  we need name, address, phone to take an order
Engineering logic  we need input from user to collect name, address,
phone
Presentation logic:  we want Name to be above address, address above phone
- all on one form.

Business logic:  the customer may save his information with us, but that is
not required for an order
Engineering logic:  persist name, address, and phone if requested (e.g.
offer request to save)
Presentation:  Checkbox for save my info

Now - where do you define form?

It's a design decision - YOU decide.

But some things are rather clear:   validation logic probably should not be
part of the presentation (although there may be valid reasons for this in
your application)

Defining color of form probably does not belong in the controller (better
left somewhere else).

Does it make sense to separate basic definition of an HTML form from the
controller?  That depends - are you going to allow input through PDF forms?
 csv?  Then maybe it makes sense to separate this.   If you're a web-input
only application, then maybe not.

By now you get the idea:  some questions you can ask over and over, and get
guidelines, and reasons behind them (e.g. color of form), but _most_ of
these details are design decisions.  Part of these are made or encouraged a
certain way by the design decisions in the framework you choose to use;
 part of these will always be up to you, the software and web designer -
what makes sense for one application will better be done another way;  many
things won't matter all that much... until you use them long enough, and
then you will change your mind (e.g. refactor).

mvc is just another way to say you've split your application into a data
layer, a business layer, and a presentation layer - it's a separation of
concerns;  it serves to reduce design coupling.

The goal is a maintainable and extensible app.

The devil is in the details.

Questions of truly MVC are like truly agile or truly capitalist /
market economy or truly social --- as long as you don't loose the reasons
behind these, why these abstractions (shortcuts to concepts) came to be in
the first place, you're ok (otherwise you get into trouble):  maintainable,
extensible;  frequent feedback;  efficient, self-regulating allocation of
resources in society;  social responsibility to people in your community.


:-)

- Yarko


On Tue, Mar 24, 2009 at 1:37 AM, Joseph Jude ceph...@gmail.com wrote:


 All,
 Just a question on the best practice - in terms of development 
 continuous maintenance. web2py (like django) allows to define forms in
 controller itself. And it allows having 'business logic' embedded in
 views too. To bring out the application quickly, such mixing is fine.
 But what about long term maintenance and also to call the application
 truly MVC? What are your thoughts basis of your experience.

 Thank you for sharing your thoughts on this,
 Joseph
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18509] Re: MVC question

2009-03-24 Thread SergeyPo

I like the ability to prepare forms inside controllers. This really
makes difference from Rails, for e.g. And you get much cleaner View
code.

In controller you build your form and form processing code.
In view you place your form inside HTML as single {{=form}} statement
and glue javascript etc. So rationale behind MVC is preserved, but
with boundaries slightly shifted.

I personally prefer to build forms and menus in controller where you
have clean Python code, access to all functions, modules etc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18510] Re: problems with a query

2009-03-24 Thread Marco Prosperi


It works.
The problem seems to be that tilde is not a tilde in my original
query. I don't know how to get a tilde from my italian notebook
keyboard, so I copied from the PDF manual and paste it in my code.
I found out that if I open a Python shell, digit chr(126) and copy the
tilde character from there, then everything works fine

Marco


On 23 Mar, 22:52, Yarko Tymciurak yark...@gmail.com wrote:
 Hello Marco -

 Try this and tell us what you get:

 $ python web2py.py -S crm -M

  result=db().select( db.allineamento_erp.data_allineamento, \

       orderby=˜db.allineamento_erp.data_allineamento)

  str(result)

 On Mon, Mar 23, 2009 at 4:29 PM, Marco Prosperi
 marcoprosperi...@gmail.comwrote:



  thanks for the time you spent on my question but I don't have any
  linebreak in my code after 'select'. It appears in my post after
  copying the error message from web2py and pasting it to googlegroups.
  If I cancel the character ˜  everything works fine in my application

  Marco

  On 23 Mar, 19:14, Hilbert Markus hilbert.mar...@gmail.com wrote:
   hi,

   this looks like a scripting error to me.
   i'm not a web2py-developer right now, but have some knowledge on
   python...

   the linebreak after select makes the mess:
   for i,r in enumerate(db().select(db.allineamento_erp.data_allineamento,

  orderby=˜db.allineamento_erp.data_allineamento)):
           whatever stuff you want to do with i and r

   the way you wrote it a variable called 'select' on db() is expected
   not the method db().select()

   regards
   iham

   On Mar 23, 2009, at 3:18 PM, Marco Prosperi wrote:

hi all, I would like to make a query to fetch records in reverse
order. The manual says to use ˜ by I get this error (everything works
if a eliminate ˜). On web2py (maybe not after pasting the message in
googlegroups) the arrow indicating the problems point to ˜. Am I
missing something or is a problem with my Italian settings? thanks,
Marco

Error ticket for X
Ticket 127.0.0.1.2009-03-23.15-02-46.51e8621c-
fb62-423d-81a8-27058eccb348

Error traceback

Traceback (most recent call last):
 File gluon/restricted.py, line 97, in restricted
 File C:/web2py_win159/web2py/applications/crm/controllers/
default.py, line 66
   for i,r in enumerate(db().select
(db
.allineamento_erp
.data_allineamento,orderby=˜db.allineamento_erp.data_allineamento)):

^
SyntaxError: invalid syntax

In file: C:\web2py_win159\web2py\applications\crm/controllers/
default.py

#!/usr/bin/python
# -*- coding: utf-8 -*-

response.title = New X
response.application = X

if auth.user: response.menu=[
   ['-Logout-',False,URL(r=request,f='user',args=['logout'])],
   ['Contatti',False,URL(r=request,f='select',args=['db'],vars=dict
(query='db.contatti.id0'))],
   ['Operatori',False,URL(r=request,f='select',args=['db'],vars=dict
(query='db.operatori.id0'))],
   ['Tipi attività',False,URL(r=request,f='select',args=
['db'],vars=dict(query='db.tipiattivita.id0'))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18511] about buttons

2009-03-24 Thread Marco Prosperi

hi all,
I would like to put a button in one of my pages so that when the users
clicks it, a computation on the database get started. I don't know the
syntax I have to use. Probably something like:

button onclick=!!what_am_I_supposed_to_put_here?!!click me/button

any hint? Or maybe there is a better approach?

Marco


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18512] Re: MVC question

2009-03-24 Thread Joseph Jude

Yarko,
Thank you for the detailed explanation. :-)

Joseph

On Mar 24, 12:22 pm, Yarko Tymciurak yark...@gmail.com wrote:
 Let's look at what is meant by the term business logic --- this is what
 implementspart of a solution for a problem statement.  If we were talking
 4-tier model, then
 we would say business logic and engineering logic; it
 is the implementation in language of the solution/problem space, and just a
 further
 decomposition --- still  implementation logic, still about the solution.

 With me so far?

 Now - what is presentation?  It is how something is shown to the user.

 Does that require logic?  Yes, it certainly can (consider javascript, etc.).

 What differentiates the logic of presentation form the logic of business?
  The concern, the
 type of processing.  Is there some point at the boundary between these two
 where it might be fuzzy?  Yes.  How do you resolve that?  You just make
 a choice, and do it however you choose.  You'll probably do it differntly
 than
 I would.  In the details, there's rarely a right or wrong - there's a
 better for this,
 or better for that.

 Back to this question about where do you define forms.

 What is a form?  Is it strictly a presentation statement?  Or is it a
 statement of
 required interaction with the user?  Look:

 Business logic:  we need name, address, phone to take an order
 Engineering logic  we need input from user to collect name, address,
 phone
 Presentation logic:  we want Name to be above address, address above phone
 - all on one form.

 Business logic:  the customer may save his information with us, but that is
 not required for an order
 Engineering logic:  persist name, address, and phone if requested (e.g.
 offer request to save)
 Presentation:  Checkbox for save my info

 Now - where do you define form?

 It's a design decision - YOU decide.

 But some things are rather clear:   validation logic probably should not be
 part of the presentation (although there may be valid reasons for this in
 your application)

 Defining color of form probably does not belong in the controller (better
 left somewhere else).

 Does it make sense to separate basic definition of an HTML form from the
 controller?  That depends - are you going to allow input through PDF forms?
  csv?  Then maybe it makes sense to separate this.   If you're a web-input
 only application, then maybe not.

 By now you get the idea:  some questions you can ask over and over, and get
 guidelines, and reasons behind them (e.g. color of form), but _most_ of
 these details are design decisions.  Part of these are made or encouraged a
 certain way by the design decisions in the framework you choose to use;
  part of these will always be up to you, the software and web designer -
 what makes sense for one application will better be done another way;  many
 things won't matter all that much... until you use them long enough, and
 then you will change your mind (e.g. refactor).

 mvc is just another way to say you've split your application into a data
 layer, a business layer, and a presentation layer - it's a separation of
 concerns;  it serves to reduce design coupling.

 The goal is a maintainable and extensible app.

 The devil is in the details.

 Questions of truly MVC are like truly agile or truly capitalist /
 market economy or truly social --- as long as you don't loose the reasons
 behind these, why these abstractions (shortcuts to concepts) came to be in
 the first place, you're ok (otherwise you get into trouble):  maintainable,
 extensible;  frequent feedback;  efficient, self-regulating allocation of
 resources in society;  social responsibility to people in your community.

 :-)

 - Yarko





 On Tue, Mar 24, 2009 at 1:37 AM, Joseph Jude ceph...@gmail.com wrote:

  All,
  Just a question on the best practice - in terms of development 
  continuous maintenance. web2py (like django) allows to define forms in
  controller itself. And it allows having 'business logic' embedded in
  views too. To bring out the application quickly, such mixing is fine.
  But what about long term maintenance and also to call the application
  truly MVC? What are your thoughts basis of your experience.

  Thank you for sharing your thoughts on this,
  Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18513] Auth via xml-rpc

2009-03-24 Thread oli...@googlemail.com

Hi,

I started using web2py as a data backend and therefore most of the
function are exported via xml-rpc and only a few views exists for a
minimal web-interface.

Now I have the following problem. I have added the Auth service and
it works really fine when I work with the web-interfaces (views).

But how do I authenticate a user via xml-rpc?

Thanks in advance,
Oli

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18514] Re: problems with a query

2009-03-24 Thread Yarko Tymciurak
On Tue, Mar 24, 2009 at 3:03 AM, Marco Prosperi
marcoprosperi...@gmail.comwrote:



 It works.
 The problem seems to be that tilde is not a tilde in my original
 query. I don't know how to get a tilde from my italian notebook
 keyboard, so I copied from the PDF manual and paste it in my code.
 I found out that if I open a Python shell, digit chr(126) and copy the
 tilde character from there, then everything works fine

 Marco


Ach!  That doesn't sound very conveninece;  sounds like a convenience
function might be called for...

any ideas?





 On 23 Mar, 22:52, Yarko Tymciurak yark...@gmail.com wrote:
  Hello Marco -
 
  Try this and tell us what you get:
 
  $ python web2py.py -S crm -M
 
   result=db().select( db.allineamento_erp.data_allineamento, \
 
orderby=˜db.allineamento_erp.data_allineamento)
 
   str(result)
 
  On Mon, Mar 23, 2009 at 4:29 PM, Marco Prosperi
  marcoprosperi...@gmail.comwrote:
 
 
 
   thanks for the time you spent on my question but I don't have any
   linebreak in my code after 'select'. It appears in my post after
   copying the error message from web2py and pasting it to googlegroups.
   If I cancel the character ˜  everything works fine in my application
 
   Marco
 
   On 23 Mar, 19:14, Hilbert Markus hilbert.mar...@gmail.com wrote:
hi,
 
this looks like a scripting error to me.
i'm not a web2py-developer right now, but have some knowledge on
python...
 
the linebreak after select makes the mess:
for i,r in
 enumerate(db().select(db.allineamento_erp.data_allineamento,
 
   orderby=˜db.allineamento_erp.data_allineamento)):
whatever stuff you want to do with i and r
 
the way you wrote it a variable called 'select' on db() is expected
not the method db().select()
 
regards
iham
 
On Mar 23, 2009, at 3:18 PM, Marco Prosperi wrote:
 
 hi all, I would like to make a query to fetch records in reverse
 order. The manual says to use ˜ by I get this error (everything
 works
 if a eliminate ˜). On web2py (maybe not after pasting the message
 in
 googlegroups) the arrow indicating the problems point to ˜. Am I
 missing something or is a problem with my Italian settings? thanks,
 Marco
 
 Error ticket for X
 Ticket 127.0.0.1.2009-03-23.15-02-46.51e8621c-
 fb62-423d-81a8-27058eccb348
 
 Error traceback
 
 Traceback (most recent call last):
  File gluon/restricted.py, line 97, in restricted
  File C:/web2py_win159/web2py/applications/crm/controllers/
 default.py, line 66
for i,r in enumerate(db().select
 (db
 .allineamento_erp

 .data_allineamento,orderby=˜db.allineamento_erp.data_allineamento)):
 
 ^
 SyntaxError: invalid syntax
 
 In file: C:\web2py_win159\web2py\applications\crm/controllers/
 default.py
 
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
 response.title = New X
 response.application = X
 
 if auth.user: response.menu=[
['-Logout-',False,URL(r=request,f='user',args=['logout'])],
['Contatti',False,URL(r=request,f='select',args=['db'],vars=dict
 (query='db.contatti.id0'))],

  ['Operatori',False,URL(r=request,f='select',args=['db'],vars=dict
 (query='db.operatori.id0'))],
['Tipi attività',False,URL(r=request,f='select',args=
 ['db'],vars=dict(query='db.tipiattivita.id0'))
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18515] Re: about buttons

2009-03-24 Thread Yarko Tymciurak
On Tue, Mar 24, 2009 at 3:17 AM, Marco Prosperi
marcoprosperi...@gmail.comwrote:


 hi all,
 I would like to put a button in one of my pages so that when the users
 clicks it, a computation on the database get started. I don't know the
 syntax I have to use. Probably something like:

 button onclick=!!what_am_I_supposed_to_put_here?!!click me/button


button onclick={{=URL(r=request, f='some_function')}} ...

but there may be a better way depending on what you are trying to do...



 any hint? Or maybe there is a better approach?

 Marco


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18516] Re: MVC question

2009-03-24 Thread Yarko Tymciurak
My pleasure (really, literally! ;-)

On Tue, Mar 24, 2009 at 3:36 AM, Joseph Jude ceph...@gmail.com wrote:


 Yarko,
 Thank you for the detailed explanation. :-)

 Joseph

 On Mar 24, 12:22 pm, Yarko Tymciurak yark...@gmail.com wrote:
  Let's look at what is meant by the term business logic --- this is
 what
  implementspart of a solution for a problem statement.  If we were talking
  4-tier model, then
  we would say business logic and engineering logic; it
  is the implementation in language of the solution/problem space, and just
 a
  further
  decomposition --- still  implementation logic, still about the solution.
 
  With me so far?
 
  Now - what is presentation?  It is how something is shown to the user.
 
  Does that require logic?  Yes, it certainly can (consider javascript,
 etc.).
 
  What differentiates the logic of presentation form the logic of business?
   The concern, the
  type of processing.  Is there some point at the boundary between these
 two
  where it might be fuzzy?  Yes.  How do you resolve that?  You just make
  a choice, and do it however you choose.  You'll probably do it differntly
  than
  I would.  In the details, there's rarely a right or wrong - there's a
  better for this,
  or better for that.
 
  Back to this question about where do you define forms.
 
  What is a form?  Is it strictly a presentation statement?  Or is it a
  statement of
  required interaction with the user?  Look:
 
  Business logic:  we need name, address, phone to take an order
  Engineering logic  we need input from user to collect name, address,
  phone
  Presentation logic:  we want Name to be above address, address above
 phone
  - all on one form.
 
  Business logic:  the customer may save his information with us, but that
 is
  not required for an order
  Engineering logic:  persist name, address, and phone if requested (e.g.
  offer request to save)
  Presentation:  Checkbox for save my info
 
  Now - where do you define form?
 
  It's a design decision - YOU decide.
 
  But some things are rather clear:   validation logic probably should not
 be
  part of the presentation (although there may be valid reasons for this in
  your application)
 
  Defining color of form probably does not belong in the controller (better
  left somewhere else).
 
  Does it make sense to separate basic definition of an HTML form from the
  controller?  That depends - are you going to allow input through PDF
 forms?
   csv?  Then maybe it makes sense to separate this.   If you're a
 web-input
  only application, then maybe not.
 
  By now you get the idea:  some questions you can ask over and over, and
 get
  guidelines, and reasons behind them (e.g. color of form), but _most_ of
  these details are design decisions.  Part of these are made or encouraged
 a
  certain way by the design decisions in the framework you choose to use;
   part of these will always be up to you, the software and web designer -
  what makes sense for one application will better be done another way;
  many
  things won't matter all that much... until you use them long enough, and
  then you will change your mind (e.g. refactor).
 
  mvc is just another way to say you've split your application into a data
  layer, a business layer, and a presentation layer - it's a separation of
  concerns;  it serves to reduce design coupling.
 
  The goal is a maintainable and extensible app.
 
  The devil is in the details.
 
  Questions of truly MVC are like truly agile or truly capitalist /
  market economy or truly social --- as long as you don't loose the
 reasons
  behind these, why these abstractions (shortcuts to concepts) came to be
 in
  the first place, you're ok (otherwise you get into trouble):
  maintainable,
  extensible;  frequent feedback;  efficient, self-regulating allocation of
  resources in society;  social responsibility to people in your community.
 
  :-)
 
  - Yarko
 
 
 
 
 
  On Tue, Mar 24, 2009 at 1:37 AM, Joseph Jude ceph...@gmail.com wrote:
 
   All,
   Just a question on the best practice - in terms of development 
   continuous maintenance. web2py (like django) allows to define forms in
   controller itself. And it allows having 'business logic' embedded in
   views too. To bring out the application quickly, such mixing is fine.
   But what about long term maintenance and also to call the application
   truly MVC? What are your thoughts basis of your experience.
 
   Thank you for sharing your thoughts on this,
   Joseph
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18517] Re: MVC question

2009-03-24 Thread AchipA

Yarko alredy explained this nicely, just one minor point to add - the
MVC paradigm was not created for web apps. In a web environment, MVC,
as a concept, cannot be strictly realized as a consequence of the http
server-browser decoupling. Hence it's not a question whether a web
solution is or isn't fully MVC decoupled, but rather which corner of
MVC will you cut to fit technical and real life limitations. And this
is where Yarko's argument comes in - it's about design choices,
starting from the choice of the framework itself down to the location
of form operations or helpers in your particular application. The
bottom line is, don't let a pattern determine your project, but rather
choose the best patterns based on your project's requirements.

On Mar 24, 8:22 am, Yarko Tymciurak yark...@gmail.com wrote:
 Let's look at what is meant by the term business logic --- this is what
 implementspart of a solution for a problem statement.  If we were talking
 4-tier model, then
 we would say business logic and engineering logic; it
 is the implementation in language of the solution/problem space, and just a
 further
 decomposition --- still  implementation logic, still about the solution.

 With me so far?

 Now - what is presentation?  It is how something is shown to the user.

 Does that require logic?  Yes, it certainly can (consider javascript, etc.).

 What differentiates the logic of presentation form the logic of business?
  The concern, the
 type of processing.  Is there some point at the boundary between these two
 where it might be fuzzy?  Yes.  How do you resolve that?  You just make
 a choice, and do it however you choose.  You'll probably do it differntly
 than
 I would.  In the details, there's rarely a right or wrong - there's a
 better for this,
 or better for that.

 Back to this question about where do you define forms.

 What is a form?  Is it strictly a presentation statement?  Or is it a
 statement of
 required interaction with the user?  Look:

 Business logic:  we need name, address, phone to take an order
 Engineering logic  we need input from user to collect name, address,
 phone
 Presentation logic:  we want Name to be above address, address above phone
 - all on one form.

 Business logic:  the customer may save his information with us, but that is
 not required for an order
 Engineering logic:  persist name, address, and phone if requested (e.g.
 offer request to save)
 Presentation:  Checkbox for save my info

 Now - where do you define form?

 It's a design decision - YOU decide.

 But some things are rather clear:   validation logic probably should not be
 part of the presentation (although there may be valid reasons for this in
 your application)

 Defining color of form probably does not belong in the controller (better
 left somewhere else).

 Does it make sense to separate basic definition of an HTML form from the
 controller?  That depends - are you going to allow input through PDF forms?
  csv?  Then maybe it makes sense to separate this.   If you're a web-input
 only application, then maybe not.

 By now you get the idea:  some questions you can ask over and over, and get
 guidelines, and reasons behind them (e.g. color of form), but _most_ of
 these details are design decisions.  Part of these are made or encouraged a
 certain way by the design decisions in the framework you choose to use;
  part of these will always be up to you, the software and web designer -
 what makes sense for one application will better be done another way;  many
 things won't matter all that much... until you use them long enough, and
 then you will change your mind (e.g. refactor).

 mvc is just another way to say you've split your application into a data
 layer, a business layer, and a presentation layer - it's a separation of
 concerns;  it serves to reduce design coupling.

 The goal is a maintainable and extensible app.

 The devil is in the details.

 Questions of truly MVC are like truly agile or truly capitalist /
 market economy or truly social --- as long as you don't loose the reasons
 behind these, why these abstractions (shortcuts to concepts) came to be in
 the first place, you're ok (otherwise you get into trouble):  maintainable,
 extensible;  frequent feedback;  efficient, self-regulating allocation of
 resources in society;  social responsibility to people in your community.

 :-)

 - Yarko

 On Tue, Mar 24, 2009 at 1:37 AM, Joseph Jude ceph...@gmail.com wrote:

  All,
  Just a question on the best practice - in terms of development 
  continuous maintenance. web2py (like django) allows to define forms in
  controller itself. And it allows having 'business logic' embedded in
  views too. To bring out the application quickly, such mixing is fine.
  But what about long term maintenance and also to call the application
  truly MVC? What are your thoughts basis of your experience.

  Thank you for sharing your thoughts on this,
  Joseph

[web2py:18518] Re: Full documentation

2009-03-24 Thread Jonathan B

Dear Debebe,


On Mar 23, 8:42 pm, dbb debe...@yahoo.com wrote:
 That is why like all  other new applications ( framework)let us pay
 membership fee for web2py to grow and be a household name.

Are you suggesting that there should be an annual fee for being part
of a new web2py club?

What would be the benefits for club members?


--Jonathan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18519] Re: about buttons

2009-03-24 Thread Marco Prosperi

Sorry but with
button onclick={{=URL(r=request, f='add_records')}}Crea attività/
button
the function 'add_records' is never called

while with
a href={{=URL(r=request,f='add_records')}}crea attività/a
then 'add_records' is called and works (I can see it because it
creates a file)

maybe is this the wrong syntax?

Marco


On 24 Mar, 10:12, Yarko Tymciurak yark...@gmail.com wrote:
 On Tue, Mar 24, 2009 at 3:17 AM, Marco Prosperi
 marcoprosperi...@gmail.comwrote:



  hi all,
  I would like to put a button in one of my pages so that when the users
  clicks it, a computation on the database get started. I don't know the
  syntax I have to use. Probably something like:

  button onclick=!!what_am_I_supposed_to_put_here?!!click me/button

 button onclick={{=URL(r=request, f='some_function')}} ...

 but there may be a better way depending on what you are trying to do...



  any hint? Or maybe there is a better approach?

  Marco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18520] Re: Full documentation

2009-03-24 Thread Baron

 There is an effort to develop a comprehensive web2py wiki that is in
 its early stages. It's available herehttps://mdp.cti.depaul.edu/wiki


The wiki right now is still pretty empty and doesn't look like
approaching the coverage of the manual for a long time. So, would it
be possible to kick start the documentation effort by allowing the
copying of text sections from the manual?

Clearly a lot of time was spent on the manual so it is understandable
for a person to want to maintain ownership. However Massimo also spent
a lot of time on web2py but still gave it away.

Baron

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18521] Re: about buttons

2009-03-24 Thread Michal Jursa

Yes, coz it cannot be called like this. The problem is not in web2py but 
in your page. You have to use proper javascript call. So the result 
should look like:

button onclick=window.location = {{=URL(r=request, 
f='add_records')}}Crea attività/button

Then i think this will work as you expected.

Michal alias Plysak :)

Marco Prosperi wrote:
 Sorry but with
 button onclick={{=URL(r=request, f='add_records')}}Crea attività/
 button
 the function 'add_records' is never called
 
 while with
 a href={{=URL(r=request,f='add_records')}}crea attività/a
 then 'add_records' is called and works (I can see it because it
 creates a file)
 
 maybe is this the wrong syntax?
 
 Marco
 
 
 On 24 Mar, 10:12, Yarko Tymciurak yark...@gmail.com wrote:
 On Tue, Mar 24, 2009 at 3:17 AM, Marco Prosperi
 marcoprosperi...@gmail.comwrote:



 hi all,
 I would like to put a button in one of my pages so that when the users
 clicks it, a computation on the database get started. I don't know the
 syntax I have to use. Probably something like:
 button onclick=!!what_am_I_supposed_to_put_here?!!click me/button
 button onclick={{=URL(r=request, f='some_function')}} ...

 but there may be a better way depending on what you are trying to do...



 any hint? Or maybe there is a better approach?
 Marco
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18522] creating stand-alone apps of web2py

2009-03-24 Thread Joseph Jude

Is there any guide/documentation on how to create stand-alone
applications of web2py (on windows/mac)?

Thanks,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18525] Re: Qusestion about the book?

2009-03-24 Thread mdipierro

I have the copyright on the book but I also have an understanding that
I would not give it away for free or it will go out of print. Creators
of other framework make their living by consulting. I make my living
in the academic. A published book is necessary to justify the time I
spent/spend on web2py. I do not make much money from it so that is not
an issue.

There has also been a lot of talk about the wiki, etc. I welcome this
and I welcome more community effort nevertheless, different people
want different things. If it takes more time for me to set-up and
maintain things, I could as well spend the time improving the book.

I think one thing is the book (and I care about that for my
profession) and one think is the wiki (necessary to describe new
features and community involvement). I do not think they should be
merged. This is not final and I will give the issue some more thought.

Massimo


On Mar 23, 5:55 am, Baron richar...@gmail.com wrote:
  I would stay away from this kind of posting.  At worst, you are presuming a
  legal position on how to take copyrighted material without consequences.

 Perhaps Massimo could step in to clarify his position to prevent
 speculation. So far I've read that he needs to publish for the
 university, but it is possible to publish and give away
 simultaneously, as the Django Book shows.

 Clearly a lot of time was spent on the manual so it is understandable
 for a person to want to maintain ownership. However Massimo also spent
 a lot of time on web2py but still gave it away.

 The wiki right now is still pretty empty and doesn't look like
 approaching the coverage of the manual for a long time. So, would it
 be possible to kick start the documentation effort by allowing the
 copying of text sections from the manual?

 Baron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18524] Re: Multi Column Unique Key, how to code best in web2py?

2009-03-24 Thread johann . scheibelhofer

Yarko,

thank you for your support on this.
I was obviously not good in describing the problem well. Sorry for
that. Let me try to rephrase it from an different point of view.

Lets take the example code below as starting point. The tables shape
and color are working like needed. The problem comes with the
shapecolormonth table. The requirement in this case is to define a
table where the combination of the 3 fields [shape+color+month] must
be unique. For example a calendar which allows a 'red triangle' only
once every calendar months.

I kind of got into the direction (not completely, but until 2 row
column unique key) from the model layer side but lost the dropdown
selection in the viewer.

What would be the best way in this code example to get the multi-
column-key (shapename+colorname+month) unique while keeping the
dropdown functionality of shapename and colorname and the date
(widget) selection for the month ?

Side question: Is there a widget (-option) or another more elegant way
to select only the %Y and %m part of the date? The need to select a
day in this example is a kind of pointless since only %Y+%m should be
processed and part of the unique key. The widget return values are not
even passing the form requirements IS_DATE('%Y-%m') and hence the
before forced selection of the day part of the field would need to be
deleted manually to pass the form requirements. I'm sure you guys have
experience with more elegant ways to solve also that.

Thanks,
Hans


db=SQLDB('sqlite://test.db')

db.define_table('shape',
  SQLField('name'))
db.shape.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'shape.name')]

db.define_table('color',
  SQLField('name'))
db.color.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'color.name')]

db.define_table('shapecolormonth',
  SQLField('shapename','reference shape'),
  SQLField('colorname','reference color'),
  SQLField('month','date'))
db.shapecolormonth.shapename.requires=requires=IS_IN_DB
(db,'shape.id','%(name)s')
db.shapecolormonth.colorname.requires=IS_IN_DB(db,'color.id','%(name)
s')
db.shapecolormonth.month.requires=IS_DATE('%Y-%m')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18526] Re: under load

2009-03-24 Thread mdipierro

I will look into this error but you have an error into the _create
function. This is called ONLY when a new table is created. Heavy or
light load should not affect this since function is called only once.

My guess is that you are editing the models in real time while the
server is under heavy load.  In general this is not a good idea
because the migration can take long time, log the database until
commit, and create too many database connections.

Anyway. The error should not occur and I will fix asap.

Massimo

On Mar 23, 9:28 am, AchipA attila.cs...@gmail.com wrote:
 I have an interesting situation, where while in a Apache/WSGI 1
 process environment, running under high load (which makes this a
 likely race condition/lock issue) web2py just explodes:

 [Mon Mar 23 14:19:44 2009] [error] Traceback (most recent call last):
 [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
 sql.py, line 859, in define_table
 [Mon Mar 23 14:19:44 2009] [error]     query = t._create(migrate=args
 ['migrate'])
 [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
 sql.py, line 1183, in _create
 [Mon Mar 23 14:19:44 2009] [error]     sql_fields_old = cPickle.load
 (tfile)
 [Mon Mar 23 14:19:44 2009] [error] EOFError

 If I moderate myself and lower the load on the particular instance,
 everything works nice. Anybody encounter anything similar ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18527] Re: html META error

2009-03-24 Thread mdipierro

The first two are not supposed to work but these are

META(_charset='utf-8')
META(_http-equiv='content-type',_content='text/html',_charset='utf-8')


On Mar 23, 10:34 am, notabene niels...@gmail.com wrote:
 META('',_http-equiv='content-type',_content='text/html',
 _charset='utf-8')
 or
 TAG.meta('',_http-equiv='content-type',_content='text/html',
 _charset='utf-8')
 or
 META(_charset='utf-8')

 returns

 SyntaxError: meta/ tags cannot have components
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18529] Re: Auth Wiki example

2009-03-24 Thread mdipierro

I think you forgot

auth.define_tables()

On Mar 23, 10:52 pm, Oscar oscar.m...@gmail.com wrote:
 Hi all,

 I followed the example posted at the WiKi about auth, I extended Auth
 class with:

 db.py -
 class MyAuth(Auth):
         def __init__(self, environment, T, db = None):
                 Auth.__init__(self, environment, db)
                 self.messages.logged_in = T(Logged in)
                 self.messages.email_sent = T(Email sent)
                 self.messages.email_verified = T(Email verified)
                 self.messages.logged_out = T(Logged out)
                 self.messages.registration_successful = T(Registration 
 successful)
                 self.messages.invalid_email = T(Invalid email)
                 self.messages.invalid_login = T(Invalid login)
                 self.messages.verify_email_subject = T(Password verify)
                 self.messages.username_sent = T(Your username was emailed to 
 you)
                 self.messages.new_password_sent = T(A new password was 
 emailed to
 you)
                 self.messages.password_changed = T(Password changed)
                 self.messages.retrieve_username = str(T(Your username 
 is))+: %
 (username)s
                 self.messages.retrieve_username_subject = T(Username 
 retrieve)
                 self.messages.retrieve_password = str(T(Your password 
 is))+: %
 (password)s
                 self.messages.retrieve_password_subject = T(Password 
 retrieve)
                 self.messages.profile_updated = T(Profile updated)

 auth = MyAuth(globals(), T, db)

 Then I enabled user at controllers:

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

 When I try to call user it returns the following:

 Error ticket for welcome
 Ticket 127.0.0.1.2009-03-23.23-19-06.ea037521-4005-40f4-ac29-
 ef8af121182a

 Error traceback

 Traceback (most recent call last):
   File /Users/Ra/codigo_fuente/web2py/gluon/restricted.py, line 98,
 in restricted
     exec ccode in environment
   File /Users/Ra/codigo_fuente/web2py/applications/welcome/
 controllers/default.py, line 14, in module
   File /Users/Ra/codigo_fuente/web2py/gluon/globals.py, line 75, in
 lambda
     self._caller = lambda f: f()
   File /Users/Ra/codigo_fuente/web2py/applications/welcome/
 controllers/default.py, line 8, in user
     def user(): return auth()
   File /Users/Ra/codigo_fuente/web2py/gluon/tools.py, line 399, in
 __call__
     return self.login()
   File /Users/Ra/codigo_fuente/web2py/gluon/tools.py, line 529, in
 login
     if 'username' in user.fields:
 AttributeError: 'NoneType' object has no attribute 'fields'

 In file: /Users/Ra/codigo_fuente/web2py/applications/welcome/
 controllers/default.py

 def index():
     response.flash = T('Welcome to web2py')
     return dict(message=T('Hello World'))

 # # uncomment the following if you have defined auth and crud in
 models
 #def user(): return dict(form=auth())
 def user(): return auth()
 # def data(): return dict(form=crud())
 def download(): return response.download(request,db)
 # # tip: use @auth.requires_login, requires_membership,
 requires_permission

 response._vars=response._caller(user)

 I guess that the problem is at db = None when variables are
 initialized.

 So... how I can fix it?

 Thanks in advance.

 BTW: My python skills are poor and sorry for my english.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18530] Re: about buttons

2009-03-24 Thread Marco Prosperi


just a little change to make it work:

button onclick=window.location = ' {{=URL
(r=request,f='add_records')}} ' Crea attività/button


On 24 Mar, 13:05, Michal Jursa mic...@jursa.cz wrote:
 Yes, coz it cannot be called like this. The problem is not in web2py but
 in your page. You have to use proper javascript call. So the result
 should look like:

 button onclick=window.location = {{=URL(r=request,
 f='add_records')}}Crea attività/button

 Then i think this will work as you expected.

 Michal alias Plysak :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18531] Re: problems with a query

2009-03-24 Thread mdipierro

[alt]126[release alt] should do the trick. no?

On Mar 24, 4:06 am, Yarko Tymciurak yark...@gmail.com wrote:
 On Tue, Mar 24, 2009 at 3:03 AM, Marco Prosperi
 marcoprosperi...@gmail.comwrote:



  It works.
  The problem seems to be that tilde is not a tilde in my original
  query. I don't know how to get a tilde from my italian notebook
  keyboard, so I copied from the PDF manual and paste it in my code.
  I found out that if I open a Python shell, digit chr(126) and copy the
  tilde character from there, then everything works fine

  Marco

 Ach!  That doesn't sound very conveninece;  sounds like a convenience
 function might be called for...

 any ideas?



  On 23 Mar, 22:52, Yarko Tymciurak yark...@gmail.com wrote:
   Hello Marco -

   Try this and tell us what you get:

   $ python web2py.py -S crm -M

result=db().select( db.allineamento_erp.data_allineamento, \

         orderby=˜db.allineamento_erp.data_allineamento)

str(result)

   On Mon, Mar 23, 2009 at 4:29 PM, Marco Prosperi
   marcoprosperi...@gmail.comwrote:

thanks for the time you spent on my question but I don't have any
linebreak in my code after 'select'. It appears in my post after
copying the error message from web2py and pasting it to googlegroups.
If I cancel the character ˜  everything works fine in my application

Marco

On 23 Mar, 19:14, Hilbert Markus hilbert.mar...@gmail.com wrote:
 hi,

 this looks like a scripting error to me.
 i'm not a web2py-developer right now, but have some knowledge on
 python...

 the linebreak after select makes the mess:
 for i,r in
  enumerate(db().select(db.allineamento_erp.data_allineamento,

orderby=˜db.allineamento_erp.data_allineamento)):
         whatever stuff you want to do with i and r

 the way you wrote it a variable called 'select' on db() is expected
 not the method db().select()

 regards
 iham

 On Mar 23, 2009, at 3:18 PM, Marco Prosperi wrote:

  hi all, I would like to make a query to fetch records in reverse
  order. The manual says to use ˜ by I get this error (everything
  works
  if a eliminate ˜). On web2py (maybe not after pasting the message
  in
  googlegroups) the arrow indicating the problems point to ˜. Am I
  missing something or is a problem with my Italian settings? thanks,
  Marco

  Error ticket for X
  Ticket 127.0.0.1.2009-03-23.15-02-46.51e8621c-
  fb62-423d-81a8-27058eccb348

  Error traceback

  Traceback (most recent call last):
   File gluon/restricted.py, line 97, in restricted
   File C:/web2py_win159/web2py/applications/crm/controllers/
  default.py, line 66
     for i,r in enumerate(db().select
  (db
  .allineamento_erp

  .data_allineamento,orderby=˜db.allineamento_erp.data_allineamento)):

  ^
  SyntaxError: invalid syntax

  In file: C:\web2py_win159\web2py\applications\crm/controllers/
  default.py

  #!/usr/bin/python
  # -*- coding: utf-8 -*-

  response.title = New X
  response.application = X

  if auth.user: response.menu=[
     ['-Logout-',False,URL(r=request,f='user',args=['logout'])],
     ['Contatti',False,URL(r=request,f='select',args=['db'],vars=dict
  (query='db.contatti.id0'))],

   ['Operatori',False,URL(r=request,f='select',args=['db'],vars=dict
  (query='db.operatori.id0'))],
     ['Tipi attività',False,URL(r=request,f='select',args=
  ['db'],vars=dict(query='db.tipiattivita.id0'))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18532] Get stuck on incorrect view template

2009-03-24 Thread Michal Jursa

Strange thing keeps happen to me:
If i save a template with syntax error like

URL=(r=request,c=controller',f='function') = missing quota at controller


whole web2py gets stuck and has to be killed and restarted.
Running Debian 5.0, Python 2.5 and have no idea what's going on. If 
templates are ok, everything works fine. What's even more strange that 
it does not happen every time and i'm not able to say how it comes. Try 
it please and let me know if i'm just a lamer or there is something 
going wrong..:)

Michal alias Plysak

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18533] Re: about buttons

2009-03-24 Thread mdipierro

button onclick=$.ajax({{=URL(r=request,f='callback')}}):'Click
Me/button

If the callback action takes long time you should consider a
backrgound process and database-based event queue.

Massimo

On Mar 24, 3:17 am, Marco Prosperi marcoprosperi...@gmail.com wrote:
 hi all,
 I would like to put a button in one of my pages so that when the users
 clicks it, a computation on the database get started. I don't know the
 syntax I have to use. Probably something like:

 button onclick=!!what_am_I_supposed_to_put_here?!!click me/button

 any hint? Or maybe there is a better approach?

 Marco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18534] Re: creating stand-alone apps of web2py

2009-03-24 Thread mdipierro

You can get the current binary versions, create your app and rezip it,
as long as you comply with the license.

On Mar 24, 8:05 am, Joseph Jude ceph...@gmail.com wrote:
 Is there any guide/documentation on how to create stand-alone
 applications of web2py (on windows/mac)?

 Thanks,
 Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18535] Re: Qusestion about the book?

2009-03-24 Thread johann . scheibelhofer

Hi Massimo,

I can fully understand your motivation and will keep a fan and
supporter of your baby. A different point of view could potentially be
to use community contribution to drive/update/test the web2py
documentation (the bleeding edge version) and use the community-tested
(stable version) in consolidated fashion for print publication. When I
remember right then Stefan Wintermeyer from Germany is using this
approach with his book
http://www.amazon.de/Asterisk-1-4-1-6-Installation-Programmierung/dp/3827326990/ref=sr_1_1?ie=UTF8s=booksqid=1237905177sr=1-1
while the 'open unstable' community version can be found at
http://www.das-asterisk-buch.de

Sorry that example is with German content only. But hey, doesn't
RedHat support and use Fedora because of a similar reason.

Yes I've to admit I'd love to see web2py scaling massively in adoption
and I guess the community can and would love to help.

Just my 2 cents on that.

Cheers,
Hans

On Mar 24, 3:03 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 I have the copyright on the book but I also have an understanding that
 I would not give it away for free or it will go out of print. Creators
 of other framework make their living by consulting. I make my living
 in the academic. A published book is necessary to justify the time I
 spent/spend on web2py. I do not make much money from it so that is not
 an issue.

 There has also been a lot of talk about the wiki, etc. I welcome this
 and I welcome more community effort nevertheless, different people
 want different things. If it takes more time for me to set-up and
 maintain things, I could as well spend the time improving the book.

 I think one thing is the book (and I care about that for my
 profession) and one think is the wiki (necessary to describe new
 features and community involvement). I do not think they should be
 merged. This is not final and I will give the issue some more thought.

 Massimo

 On Mar 23, 5:55 am, Baron richar...@gmail.com wrote:

   I would stay away from this kind of posting.  At worst, you are presuming 
   a
   legal position on how to take copyrighted material without consequences.

  Perhaps Massimo could step in to clarify his position to prevent
  speculation. So far I've read that he needs to publish for the
  university, but it is possible to publish and give away
  simultaneously, as the Django Book shows.

  Clearly a lot of time was spent on the manual so it is understandable
  for a person to want to maintain ownership. However Massimo also spent
  a lot of time on web2py but still gave it away.

  The wiki right now is still pretty empty and doesn't look like
  approaching the coverage of the manual for a long time. So, would it
  be possible to kick start the documentation effort by allowing the
  copying of text sections from the manual?

  Baron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18536] Re: Get stuck on incorrect view template

2009-03-24 Thread Wes James

On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa mic...@jursa.cz wrote:

 Strange thing keeps happen to me:
 If i save a template with syntax error like

 URL=(r=request,c=controller',f='function') = missing quota at controller

what is the ' after c=controller?




 whole web2py gets stuck and has to be killed and restarted.
 Running Debian 5.0, Python 2.5 and have no idea what's going on. If
 templates are ok, everything works fine. What's even more strange that
 it does not happen every time and i'm not able to say how it comes. Try
 it please and let me know if i'm just a lamer or there is something
 going wrong..:)

 Michal alias Plysak

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18537] Re: Get stuck on incorrect view template

2009-03-24 Thread Michal Jursa

That's the exact spelling of the template which makes that problem 
that's a typo i did and locked whole application. Tried to  repeat it a 
few times and it hangs whole thing every time. I'm not sure if it is a 
bug or my error, just trying to identify the problem.

Micahl alias Plysak

Wes James wrote:
 On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa mic...@jursa.cz wrote:
 Strange thing keeps happen to me:
 If i save a template with syntax error like

 URL=(r=request,c=controller',f='function') = missing quota at controller
 
 what is the ' after c=controller?
 
 

 whole web2py gets stuck and has to be killed and restarted.
 Running Debian 5.0, Python 2.5 and have no idea what's going on. If
 templates are ok, everything works fine. What's even more strange that
 it does not happen every time and i'm not able to say how it comes. Try
 it please and let me know if i'm just a lamer or there is something
 going wrong..:)

 Michal alias Plysak

 
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18538] Re: Feature Request: DECIMAL or NUMERIC type for database fields

2009-03-24 Thread hofmanndavid

I will go for a decimal support.

In case decimal is not supported in a database then the DAL can  just
consider it a number. If you are going production you will anyway be
using a database that supports decimal

Please add support for decimal :D

On Mar 22, 1:19 pm, Paco francisco.c...@gmail.com wrote:
 All right, I knew about the implied decimal point solution but it won
 allow you to handle very big numbers.

 I made a quick check and only SQLite doesn't support DECIMAL types.

 Maybe is worth the effort to make DAL support, for the sake of
 simplicity, a MONEY type and make DAL to 'internaly' support decimal
 types in SQLite with implied decimal point.

 On 21 mar, 03:45, mdipierro mdipie...@cs.depaul.edu wrote:



  try this:

  class IS_DECIMAL:
     def __init__(self,decimals=2,error_message=Invalid):
          self.decimals=decimals
          self.error_message=error_message
     def __call__(self,value):
          try:
               value=int(float(value)*(10**self.decimals))
               return (value,None)
          except:
               return (value,self.error_message)
      def format(self,value):
          return float(value)/10**self.decimals

  On Mar 20, 7:41 pm, Joe  Barnhart joe.barnh...@gmail.com wrote:

   The easiest workaround is to use INTEGER and leave all amounts in
   cents, i.e. 123 instead of 1.23.  If all math is done with the implied
   decimal point on integers, you will never have floating-point round-
   off errors.  Only put in the decimal point when you are ready to
   display the value.  (Massimo -- Maybe a validator can help here?)

   -- Joe B.

   On Mar 20, 12:03 pm, Paco francisco.c...@gmail.com wrote:

I've been trying web2py for a couple of days and I believe is just
great. I'm so excited that I'm planning to build my own accounting and
invoicing application, which is, in the other hand, not so complex in
my case.

I need (and I believe many more people do) a DECIMAL field type or
maybe a CURRENCY type since there are many applications that need
fixed precision numbers.

It seems to me that is shouldn't be very difficult to do since most
databases, including SQLite, support NUMERIC or DECIMAL types.

It would be a great newfeature. Are there any plans to do such a
thing? Or maybe there is a nice workaround to do this in web2py?

Cheers,
Paco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18539] Re: creating stand-alone apps of web2py

2009-03-24 Thread Joseph Jude

Massimo,
I understood the license part. I believe using web2py, I could
create .exe  .apps. Is there any documentation on how to go about -
like steps to use setup.py?

Thx,
Joseph

On Mar 24, 7:38 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 You can get the current binary versions, create your app and rezip it,
 as long as you comply with the license.

 On Mar 24, 8:05 am, Joseph Jude ceph...@gmail.com wrote:

  Is there any guide/documentation on how to create stand-alone
  applications of web2py (on windows/mac)?

  Thanks,
  Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18540] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-24 Thread AchipA

Still undecided on this one. Can you post your crontab here just so I
don't miss something obvious ?

On Mar 19, 11:30 am, Iceberg iceb...@21cn.com wrote:
 Hi Achipa,

 I have an app based on web2py-win.zip 1.56.4's cron feature. I just
 noticed that, if the whole web2py is deployed in a directory name with
 space inside, such as C:\Program Files\web2py, the cron feature does
 not work, instead I saw one line appeared on the console:
   WARNING:root:WEB2PY CRON Call returned code 1:

 If I deploy it in C:\SOLID\web2py, everything runs smooth.

 So there might be some dir issue in cron's launcher. Please take a
 look. Thanks in advance!

 Regards,
 Iceberg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18541] Re: Get stuck on incorrect view template

2009-03-24 Thread Wes James

According to the book (do you have it? - see page 67), you should be
able to do this.  But the controller is also implied so if you are not
using a different controller than where your page is already at, try:

URL=(r=request, f='function')

and see what happens.

-wj

On Tue, Mar 24, 2009 at 9:41 AM, Michal Jursa mic...@jursa.cz wrote:

 That's the exact spelling of the template which makes that problem
 that's a typo i did and locked whole application. Tried to  repeat it a
 few times and it hangs whole thing every time. I'm not sure if it is a
 bug or my error, just trying to identify the problem.

 Micahl alias Plysak

 Wes James wrote:
 On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa mic...@jursa.cz wrote:
 Strange thing keeps happen to me:
 If i save a template with syntax error like

 URL=(r=request,c=controller',f='function') = missing quota at controller

 what is the ' after c=controller?



 whole web2py gets stuck and has to be killed and restarted.
 Running Debian 5.0, Python 2.5 and have no idea what's going on. If
 templates are ok, everything works fine. What's even more strange that
 it does not happen every time and i'm not able to say how it comes. Try
 it please and let me know if i'm just a lamer or there is something
 going wrong..:)

 Michal alias Plysak


 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18542] Re: Qusestion about the book?

2009-03-24 Thread AchipA

I think a similar model is perhaps how Qt (the toolkit) does it. The
references and basic tutorials are free, and of top notch quality.
However, as the toolkit is quite complex, there are several volumes
that delve on Qt and how you use it as a whole, how components
interact and, in general, what good practices and the 'Qt way' are.

http://doc.trolltech.com/4.5/

and the myriad of Qt books:

http://www.amazon.com/s/qid=1237910608/ref=a9_sc_1?ie=UTF8search-alias=apsfield-keywords=qt4

So free docs, free software and copyrighted books can coexist in the
same software ecosystem.

On Mar 24, 3:03 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 I have the copyright on the book but I also have an understanding that
 I would not give it away for free or it will go out of print. Creators
 of other framework make their living by consulting. I make my living
 in the academic. A published book is necessary to justify the time I
 spent/spend on web2py. I do not make much money from it so that is not
 an issue.

 There has also been a lot of talk about the wiki, etc. I welcome this
 and I welcome more community effort nevertheless, different people
 want different things. If it takes more time for me to set-up and
 maintain things, I could as well spend the time improving the book.

 I think one thing is the book (and I care about that for my
 profession) and one think is the wiki (necessary to describe new
 features and community involvement). I do not think they should be
 merged. This is not final and I will give the issue some more thought.

 Massimo

 On Mar 23, 5:55 am, Baron richar...@gmail.com wrote:

   I would stay away from this kind of posting.  At worst, you are presuming 
   a
   legal position on how to take copyrighted material without consequences.

  Perhaps Massimo could step in to clarify his position to prevent
  speculation. So far I've read that he needs to publish for the
  university, but it is possible to publish and give away
  simultaneously, as the Django Book shows.

  Clearly a lot of time was spent on the manual so it is understandable
  for a person to want to maintain ownership. However Massimo also spent
  a lot of time on web2py but still gave it away.

  The wiki right now is still pretty empty and doesn't look like
  approaching the coverage of the manual for a long time. So, would it
  be possible to kick start the documentation effort by allowing the
  copying of text sections from the manual?

  Baron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18543] Re: under load

2009-03-24 Thread AchipA

While I do pretty fancy stuff with web2py occasionally, in this
particular case it's a vanilla application. The model did not change
for quite a while now. I could pretty reliably replicate the load
conditions (on thath machine at around 100 concurrent active
connections per WSGI process and a load of 60, it starts giving the
above error). Yes, I know, that's pretty extreme, but hey, you have
take it to extremes to earn the name of an enterprise framework,
right ? :)

On Mar 24, 3:07 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 I will look into this error but you have an error into the _create
 function. This is called ONLY when a new table is created. Heavy or
 light load should not affect this since function is called only once.

 My guess is that you are editing the models in real time while the
 server is under heavy load.  In general this is not a good idea
 because the migration can take long time, log the database until
 commit, and create too many database connections.

 Anyway. The error should not occur and I will fix asap.

 Massimo

 On Mar 23, 9:28 am, AchipA attila.cs...@gmail.com wrote:

  I have an interesting situation, where while in a Apache/WSGI 1
  process environment, running under high load (which makes this a
  likely race condition/lock issue) web2py just explodes:

  [Mon Mar 23 14:19:44 2009] [error] Traceback (most recent call last):
  [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
  sql.py, line 859, in define_table
  [Mon Mar 23 14:19:44 2009] [error]     query = t._create(migrate=args
  ['migrate'])
  [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
  sql.py, line 1183, in _create
  [Mon Mar 23 14:19:44 2009] [error]     sql_fields_old = cPickle.load
  (tfile)
  [Mon Mar 23 14:19:44 2009] [error] EOFError

  If I moderate myself and lower the load on the particular instance,
  everything works nice. Anybody encounter anything similar ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18544] Re: problems with a query

2009-03-24 Thread Marco Prosperi


No.. I'll read the manual of the notebook

On 24 Mar, 15:32, mdipierro mdipie...@cs.depaul.edu wrote:
 [alt]126[release alt] should do the trick. no?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18545] Why aren't we under our own domain yet?

2009-03-24 Thread Jason Brower

Don't you think web2py would be a better product if we had it at, for
example, web2py.org?  I am willing to pay for something like this.
Regards,
Jason Brower


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18546] Re: Why aren't we under our own domain yet?

2009-03-24 Thread ceej

We are, http://www.web2py.com it was updated last week so it no longer
points to the other domain :)

On Mar 24, 12:39 pm, Jason Brower encomp...@gmail.com wrote:
 Don't you think web2py would be a better product if we had it at, for
 example, web2py.org?  I am willing to pay for something like this.
 Regards,
 Jason Brower
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18548] Re: Auth Wiki example

2009-03-24 Thread Fran

On Mar 24, 4:52 am, Oscar oscar.m...@gmail.com wrote:
 response._vars=response._caller(user)

Why do you have this line in default.py?

I would try removing this...

F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18549] Re: Get stuck on incorrect view template

2009-03-24 Thread Michal Jursa

Sure, but that the TYPO what makes me unhappy.. i know it is always 
possible to pass controller itself or by the 'name' reference. Typo like 
  controller'  without the leading ' or somewhat unbalanced quotas makes 
whole application stuck.

Michal alias Plysak

Wes James wrote:
 According to the book (do you have it? - see page 67), you should be
 able to do this.  But the controller is also implied so if you are not
 using a different controller than where your page is already at, try:
 
 URL=(r=request, f='function')
 
 and see what happens.
 
 -wj
 
 On Tue, Mar 24, 2009 at 9:41 AM, Michal Jursa mic...@jursa.cz wrote:
 That's the exact spelling of the template which makes that problem
 that's a typo i did and locked whole application. Tried to  repeat it a
 few times and it hangs whole thing every time. I'm not sure if it is a
 bug or my error, just trying to identify the problem.

 Micahl alias Plysak

 Wes James wrote:
 On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa mic...@jursa.cz wrote:
 Strange thing keeps happen to me:
 If i save a template with syntax error like

 URL=(r=request,c=controller',f='function') = missing quota at controller
 what is the ' after c=controller?


 whole web2py gets stuck and has to be killed and restarted.
 Running Debian 5.0, Python 2.5 and have no idea what's going on. If
 templates are ok, everything works fine. What's even more strange that
 it does not happen every time and i'm not able to say how it comes. Try
 it please and let me know if i'm just a lamer or there is something
 going wrong..:)

 Michal alias Plysak

 
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18550] Re: creating stand-alone apps of web2py

2009-03-24 Thread mdipierro

I am not sure I understand what you want to do.

If you name your app init, it will be the default app in web2py.
If you unzip web2py binary, run it, create the init app, and re-zip
it, this is as close as it gets to create an executable. The
executable is web2py, not your app, but your app comes with it and
starts when web2py starts.

You can also install your init app bytecode compiled so that you do
not give away the source code.

Massimo

On Mar 24, 10:48 am, Joseph Jude ceph...@gmail.com wrote:
 Massimo,
 I understood the license part. I believe using web2py, I could
 create .exe  .apps. Is there any documentation on how to go about -
 like steps to use setup.py?

 Thx,
 Joseph

 On Mar 24, 7:38 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  You can get the current binary versions, create your app and rezip it,
  as long as you comply with the license.

  On Mar 24, 8:05 am, Joseph Jude ceph...@gmail.com wrote:

   Is there any guide/documentation on how to create stand-alone
   applications of web2py (on windows/mac)?

   Thanks,
   Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18551] Re: under load

2009-03-24 Thread mdipierro

Normally under that load the database becomes the problem: 100
concurrent database connections.
Are you using connection pools?

Massimo

On Mar 24, 11:21 am, AchipA attila.cs...@gmail.com wrote:
 While I do pretty fancy stuff with web2py occasionally, in this
 particular case it's a vanilla application. The model did not change
 for quite a while now. I could pretty reliably replicate the load
 conditions (on thath machine at around 100 concurrent active
 connections per WSGI process and a load of 60, it starts giving the
 above error). Yes, I know, that's pretty extreme, but hey, you have
 take it to extremes to earn the name of an enterprise framework,
 right ? :)

 On Mar 24, 3:07 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  I will look into this error but you have an error into the _create
  function. This is called ONLY when a new table is created. Heavy or
  light load should not affect this since function is called only once.

  My guess is that you are editing the models in real time while the
  server is under heavy load.  In general this is not a good idea
  because the migration can take long time, log the database until
  commit, and create too many database connections.

  Anyway. The error should not occur and I will fix asap.

  Massimo

  On Mar 23, 9:28 am, AchipA attila.cs...@gmail.com wrote:

   I have an interesting situation, where while in a Apache/WSGI 1
   process environment, running under high load (which makes this a
   likely race condition/lock issue) web2py just explodes:

   [Mon Mar 23 14:19:44 2009] [error] Traceback (most recent call last):
   [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
   sql.py, line 859, in define_table
   [Mon Mar 23 14:19:44 2009] [error]     query = t._create(migrate=args
   ['migrate'])
   [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
   sql.py, line 1183, in _create
   [Mon Mar 23 14:19:44 2009] [error]     sql_fields_old = cPickle.load
   (tfile)
   [Mon Mar 23 14:19:44 2009] [error] EOFError

   If I moderate myself and lower the load on the particular instance,
   everything works nice. Anybody encounter anything similar ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18552] Re: under load

2009-03-24 Thread mdipierro

in sql.py can you try replace

tfile = open(self._dbt, 'r')
portalocker.lock(tfile, portalocker.LOCK_SH)
sql_fields_old = cPickle.load(tfile)
tfile.close()

with

portalocker.lock(tfile, portalocker.LOCK_EX)
sql_fields_old = cPickle.load(open(self._dbt, 'r'))

and see what happens? Please email me personally to let me know

On Mar 23, 9:28 am, AchipA attila.cs...@gmail.com wrote:
 I have an interesting situation, where while in a Apache/WSGI 1
 process environment, running under high load (which makes this a
 likely race condition/lock issue) web2py just explodes:

 [Mon Mar 23 14:19:44 2009] [error] Traceback (most recent call last):
 [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
 sql.py, line 859, in define_table
 [Mon Mar 23 14:19:44 2009] [error]     query = t._create(migrate=args
 ['migrate'])
 [Mon Mar 23 14:19:44 2009] [error]   File /var/www/web2py/gluon/
 sql.py, line 1183, in _create
 [Mon Mar 23 14:19:44 2009] [error]     sql_fields_old = cPickle.load
 (tfile)
 [Mon Mar 23 14:19:44 2009] [error] EOFError

 If I moderate myself and lower the load on the particular instance,
 everything works nice. Anybody encounter anything similar ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18553] Re: html META error

2009-03-24 Thread mdipierro

Oops you are right. You have to go with

META(**{'_http-equiv':'content-type','_content':'text/
html','_charset':'utf-8'})

then

On Mar 24, 12:51 pm, DenesL denes1...@yahoo.ca wrote:
 On Mar 24, 9:10 am, mdipierro mdipie...@cs.depaul.edu wrote:

  META(_charset='utf-8')

 True

 but

  META(_http-equiv='content-type',_content='text/html',_charset='utf-8')

 causes a SyntaxError: keyword can't be an expression...
 since it interprets the dash as a minus sign.

 _http-equiv is not a valid Python identifier because of the dash and
 it can not be used as a keyword.

 Identifiers and keywords have the following lexical definition:
 (letter|_)(letter|digit|_)*
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18554] Re: Auth Wiki example

2009-03-24 Thread mdipierro

That line is added by web2py at runtime. I but it appears in the
ticket not in the code and that would be ok,

On Mar 24, 1:22 pm, Fran francisb...@googlemail.com wrote:
 On Mar 24, 4:52 am, Oscar oscar.m...@gmail.com wrote:

  response._vars=response._caller(user)

 Why do you have this line in default.py?

 I would try removing this...

 F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18555] Re: Get stuck on incorrect view template

2009-03-24 Thread mdipierro

Michael has a good point. I cannot reproduce this. Can you email me
the entire view that causes the problem?

Massimo

On Mar 24, 1:46 pm, Michal Jursa mic...@jursa.cz wrote:
 Sure, but that the TYPO what makes me unhappy.. i know it is always
 possible to pass controller itself or by the 'name' reference. Typo like
   controller'  without the leading ' or somewhat unbalanced quotas makes
 whole application stuck.

 Michal alias Plysak

 Wes James wrote:
  According to the book (do you have it? - see page 67), you should be
  able to do this.  But the controller is also implied so if you are not
  using a different controller than where your page is already at, try:

  URL=(r=request, f='function')

  and see what happens.

  -wj

  On Tue, Mar 24, 2009 at 9:41 AM, Michal Jursa mic...@jursa.cz wrote:
  That's the exact spelling of the template which makes that problem
  that's a typo i did and locked whole application. Tried to  repeat it a
  few times and it hangs whole thing every time. I'm not sure if it is a
  bug or my error, just trying to identify the problem.

  Micahl alias Plysak

  Wes James wrote:
  On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa mic...@jursa.cz wrote:
  Strange thing keeps happen to me:
  If i save a template with syntax error like

  URL=(r=request,c=controller',f='function') = missing quota at controller
  what is the ' after c=controller?

  whole web2py gets stuck and has to be killed and restarted.
  Running Debian 5.0, Python 2.5 and have no idea what's going on. If
  templates are ok, everything works fine. What's even more strange that
  it does not happen every time and i'm not able to say how it comes. Try
  it please and let me know if i'm just a lamer or there is something
  going wrong..:)

  Michal alias Plysak
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18556] Re: Change Control Process for web2py

2009-03-24 Thread mdipierro

Hi Anand,

about this:

 I have just registered the project on freshmeat (http://freshmeat.net/
 projects/web2py) so the announcements should start appearing on FM
 too... Maybe we should announce on icewalkers too?

I am not sure it is a good idea since it may create fragmentation.
Anyway.
Can you give me access?
Can you add a big notice pointing to the official web page?
Can you commit to make sure the source will be in sync with the
official web site?

 Moreover, while $20 looks ok to you, many people in developing
 countries can have 30 meals with $20. To them it may be very
 expensive. They may have the time to read code and learn hands-on...

yes. we have to do something about this.

If people want the book but cannot afford it, please email me
personally. Your name will be kept confidential.

Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18557] Re: new web2py video about Auth, Service

2009-03-24 Thread mattynoce

very nice work, massimo. i've had trouble keeping up with which
features are newly available in web2py and this tutorial is a great
help. thank you.

matt

On Mar 18, 4:06 am, Michal Jursa mic...@jursa.cz wrote:
 Absolutely not massimo, you are a star and your screencasts are great.

 Mike alias Plysak :)

 mdipierro wrote:
  I am not good at doing this. I do not type well and I hate my own
  voice.

  If some of you have screenflow and are good at this, I am I happy to
  script more video tutorials and you do the typing, the recording and
  add voice.

  Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18558] Re: MVC question

2009-03-24 Thread Yarko Tymciurak
There is one more concept that is worth some words (although I don't want to
turn this into a blog about mvc):
Design coupling is an interesting topic - perhaps the best discussion I've
seen on it was in Nam Suh's book Axiomatic Design  (although I don't
recommend that as a general design book - I think it misses some important
points).

Like pure MVC (or any of the other topics already mentioned)   design
coupling is the effect where, in order to change some part of a system, a
dependent (coupled) part must also be modified.  The worst of coupled design
is that it results in a cascade of changes that in can (at very worst) be
never ending, e.g. you cannot really make the desired change at all.  A more
functional version (!) is where to change some small aspect of a system, you
must change many other parts of the system to accomplish your initial goal.
  So it would seem that decoupled design is desireable, and while the
general concept is true, there is a very important point:   There is natural
coupling in all problem spaces, and you or constrained to respect that
natural coupling in your solution - it is, after all, a part of the
definition of the problem space.  (Of course, you don't want to amplify it,
or introduce additional coupling - and certainly not any unnatural
coupling - that is, coupling that is not dictated by the problem space).

So it is with forms: they are naturally coupled items:   you want layout of
input items, but they represent data you need to interpret and save - they
are naturally coupled.  And this is why forms seem confusing when talking
about MVC - but, really, they're not.  They are as they are naturally - they
must be so.   The biggest hurdle is to see that, and accept it in the
correct context.

There are other areas that accidentally introduce coupling - I ran into such
an instance in web2py (actually, in the csv library) recently.  It's nasty
when you spot the coupling, and (of course) it will at some point be removed
(the unnatural coupling, that is...)

/end blogging

Yarko

On Tue, Mar 24, 2009 at 5:36 AM, AchipA attila.cs...@gmail.com wrote:


 Yarko alredy explained this nicely, just one minor point to add - the
 MVC paradigm was not created for web apps. In a web environment, MVC,
 as a concept, cannot be strictly realized as a consequence of the http
 server-browser decoupling. Hence it's not a question whether a web
 solution is or isn't fully MVC decoupled, but rather which corner of
 MVC will you cut to fit technical and real life limitations. And this
 is where Yarko's argument comes in - it's about design choices,
 starting from the choice of the framework itself down to the location
 of form operations or helpers in your particular application. The
 bottom line is, don't let a pattern determine your project, but rather
 choose the best patterns based on your project's requirements.

 On Mar 24, 8:22 am, Yarko Tymciurak yark...@gmail.com wrote:
  Let's look at what is meant by the term business logic --- this is
 what
  implementspart of a solution for a problem statement.  If we were talking
  4-tier model, then
  we would say business logic and engineering logic; it
  is the implementation in language of the solution/problem space, and just
 a
  further
  decomposition --- still  implementation logic, still about the solution.
 
  With me so far?
 
  Now - what is presentation?  It is how something is shown to the user.
 
  Does that require logic?  Yes, it certainly can (consider javascript,
 etc.).
 
  What differentiates the logic of presentation form the logic of business?
   The concern, the
  type of processing.  Is there some point at the boundary between these
 two
  where it might be fuzzy?  Yes.  How do you resolve that?  You just make
  a choice, and do it however you choose.  You'll probably do it differntly
  than
  I would.  In the details, there's rarely a right or wrong - there's a
  better for this,
  or better for that.
 
  Back to this question about where do you define forms.
 
  What is a form?  Is it strictly a presentation statement?  Or is it a
  statement of
  required interaction with the user?  Look:
 
  Business logic:  we need name, address, phone to take an order
  Engineering logic  we need input from user to collect name, address,
  phone
  Presentation logic:  we want Name to be above address, address above
 phone
  - all on one form.
 
  Business logic:  the customer may save his information with us, but that
 is
  not required for an order
  Engineering logic:  persist name, address, and phone if requested (e.g.
  offer request to save)
  Presentation:  Checkbox for save my info
 
  Now - where do you define form?
 
  It's a design decision - YOU decide.
 
  But some things are rather clear:   validation logic probably should not
 be
  part of the presentation (although there may be valid reasons for this in
  your application)
 
  Defining color of form probably does not belong in the controller (better
  left somewhere 

[web2py:18559] Re: jquery jqGrid JSON url problem

2009-03-24 Thread ed

Hi Mike,
I am a web2py newbie and has to learn much from experts like you.
I would like to know which of the following url format you are using
to access your xml data in your server:

1.  url: {{=URL(r=request,c='default',f='getjsdata')}},
2.  url: '/EMIS/controllers/getjsdata.py',

Is it 1 or 2? Is it possible if you can email a source code of an
application
using web2py and jqGrid, I understand you are using jqGrid. I am also
very
interested to use jqGrid in web2py but not much documentation. I think
you
can provide the much needed example on this for everyone interested
in
this technology. Thanks in advance.
Ed

On 24 Mar, 01:36, Mike michael.mcgreg...@gmail.com wrote:
 Hey Ed,

 We're using jqGrid with XML data. Something thoughts (if you haven't
 tried them already):

 1.) Try your grid with the FireBug plugin for FireFox and look at the
 response being returned to the grid. I've had web2py tickets thown at
 that point and the only to see it is via Firebug. Or just check for
 tickets from the admin app

 2.) Did you set the response headers? in my case I had to
 use...response.headers[Content-Type]=text/xml

 3.) What does your controller look like? In my controller that serves
 up the XML I just return a string with the XML data return xml
 instead of return dict(xml = xml)

 Hope that helps. I like jqGrid since it has excellent documentation
 and hope more of us can make it work with web2py.

 Mike

 On Mar 23, 5:27 am, ed edbi...@rocketmail.com wrote:

  Hi,
  I've been trying to execute a jquery jqGrid url to return JSON data
  but failed. Only a blank table with exact headings is displayed. I
  tried changing the url several times but no data is displayed. The
  following is part of the code.
  ---­---

  script src={{=URL(r=request,c='static',f='jqGrid34/jquery.js')}}
  type=text/javascript/script
  !-- and at end the jqGrid Java Script file --
  script src={{=URL(r=request,c='static',f='jqGrid34/
  jquery.jqGrid.js')}} type=text/javascript/script
  script type=text/javascript
jQuery(document).ready(function(){
  jQuery('#list2').jqGrid({
  //
  // this is the url I am using but failed to display data

  url: {{=URL(r=request,c='default',f='getjsdata')}},

  // I created a program in controllers to return json data and
  tried the url below to access the program but also failed to display
  data
  url: '/EMIS/controllers/getjsdata.py',
  //
  datatype: 'json',
  colNames:['Emp. No.','Last Name', 'First Name', 'Mid Name', 'Cost
  Center', 'SSS No.'],
  colModel:[
  {name:'empno',index:'empno', width:80},
  {name:'lname',index:'lname', width:160},
  
  Maybe the url address format is wrong or whatever. Can someone help me
  on this.
  Thank you very much.
  Ed
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18560] Re: creating stand-alone apps of web2py

2009-03-24 Thread Joseph Jude

Thx Massimo. My confusion was because I saw setup_exe.py 
setup_app.py. I assumed that using these two files, I'll be able to
create executables.

Joseph

On Mar 24, 11:50 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 I am not sure I understand what you want to do.

 If you name your app init, it will be the default app in web2py.
 If you unzip web2py binary, run it, create the init app, and re-zip
 it, this is as close as it gets to create an executable. The
 executable is web2py, not your app, but your app comes with it and
 starts when web2py starts.

 You can also install your init app bytecode compiled so that you do
 not give away the source code.

 Massimo

 On Mar 24, 10:48 am, Joseph Jude ceph...@gmail.com wrote:

  Massimo,
  I understood the license part. I believe using web2py, I could
  create .exe  .apps. Is there any documentation on how to go about -
  like steps to use setup.py?

  Thx,
  Joseph

  On Mar 24, 7:38 pm, mdipierro mdipie...@cs.depaul.edu wrote:

   You can get the current binary versions, create your app and rezip it,
   as long as you comply with the license.

   On Mar 24, 8:05 am, Joseph Jude ceph...@gmail.com wrote:

Is there any guide/documentation on how to create stand-alone
applications of web2py (on windows/mac)?

Thanks,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18561] Re: Change Control Process for web2py

2009-03-24 Thread Anand Vaidya



On Mar 25, 3:30 am, mdipierro mdipie...@cs.depaul.edu wrote:
 Hi Anand,

 about this:

  I have just registered the project on freshmeat (http://freshmeat.net/
  projects/web2py) so the announcements should start appearing on FM
  too... Maybe we should announce on icewalkers too?

 I am not sure it is a good idea since it may create fragmentation.
 Anyway.

Hi Massimo,

freshmeat.net, icewalkers.com etc are very popular sites for listing
software. They are just directories that redirect people to the actual
project sites.

Many of us in the IT usually start searching freshmeat, since the
listing is marked by useful info such as licensing, latest released
version, programming language used etc etc.

This kind of listing will provide better visibility to web2py and
should bring more users.


 Can you give me access?

Sure, I will email you the account access offline, later today. You
can announce new releases.


 Can you add a big notice pointing to the official web page?

Yes,  the links point back to the web2py site.

 Can you commit to make sure the source will be in sync with the
 official web site?

There is no source code to be sync'd. Freshmeat etc are just
directories that send the users to the project site (in this www.web2py.com).
They do not host any downloads.

Regards
Anand


  Moreover, while $20 looks ok to you, many people in developing
  countries can have 30 meals with $20. To them it may be very
  expensive. They may have the time to read code and learn hands-on...

 yes. we have to do something about this.

 If people want the book but cannot afford it, please email me
 personally. Your name will be kept confidential.

 Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18562] Re: Why aren't we under our own domain yet?

2009-03-24 Thread Anand Vaidya

web2py.org and web2py.net, web2py.info forward to web2py.com

--

Also, the SSL cert problem does not look good.

I saw godaddy is offering a 3-year 256-bit strength SSL Cert for
USD40.

I am willing to pay for it if the project would agree to use it.

Regards
Anand



On Mar 25, 1:45 am, ceej cjlaz...@googlemail.com wrote:
 We are,http://www.web2py.comit was updated last week so it no longer
 points to the other domain :)

 On Mar 24, 12:39 pm, Jason Brower encomp...@gmail.com wrote:

  Don't you think web2py would be a better product if we had it at, for
  example, web2py.org?  I am willing to pay for something like this.
  Regards,
  Jason Brower
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18563] Facebook groups

2009-03-24 Thread Anand Vaidya

Hi

I searched facebook and found three groups for web2py:

1. Web2Py group with 18 members (Geoffrey Kimani, Ron Jeffries)
2. Gluon group with about 12 members (Dennis Yar, www.enteto.com but
blacklisted by google)
3. GAE group (Dennis Yar, www.enteto.com but blacklisted by google)

Looks like these groups are not very active.

#1 can be taken over as official FB group and the #2 and #3 can be
fixed too?

Is there any interest in reviving these groups?

Regards
Anand
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18564] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-24 Thread Iceberg

Sure.

My crontab:

#0-59/1 *   *   *   *   root python /path/to/python/script
#10 *   *   *   *   root 
*applications/admin/cron/expire_sessions.py
# Some more comments here are in Chinese, but I omit them here. Should
not matter.
*/1 *   *   *   *   root *applications/myapp/cron/trigger.py


My trigger.py (a debugging version):

import urllib,logging,os,sys
try: request
except: # Just for test
  class Dummy(object): pass
  request=Dummy()
  request.application=request.server_port='test'
# At least when triggered by softcron,
# request.env.http_host is ALWAYS 127.0.0.1:8000
# rather than the real server addr and port of main web2py process :-/
t='http://127.0.0.1:8000/%s/default/trigger'%request.application
logging.debug('trigger.py(#%d): %s VS %s, visiting %s'%(
  os.getpid(),request.server_port,sys.argv,t))
urllib.urlopen(t).read()


A more clean trigger.py:

import urllib
t='http://127.0.0.1:8000/%s/default/trigger'%request.application
urllib.urlopen(t).read()

On Mar24, 11:53pm, AchipA attila.cs...@gmail.com wrote:
 Still undecided on this one. Can you post your crontab here just so I
 don't miss something obvious ?

 On Mar 19, 11:30 am, Iceberg iceb...@21cn.com wrote:

  Hi Achipa,

  I have an app based on web2py-win.zip 1.56.4's cron feature. I just
  noticed that, if the whole web2py is deployed in a directory name with
  space inside, such as C:\Program Files\web2py, the cron feature does
  not work, instead I saw one line appeared on the console:
    WARNING:root:WEB2PY CRON Call returned code 1:

  If I deploy it in C:\SOLID\web2py, everything runs smooth.

  So there might be some dir issue in cron's launcher. Please take a
  look. Thanks in advance!

  Regards,
  Iceberg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18565] Simplest patch ever - view the view

2009-03-24 Thread mr.freeze

This just adds a convenience link to view the page when editing a
view.  It avoids some mousing around and clicking:

Index: applications/admin/controllers/default.py
===
--- applications/admin/controllers/default.py   (revision 797)
+++ applications/admin/controllers/default.py   (working copy)
@@ -506,12 +506,14 @@
 response.flash = T('failed to reload module')

 edit_controller = None
-
+view_link = None
 if filetype == 'html' and request.args = 3:
 cfilename = os.path.join(request.args[0], 'controllers',
  request.args[2] + '.py')
 if os.path.exists(apath(cfilename)):
 edit_controller = URL(r=request, f='edit', args=
[cfilename])
+view = request.args[3].replace('.html','')
+view_link = A('view',_href=URL(request.args
[0],request.args[2],view))

 if len(request.args)  2 and request.args[1] == 'controllers':
 controller = (request.args[2])[:-3]
@@ -540,6 +542,7 @@
 saved_on=saved_on,
 controller=controller,
 functions=functions,
+view_link=view_link,
 editarea_preferences=editarea_preferences)

 def resolve():
Index: applications/admin/views/default/edit.html
===
--- applications/admin/views/default/edit.html  (revision 797)
+++ applications/admin/views/default/edit.html  (working copy)
@@ -19,6 +19,9 @@
 {{if functions:}}
 exposes {{=XML(', '.join([A(f,_href=URL(a=app,c=controller,f=f)).xml
() for f in functions]))}}
 {{pass}}
+{{if view_link:}}
+{{=view_link}}
+{{pass}}
 /div

 {{if edit_controller:}}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:18566] Looking for a FAST Developer in Web2Py

2009-03-24 Thread Steve Shephed

Anyone interested in a small project to create an autoresponder like
aweber.com with a few mods and including an AJAX look and feel.
Let me know your development rates at sargshep | gmail.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---