It would be great if somebody could write a unittest for validators...
--~--~-~--~~~---~--~~
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 unsu
> This should work fine
It does...am not quite sure which mistake I made, but it's all working
fine now.
*Many* thanks :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this
HTTP does not allow that unless your client (flash, js, etc.) uploads
each individual file (http://plugins.jquery.com/project/MultiFile) or
zips files and the uploads the zip file (I have never see a js library
to do it).
Massimo
On Dec 4, 1:04 am, somebody <[EMAIL PROTECTED]> wrote:
> can I upl
can I upload a folder / copy a whole folder to another directory??
--~--~-~--~~~---~--~~
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 unsubsc
Thanks a lot massimo i will follow your suggestions and i will study
your code.
Ciao
Paolo
On 4 Dic, 01:02, mdipierro <[EMAIL PROTECTED]> wrote:
> I edited the code below, look for the lines that contain refereer
>
> def update():
> try:
> dbname=request.args[0]
> db=eval(
Just ran into this one, but with apache, so a little followup - this
was a case where you're trying to establish an SSL connection, and
other side expects a regular http request. It had nothing to do with
the actual port or self-signedness of the cert - just mismatching the
virtualhost directives
I made some major changes in the handling of checkboxes following the
guidelines of Bill's patch.
Now you can do:
INPUT(_name='x',_type='checkbox',value=True) #default on - new
INPUT(_name='x',_type='checkbox',value=False) # default off - new
INPUT(_name='x',_type='checkbox',value='on,_value='on'
This should work fine
{{try:}}
{{for option in options:}}
{{=option}}
{{pass}}
{{except:}}
oops
{{pass}}
if you get an error it is usually because a line ending in : is not
paired up by a pass or because of unmatched {{ }} or because a block
is empty.
Massimo
On Dec 3, 5:50 pm, "Yarko Tymciura
I edited the code below, look for the lines that contain refereer
def update():
try:
dbname=request.args[0]
db=eval(dbname)
table=request.args[1]
except:
response.flash=T('invalid request')
redirect(URL(r=request,f='index'))
try:
What are you trying that you think it's not working? Can you show the code?
In general, think like this:
Write out "normal" Python code;
add {{ }} around every line;
Everywhere you have an UN-INDENT, add a {{pass}}
(you don't really need a pass everywhere, only where it's ambiguous - but
th
I've added a section within my layout.html with some loops like this:
{{for option in options:}}
{{pass}}
What I'd like is to have the ability to put either a {{try:}}
((except:}} {{pass}} or an {{if setting:}} {{pass:}} around this.
This doesn't seem to work, so I guess there's a fundamenta
So, wich is the best way to do it? What do you suggest?
Paolo
On 3 Dic, 17:24, mdipierro <[EMAIL PROTECTED]> wrote:
> Yes, as long you do not allow the possibility of two browser windows
> on two different pages.
>
> Massimo
>
> On Dec 3, 9:58 am, pmate <[EMAIL PROTECTED]> wrote:
>
> > i made th
Got little further with this concept and created new validator upon
modified html helpers and form handling classes. Basically im thinking
to generalize and automate form processing, that takes values from
several tables, perhaps even from different databases.
This validator was also inspired fro
Good point. We can do the command line switch. -T
On Dec 3, 12:37 pm, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> I don't like that idea. It increases restart time (not significantly until
> we get more tests) in a situation where it wouldn't make a difference the
> vast majority of the time.
On Wed, Dec 3, 2008 at 12:37 PM, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> I don't like that idea. It increases restart time (not significantly
> until we get more tests) in a situation where it wouldn't make a difference
> the vast majority of the time.
>
+1and if it's a command line sw
I don't like that idea. It increases restart time (not significantly
until we get more tests) in a situation where it wouldn't make a
difference the vast majority of the time.
Some of your DAL tests depend on the existence of the admin app which
may not be there and will cause problems for e
I think an option to run tests on startup (not unlike -S for shell) would
be good.
This would be a good start for contributions - don't ask for a merge until
all tests pass (a test merge can make that the first test too).
Since deployment (and auto-restart) could be anywhere, I would separate
se
Perhaps all tests should run automatically every time web2py starts.
What do people think about it?
Massimo
On Dec 3, 9:53 am, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> The branch (dal-testing-additions) is committed and I've proposed a merge
> into devel.
> -tim
> mdipierro wrote:ok, thanks
Yes, as long you do not allow the possibility of two browser windows
on two different pages.
Massimo
On Dec 3, 9:58 am, pmate <[EMAIL PROTECTED]> wrote:
> i made this way:
> in controller default:
> session.path='http://'+request.env.http_host+request.env.path_info
>
> in controller gestione/upd
Denes,
Thanks, problem solved, and something learned again.
I have just downloaded the pengoworks auto-complete files, and am
trying to figure out from the post you reference above how to get all
this to work properly in case of my plaatsnaam auto-complete field.
Since I do not need an id, just
i made this way:
in controller default:
session.path='http://'+request.env.http_host+request.env.path_info
in controller gestione/update:
redirect(session.path)
it seems it is working but i wonder if this is the correct solution
On 3 Dic, 10:26, pmate <[EMAIL PROTECTED]> wrote:
> Ciao Massimo,
The branch (dal-testing-additions) is committed and I've proposed a
merge into devel.
-tim
mdipierro wrote:
ok, thanks.
On Dec 3, 9:21 am, Timothy Farrell <[EMAIL PROTECTED]> wrote:
I do it like this:
import sys
import os
sys.path.append(os.path.realpath('../'))
import unittest
tablename is created from the field parameter,
if your field is 'gis_key.service' then tablename='gis_key'
Your model should have something like:
db.gis_key.key.requires=THIS_NOT_IN_DB(db
(db.gis_key.service==request.vars.service),'gis_key.service',request.vars.service,'service
already in use')
ok, thanks.
On Dec 3, 9:21 am, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> I do it like this:
> import sys
> import os
> sys.path.append(os.path.realpath('../'))
> import unittest
> import datetime
> import sql
> and then run it from the tests directory. Just leave it for now and I'll
> includ
Annet, you have to pass the url to the javascript function:
function detailsview(url) {
window.open(url, 'mywindow', 'height=600,
width=400,menubar=false');}
{{=A(club.bedrijf.bedrijfsnaam,
_href="javascript:detailsview('%s')"
%URL(r=request,f='clubdetails',args =[club.bedrijf.id]),
I do it like this:
import sys
import os
sys.path.append(os.path.realpath('../'))
import unittest
import datetime
import sql
and then run it from the tests directory. Just leave it for now and
I'll include it in my change branch.
-tim
mdipierro wrote:
I was going to ask you the same qu
> Fran, the code above was just an example.
> You have to adapt the validator parameters to your own model, i.e. you
> don't have a 'gis' table.
Yup, I spotted that ;)
I originally tried changing it to my data then when I thought I must
be mistranslating, then I created a table exactly as defined
I was going to ask you the same question.
I open a python shell and import the tests.
Massimo
On Dec 3, 8:25 am, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> Massimo,
> When you run unittests, which directory do you run them from. I typically
> run mine from the test directory, but i have a bu
There should be a README file but I may have forgot to update it.
On Dec 3, 8:00 am, Iceberg <[EMAIL PROTECTED]> wrote:
> On Dec 3, 6:29 am, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > please check it out. Very minor changes. The major change is caching
> > of bytecode on GAE.
>
> Is there any lat
Joe, thanks for clarifying the difference between "advertise" and
"advocate". It is an important difference and it escaped to me.
43g, sorry but the name has a history and it is staying. gluon, tau,
etc. are all trademarked. I do not like it, it is not enforcible, but
it can create trouble. web2p
yes, will fix it asap.
On Dec 3, 12:55 am, michal niklas <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I think that there is error in FAQ 'Form
> navigation':http://mdp.cti.depaul.edu/AlterEgo/default/show/33
>
> There is:
> if form.accepts(session.vars,session):
>
> I thought that first arg for fo
Fran, the code above was just an example.
You have to adapt the validator parameters to your own model, i.e. you
don't have a 'gis' table.
On Dec 3, 2:50 am, Fran <[EMAIL PROTECTED]> wrote:
> > Fran, the following validator seems to work as per your needs:
>
> This looks really nice - many thanks
Massimo,
When you run unittests, which directory do you run them from. I
typically run mine from the test directory, but i have a built-in path
mechanism to be able to find the necessary modules. With your new
test_dal.py, I cannot get it to run properly without modifying the
PYTHONPATH.
Oh snap!
I've gotta go make a launchpad branch and merge my changes in. I have
already started something for this but fortunately our efforts don't
overlap much.
-tim
mdipierro wrote:
gluon/tests/test_dal.py
the test does not yet include migrations, max, min, sum operators, csv
IO and
On Dec 3, 6:29 am, mdipierro <[EMAIL PROTECTED]> wrote:
> please check it out. Very minor changes. The major change is caching
> of bytecode on GAE.
Is there any latest whatsnew.txt or changes.txt which comes with every
version of new web2py? I could not find any in web2py_win.zip neither
web2py_
Thank for the code
when set to default
will it set to all to default too?
thanks and good day
On Dec 2, 4:48 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote:
> somewhere before your SQLFORM(),a statement such as:
>
> cynotedb.comment.body.default='hello'
>
> will pre-populate.
>
> This should wo
When I mention web2py to other python users, there is frequently
confusion with web.py which is very unfortunate. When people scan
their memories they go with the strongest associations first.
Sometimes people seem to believe that web2py is the version 2.0
of web.py -- which is erroneous.
Go on i
Ciao Massimo,
this is my update function in controller gestione.py:
def update():
try:
dbname=request.args[0]
db=eval(dbname)
table=request.args[1]
except:
response.flash=T('invalid request')
redirect(URL(r=request,f='index'))
try:
id=in
Denes,
Thanks for your thorough explanation.
In my application I got another unsolved problem, probably you know
how to solve it.
In one of my views I have got a table in which one of the
element reads like:
{{=A(club.bedrijf.bedrijfsnaam,_href=URL
(r=request,f='clubdetails',args =[club.bedri
+1 for Continued Advocacy - I think the Marketing around this product
is part of it's excellence...it really helped me to give the project a
serious try when seeing such clear, seemingly-impartial reasoning on
why this project was seen to be a useful enhancement of previous
framework learnings.
I
You don't "advertise" web2py. You "advocate" it. Advertising is done
by companies to sell products -- and is generally paid for in some
manner. Advocacy is done to bring attention to causes or movements.
Web2py is more of a movement than a product, in my opinion. (OK, by
some standards, maybe
41 matches
Mail list logo