Hello All,
I'm just discovering web2py and i'm not able to wrap my mind about the
Form level validation inside it.
Let's say we talk about a defect. This defect has a "Fixing
Date" (date where provider deliver the fixing code in integration
system) and a "Closing Date" (date where the customer c
Massimo,
I added two lookup table to my application:
db=SQLDB('sqlite://annet.db')
db.define_table('shape',
SQLField('name'),
migrate='shape.table')
db.define_table('color',
SQLField('name'),
migrate='color.table')
db.define_table('shapecolor',
SQLField('shapename'),
SQLField('col
On Jan 7, 10:02 am, annet wrote:
> when I comment out the last
> validator, I have two drop boxes in the admin from which I can choose
> a shape and a color and insert them into the database. However, when I
> uncomment the two column unique constraint, the color drop box breaks,
> it becomes a t
here, in my bookmarks, you can find some inspiration (design&code):
http://delicious.com/jumi/workflow
On Ut, 2009-01-06 at 22:43 -0800, Fran wrote:
> On Jan 7, 3:04 am, mdipierro wrote:
> > If you could come up with a reasonable list of specs and references I
> > can try add that to T3.
>
On Jan 7, 8:22 am, Manakel wrote:
> But i don't understand how i can perform business level check when
> using SQLForm
> -> this may be real date , but it's a date in the future so i don't
> allow the insertion/ update of the record (Business rules)
> -> this may be a real date, and date is today
Massimo,
It is important to follow patterns.
So, the best font is http://www.workflowpatterns.com/patterns/index.php
See that many software implementations don't use all patterns.
http://www.workflowpatterns.com/evaluations/opensource/index.php
http://www.workflowpatterns.com/evaluations/comm
I have mine working like this:
1) Extract web2py to ~/web2py
2) Place the attached dispatch.fcgi in your webroot (~/www you said)
3) Modify dispatch.fcgi to point to the right directories in your
situation
4) Place the attached htaccess file in your webroot. (Make sure you
rename it to .htacc
Sorry for the late response, been AFK for two weeks. As soon as I
catch my breath I will post the latest iteration of my patch in the
forum so people could comment/test it a bit before it gets included in
the trunk. For documentation, currently I can post the emails we
exchanged (if that's ok with
yes:
def mywidget(field,value,options):
id='%s_%s' % (field._tablename,field.name)
else: raise SyntaxError, "widget cannot determine options"
opts+=[OPTION(v,_value=k) for k,v in options]
return SELECT(*opts,**dict(_id=id,_class=field.type,
_name=field.name,v
yes:
def mywidget(field,value,options):
id='%s_%s' % (field._tablename,field.name)
else: raise SyntaxError, "widget cannot determine options"
opts+=[OPTION(v,_value=k) for k,v in options]
return SELECT(*opts,**dict(_id=id,_class=field.type,
_name=field.name,v
Yes, free to post them.
Massimo
On Jan 7, 7:39 am, achipa wrote:
> Sorry for the late response, been AFK for two weeks. As soon as I
> catch my breath I will post the latest iteration of my patch in the
> forum so people could comment/test it a bit before it gets included in
> the trunk. For do
you need to define your own validators like
class VALIDATOR:
def __init__(self,...): pass
def __call__(self,value):
if valid value: return (value,None)
else: return (value, error_message)
On Jan 7, 2:22 am, Manakel wrote:
> Hello All,
>
> I'm just discovering web2py and
The first argument in your cache decorator ( request.env.path_info ) is
the key that the cache system uses to determine uniqueness. If you
have a form in your view, then you need to insert all levels of
uniqueness into this key. Perhaps something like this...
cachekey = str(request.env.path_
Thanks Massimo,
The web2PY generic template is not displayed anymore. BUT I have a
more serious problem, forms rendered in the cached view function are
not validated and do not work anymore.
Any ideas?
Thanks
On Jan 6, 5:55 pm, mdipierro wrote:
> @voltron,
>
> ignore my original response. T
Tim is right but I'd not cache a page that needs to process a form.
Massimo
On Jan 7, 8:42 am, Timothy Farrell wrote:
> The first argument in your cache decorator ( request.env.path_info ) is the
> key that the cache system uses to determine uniqueness. If you have a form
> in your view, th
Fran, if you start working on a spatially aware DAL, please let me
know so we could join forces or at least avoid code duplication. I
have some spatial projects (none of them web2py at the moment) that
I'm considering on migrating, but more serious spatial support would
be needed for that, maybe e
> parsing instead of using regular expressions.
I was under the impression that you were using regex for speed, is
parsing faster?.
> 2) you use {{,}} inside strings as in
> {{="hello {{ world }}" }} without running into trouble.
Simpler = better.
> 3) you can do
>
> {{
> for i in range(10):
>
On Jan 7, 9:42 am, Timothy Farrell wrote:
> The first argument in your cache decorator ( request.env.path_info ) is the
> key that the cache system uses to determine uniqueness. If you have a form
> in your view, then you need to insert all levels of uniqueness into this key.
> Perhaps som
Massimo and Fran,
Thanks for your replies. I have used a widget only once, I'll give
implementing it a try.
Best regards,
Annet.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To pos
Sorry, I was trying to read Tim's post, why can't I see his text past
the right edge?
--~--~-~--~~~---~--~~
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@googlegr
On Jan 7, 9:25 am, DenesL wrote:
> > parsing instead of using regular expressions.
>
> I was under the impression that you were using regex for speed, is
> parsing faster?.
I benchmarked it. In this case makes no difference.
>
> > 2) you use {{,}} inside strings as in
> > {{="hello {{ world }}"
>
> So, the best font ishttp://www.workflowpatterns.com/patterns/index.php
>
Oohh.
Lots there, but I guess I was hoping for a Web2pyish simplest workflow
api that could possibly work. ;-)
--~--~-~--~~~---~--~~
You received this message because you are sub
Wow, very fast answers :-)
Can a custom validator get access to several fields of the Form?
For example, if i make a checkClosingDate validator ,
how can my validator read both the ClosingDate (the date to validate)
and the "Fixing Date" (support data)
- in the creation case where Fixing date is
I just can't look at this thread..I have a rabbit's memory of falling
down this hole once before, somewhere back in time...
...many, many patterns; rich topic; no good agreement from SME's on what is
being solved,
nor how to solve it (or if it's worth it); very open-ended feeling; in the
end, n
I fixed a couple of things in the new template.py now it is 1ms slower
then the old one (in average, both complex and simple pages that I
have tested).
Massimo
On Jan 7, 9:56 am, mdipierro wrote:
> On Jan 7, 9:25 am, DenesL wrote:
>
> > > parsing instead of using regular expressions.
>
> > I w
1ms? Bah that's plenty of time to go get coffee while the webpage loads.
mdipierro wrote:
I fixed a couple of things in the new template.py now it is 1ms slower
then the old one (in average, both complex and simple pages that I
have tested).
Massimo
On Jan 7, 9:56 am, mdipierro wrote:
yes and no.
a validator is uniquely associated to a field and validates that one
field but it can validate depending on the values of other variables
(request.vars)
example:
form=FORM('password:',INPUT(_name='password1',requires=IS_NOT_EMPTY
()),
'password again:',INPUT
(_nam
using T2
http://127.0.0.1:8000/f7/default/display_ware/3
in controller:
def display_ware():
ware=t2.display(db.ware)
return dict(ware=ware)
in HTML:
{{extend 'layout.html'}}
Tovar
{{=ware}}
{{=A(' Modify',_href=URL(r=request,f='modify_ware/%s'%request.args))}}
How can I ma
It is already parsed for you by t2 and stored in t2.id=int(request.args
[-1])
{{=A(' Modify',_href=URL(r=request,f='modify_ware/%s'%t2.id))}}
Massimo
On Jan 7, 10:29 am, Julius Minka wrote:
> using T2
>
> http://127.0.0.1:8000/f7/default/display_ware/3
>
> in controller:
> def display_ware():
that was it, thanks for fast answer
On St, 2009-01-07 at 08:34 -0800, mdipierro wrote:
> It is already parsed for you by t2 and stored in t2.id=int(request.args
> [-1])
>
> {{=A(' Modify',_href=URL(r=request,f='modify_ware/%s'%t2.id))}}
>
>
> Massimo
>
> On Jan 7, 10:29 am, Julius Minka wrot
Dear Massimo;
Dont worry , after this project done , (in 2 weeks) i will release web2py
OS too. I had made a VM to use for this project , its with web2py and
sliming it down , i can present you people with first release of web2py-vm.
I will also need community help to make it evolve!.
Regards,
update on wsgiserver:
- as of today, I received a suggestion on reverting to a specific changeset;
this changeset (one line effect for us) has potential to address the issues
we see in new server;
- still plan to characterize more (tests, traces) before considering a
change; look for request for
Massimo, you still have a tab char instead of blanks in line 64 (rev
631).
--~--~-~--~~~---~--~~
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
I sugest it only to get ideias, not to use everytthing.
I agree that simplier is better.
On Wed, Jan 7, 2009 at 2:14 PM, Yarko Tymciurak wrote:
> I just can't look at this thread..I have a rabbit's memory of falling
> down this hole once before, somewhere back in time...
> ...many, many pat
I followed your steps but got the following errors.
1. The .htaccess file causes this snippet of html to be returned for
all requests: Error
2. When I run dispatch.fcgi unmodified, it bails with "ImportError: No
module named fcgi" even though the import from gluon.contrib.gateways
is successful (
Oops, I overlooked that last import in my attachment. You were right
to fix it how you did.
Your step 3 tells me that it's working. This is roughly what I get
when I run mine. Now it's just a matter of getting Apache to recognize
your dispatch.fcgi. Things to check:
- permissions:
$ chm
On Wed, Jan 7, 2009 at 1:19 PM, Alexandre Miguel de Andrade Souza <
alexandrema...@gmail.com> wrote:
> I sugest it only to get ideias, not to use everytthing.
>
> I agree that simplier is better.
>
> On Wed, Jan 7, 2009 at 2:14 PM, Yarko Tymciurak wrote:
>
>> I just can't look at this thread.
I have got following in controllers/default.py:
response.menu=[
['Tovar',False,t2.action('browse')],
['Odberatelia',False,t2.action('temp')]]
def index():
return dict()
when I go to http://127.0.0.1:8000/my_app/
it displays page views/default/index.html
and in this page, it inserts "defaul
The permissions checked out, but I still get the same error html
snippet. The problem seems to be with the last line in .htacces:
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]
If I comment it out, I get the directory index where dispatch.fcgi
and .htaccess are.
Other content from ~/www is served ok,
I want to pre-populate the database with a whole bunch of images.
Since the 'upload' field is fundamentally a string containing the
filename I hoped to do so like this if I store the file in /uploads:
db['%s' % table].insert(
image="marker.png"
)
This works in appadmin, but not in the
My Tests (continuing):
with the latest trunk, on Winserver2003 - I can install, but I cannot start
w/ either python or sc command line method - I got:
StartService FAILED 1053:
The service did not respond to the start of control request in a timely
fashion.
. Hmmm...
On Tue, Jan 6, 2009 at
When I try to create an edit form with SQLFORM, the form displays a id
field labeled 'Record id', even when I specify fields=['name'].
db.define_table('posts',SQLField('name','string',requires=IS_NOT_EMPTY
()))
form = SQLFORM(db.posts,obj,fields=['name'])
Record id: 3
Name:
Is there a
Hi, can you give a simple example about group memberships and group
based access control in t3?
Or how can i show or not some menu/submenu in t3?
Can i do this whithout group memberships?
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
You need to rename your images. This is easy
instead of myimage.png you can use gis_marker.image.myimage.png
make sure "myimage" does not contain spaces or other special
characters.
web2py (T2/T3) needs to figure out from the image name which table and
which field stores the reference to the im
You need to use routes_in and routes_out there are examples in
routes.examples.py
On Jan 7, 2:54 pm, Julius Minka wrote:
> I have got following in controllers/default.py:
>
> response.menu=[
> ['Tovar',False,t2.action('browse')],
> ['Odberatelia',False,t2.action('temp')]]
>
> def index():
>r
SQLFORM(showid=False)
On Jan 7, 7:19 pm, Robin B wrote:
> When I try to create an edit form with SQLFORM, the form displays a id
> field labeled 'Record id', even when I specify fields=['name'].
>
> db.define_table('posts',SQLField('name','string',requires=IS_NOT_EMPTY
> ()))
>
> form = SQLF
You cannot use access control for menu items in T3.
If a page has "menu" checked and "public" check is always appears in
menus.
If a page has "menu" checked and "public" uncheck it will appear in
menus only to authenticated users
If a page has "menu" unchecked then it never appears in menus.
You
--- Original Message ---
From:mdipierro
> On Jan 5, 9:02 pm, Iceberg wrote:
> > On Jan6, 5:26am, Fran wrote:
> > > it's all working for me now with latest
> > > src & your new winservice.py :)
> > > All I see in Event Logs is:
> > > web2py server star
If anybody can figure out how to do that I have no objections.
Actually I would prefer not to have the library.zip file.
Massimo
On Jan 7, 9:13 pm, Iceberg wrote:
> --- Original Message ---
> From:mdipierro
> > On Jan 5, 9:02 pm, Iceberg wrote:
> >
We waited enough. To many changes to keep holding on.
web2py 1.55 is out.
Changelog:
- many2many widget via tagging (IS_IN_DB(multiple=True)
- delete and update return number of affected rows
- better unittests
- you can next cache calls (like cache a controller that caches a
select). Thanks
Hello everybody,
I am writing an application for a personal library. But now I need to
build a multiple field index because I don't want duplicate records
in my database. Can I do this with web2py?
Thanks
--~--~-~--~~~---~--~~
You received this message because
Look at IS_NOT_IN_DB
-wj
On Wed, Jan 7, 2009 at 9:01 PM, ionel wrote:
>
> Hello everybody,
>
> I am writing an application for a personal library. But now I need to
> build a multiple field index because I don't want duplicate records
> in my database. Can I do this with web2py?
>
> Thanks
-
I am amazed at the rate that features are added. Any idea when
github.com/web2py will be updated? Also web2py.com says 'Service
Temporarily Unavailable'.
Robin
On Jan 7, 9:40 pm, mdipierro wrote:
> We waited enough. To many changes to keep holding on.
>
> web2py 1.55 is out.
>
> Changelog:
>
Very nice! What is SQLFORM.widgets ?
On Jan 7, 9:40 pm, mdipierro wrote:
> We waited enough. To many changes to keep holding on.
>
> web2py 1.55 is out.
>
> Changelog:
> - many2many widget via tagging (IS_IN_DB(multiple=True)
> - delete and update return number of affected rows
> - better u
Massimo,
You requested, so I try to resume the most important patterns:
A proposal of a simple workflow specification:
By Alexandre Andrade (alexandrema...@gmail.com)
A workflow have some basic aspects:
1. Data – A work flow is about informations and decisions. Information is
in data, r
Controller functions taking arguments, or functions with an extra
space like def index (): are hidden:
http://groups.google.com/group/web2py/browse_thread/thread/35c15761dc3801e7/b0ee7945e272922e?lnk=gst&q=arguments+space+#b0ee7945e272922e
This is good that you can hide functions somehow, but us
Proposal: if web2py/applications/*/routes.py exists, then it is joined
with web2p/routes.py if any, and the app may rewrite the sections
after the app name, (controller, function, args, kwargs).
This would be useful for building rich/restful urls:
/api/blogs/11/posts/22/comments.xml
While this
57 matches
Mail list logo