Hi,
Accidentally came across the following scenario which I suspect to have
exposed a bug in Web2py.
While working on an application I noticed I had identical values
occurring in a particular column. E.g. given:
db = SQLDB('sqlite://storage.db')
db.define_table('person',SQLField('name
Denes,
Thanks for pointing me in the right direction, the {{pass}} was
missing here:
{{pass}}
After fixing this problem I found out something else. I made a static
layout; plain xhtml and a css. When I use this layout in web 2py the
header and footer display alright, however th
I don't know, in the function I want to use the following code
if form.accepts(request.vars,session):
code=db(db.postcoderegio.regio==request.vars.regio).select
(db.postcoderegio.min,db.postcoderegio.max)
clubs=db().select(db.company.ALL,db.address.ALL,left=db.address.on
(
(db.addres
A note, often the OS's disk caching (esp with linux style cache) is
enough speedwise, it is worth going for memory only if you're 100%
sure that the disk is a bottleneck. Otherwise, by dedicating memory to
cache or tmpfs you can actually slow yourself down in a low mem
situation (by forcing apache
Yes, thank you, Achipa. I forgot to warn about it, I will add this to
an AlterEgo entry as soon as I can edit it.
--
Kuba
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to thi
Very nice and cool!
Because of the static height (style="height: 35px;" in views/default/
index.html) it only works for me when moving the div/window away from
the left column.
is jDiv and the new web2py_ajax.html finding its to web2py or a svn
repository?
Niels
On 6 Apr., 08:09, mdipierro w
Hello,
can I use web2py to to something like autoindex for directories?
In Apache it is called mod_autoindex (http://httpd.apache.org/docs/2.0/
mod/mod_autoindex.html).
What is the best way to serve static pages like a Sphinx documentation
built?
Shall I just put the files into the "view" folder
If you try to limitby complex query in oracle you get an error
(duplicate records). Gluon currently works well for queries like
db().select(db.details.ca_date, orderby=~db.details.ca_date, limitby=
(0,1))
but does not work for joint tables e.g.:
db(db.headers.id==db.details.header) \
.se
Oracle handles DATE type similarly to DATETIME so it outputs date with
timestamp 00:00:00. If you print out SQLRow you will see that it
contains datetime.datetime(2009, 4, 6, 0, 0)
But for portablility it should be datetime.date(2009, 4, 6, 0, 0)
I could not identify correct place to patch in gluo
Apropos, there was a patch to support per domain routes a week ago (or
two), can you tell what's the status on that one ?
On Apr 6, 9:40 pm, mdipierro wrote:
> OK. email me the patch.
>
> Massimo
>
> On Apr 6, 2:09 pm, Robin B wrote:
>
> > I thought it would be cool to have a routes.py for each
This code works in MySQL, SQLite:
db(cond).select(db.carts.ALL, db.c_h.cart_id.count(),
left=db.c_h.on(many_to_many),
groupby=db.carts.id,
orderby=carts_orderby,
Good catch but this this is fixed in trunk already. ;-)
Will repost 1.60 soon.
Massimo
On Apr 7, 2:09 am, Guido Kollerie wrote:
> Hi,
>
> Accidentally came across the following scenario which I suspect to have
> exposed a bug in Web2py.
>
> While working on an application I noticed I had ident
\d{4} means 4 digits
On Apr 7, 3:03 am, jmverm...@xs4all.nl wrote:
> I don't know, in the function I want to use the following code
>
> if form.accepts(request.vars,session):
> code=db(db.postcoderegio.regio==request.vars.regio).select
> (db.postcoderegio.min,db.postcoderegio.max)
> clubs
I guess I lost it.
On Apr 7, 4:12 am, AchipA wrote:
> Apropos, there was a patch to support per domain routes a week ago (or
> two), can you tell what's the status on that one ?
>
> On Apr 6, 9:40 pm, mdipierro wrote:
>
> > OK. email me the patch.
>
> > Massimo
>
> > On Apr 6, 2:09 pm, Robin B
Hello, Massimo and all!
Could you explain whether would web2py work with dispersed datafiles
in some folder structure?
Such kind of data storage provides separated data objects in XML or
JSON format with not-limited security (any of NTFS features). Also the
easy merge of local and remote (web) da
On Apr 7, 3:36 am, jmverm...@xs4all.nl wrote:
> After fixing this problem I found out something else. I made a static
> layout; plain xhtml and a css. When I use this layout in web 2py the
> header and footer display alright, however the
> and everything within in fall apart, i.e. aren't styled p
Hi,
i need to make a validation like 'nothing or email', but IS_EMAIL is
always complaining even on empty string. How to combine required
validators to do this EMPTY or EMAIL ?
Michal alias Plysak
--~--~-~--~~~---~--~~
You received this message because you are s
IS_NULL_OR(IS_EMAIL())
On Apr 7, 8:47 am, Michal Jursa wrote:
> Hi,
> i need to make a validation like 'nothing or email', but IS_EMAIL is
> always complaining even on empty string. How to combine required
> validators to do this EMPTY or EMAIL ?
>
> Michal alias Plysak
--~--~-~--~~-
I hope my today's activity with Oracle testing helps to improve
web2py!
Model:
db.define_table('settings',
SQLField('created_at', 'datetime', default=datetime.datetime.now
()),
SQLField('meta', 'text'),
)
Controller action:
outp = 'Long text longer than 4000 symbols'
db.settings.insert
Thank you Massimo, I will inform you everything by email once I finish
the preparation of my side.
best regards:
dbb
On Apr 6, 10:01 pm, mdipierro wrote:
> I am more than OK with this. I am happy you are doing it. What is your
> timeline?
>
> Massimo
>
> On Apr 6, 8:32 pm, dbb wrote:
>
>
>
>
Hi,
I can get the first_name of a user loged in using
first_name=auth.user.first_name.
I assigned roles to the user. How can I get the role using something
like role=auth.role?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
ahh, thanks massimo i somehow missed this...
Michal alias Plysak
mdipierro wrote:
> IS_NULL_OR(IS_EMAIL())
>
> On Apr 7, 8:47 am, Michal Jursa wrote:
>> Hi,
>> i need to make a validation like 'nothing or email', but IS_EMAIL is
>> always complaining even on empty string. How to combine requir
On Apr 6, 11:01 am, annet wrote:
> I have got the following model:
>
> db.define_table('postcoderegio',
> SQLField('regio', type='integer', length=2, default='',
> notnull=True),
length is not valid with integer fields
> SQLField('min', type='integer', length=4, default='',
> notnull=Tr
a2enmod web2py returns "ERROR: Module web2py does not exist!"
So am I missing a module?!? I've not read anything that indicates
that a web2py module should exist. Maybe my eyes are not working?!?
mime.conf and mime.load are indeed under /etc/apache/mods-enabled/
mime.conf contains the line:
Ty
On Apr 7, 9:10 am, Monty808 wrote:
> I assigned roles to the user. How can I get the role using something
> like role=auth.role?
I don't know if this is the 'proper' way to do it but you could try:
https://mdp.cti.depaul.edu/wiki/default/page/4ebc7198-eac5-4227-894f-b267879eb64b
Brian
--~--~-
@Michal,
tsk... tsk... bad etiquette... hijacking other people's posts.
You can always open a new post with your issue.
On Apr 7, 9:47 am, Michal Jursa wrote:
> Hi,
> i need to make a validation like 'nothing or email', but IS_EMAIL is
> always complaining even on empty string. How to combine r
On Apr 7, 9:20 am, zxynax wrote:
> a2enmod web2py returns "ERROR: Module web2py does not exist!"
>
oops... I guess that should be a2ensite web2py...
I'll power on my laptop that I was testing with and paste them
shortly.
Brian
--~--~-~--~~~---~--~~
You received
What? What have i done wrong?
Michal
DenesL wrote:
> @Michal,
> tsk... tsk... bad etiquette... hijacking other people's posts.
> You can always open a new post with your issue.
>
>
> On Apr 7, 9:47 am, Michal Jursa wrote:
>> Hi,
>> i need to make a validation like 'nothing or email', but IS_E
Discussion subject changed to "make validator ignore empty string" by
Michal Jursa
You probably sent your message as a reply to an existing, instead of a
typing a 'new' message. When you reply, the thread-id remains, so it
will look funny (=harder to track) for people using threaded mail
readers
Whops, sorry, didn't know that, won't do it any more.
Michal
AchipA wrote:
>
> Discussion subject changed to "make validator ignore empty string" by
> Michal Jursa
>
> You probably sent your message as a reply to an existing, instead of a
> typing a 'new' message. When you reply, the thread-id
I thought that's what you intended. But as I'm the one who's
obviously not understanding something very simple - like the example
in the deployment recipe section - I'm the one waving the idiot banner
and as such have had all powers of assumption revoked.
Anyway, I have enabled the site that uti
Massimo, thanks for the hint about placing sqlite database in
different folder. However I found it not fully work as expect, because
those "abcdef123456_blah.table" are still created inside app/databases
folder. Could you adjust the code so that all relevant *.table files
are in the same folder as
Thank you.
On Apr 7, 10:43 am, Michal Jursa wrote:
> Whops, sorry, didn't know that, won't do it any more.
>
> Michal
>
> AchipA wrote:
>
> > Discussion subject changed to "make validator ignore empty string" by
> > Michal Jursa
>
> > You probably sent your message as a reply to an existing, ins
Yes. Thanks for all your work. Could you email me a summary of your
patches?
On Apr 7, 8:50 am, SergeyPo wrote:
> I hope my today's activity with Oracle testing helps to improve
> web2py!
>
> Model:
>
> db.define_table('settings',
> SQLField('created_at', 'datetime', default=datetime.datetim
the bottom line is you should use regex to validate postal codes since
they may start with 0.
On Apr 7, 9:15 am, DenesL wrote:
> On Apr 6, 11:01 am, annet wrote:
>
> > I have got the following model:
>
> > db.define_table('postcoderegio',
> > SQLField('regio', type='integer', length=2, defa
A user may have membership in groups with multiple roles:
for row in db(db.auth_group.id==db.auth_membership.group_id)
(db.auth_membership.user_id==auth.user.id).select(db.auth_group.ALL):
print row.role
On Apr 7, 9:10 am, Monty808 wrote:
> Hi,
>
> I can get the first_name of a user loged i
On Apr 7, 9:52 am, zxynax wrote:
> I thought that's what you intended. But as I'm the one who's
> obviously not understanding something very simple - like the example
> in the deployment recipe section - I'm the one waving the idiot banner
> and as such have had all powers of assumption revoked.
Hello,
yesterday I created a web2py team at launchpad.
https://launchpad.net/~web2py
Please feel free to add yourself to the team.
It doesn't mean something special so far. But maybe this can
facilitate common development at later stage!
Also, I started a project for Geo stuff:
web2py Geo & GIS
Hi,
I'm using the last web2py release on localhost with python-2.5.4 on a
LFS based system.
I'm trying to import a CSV file through the web2py interface, I have
tried several CVS output,but everytime,I've got the same error which
is "unable to parse csv file"
Here is the sqlite database created
Thank you.
On Apr 7, 10:52 am, Timmie wrote:
> Hello,
> yesterday I created a web2py team at launchpad.https://launchpad.net/~web2py
>
> Please feel free to add yourself to the team.
> It doesn't mean something special so far. But maybe this can
> facilitate common development at later stage!
>
You should be able ti just delete the "id" column and if there are no
dates it should work.
On Apr 7, 11:16 am, fredg wrote:
> Hi,
>
> I'm using the last web2py release on localhost with python-2.5.4 on a
> LFS based system.
> I'm trying to import a CSV file through the web2py interface, I have
> You should be able ti just delete the "id" column and if there are no
> dates it should work.
Trying with that CSV file (with and without the 1st line) :
packages.nom,packages.description,packages.url,packages.packager,packages.categorie
"AfterStep","Gestionnaire de fenêtres","http://
www.afte
I could be wrong though, so if someone can get shadowbox javascript
library to work with web2py, especially the iframe embedded windows,
that would be awesome.
http://www.mjijackson.com/shadowbox/index.html
I have the embedded window working. I.e. I can give it an href of
www.google.com, and an e
I trying to get web2py running on vista ultimate which has IIS
installed. I can get helloworld.html running on localhost and also
from the web using a static ip and port forwarding on my router.
However, I cannot get it on another computer on the lan or on the web.
My ip address on the lan is 192
I noticed that if I enter an href="{{=URL(r=request, c='mycontroller',
f='myfunction')}}.html", the embedded window pops-up, however, it is
blank because if I manually enter that address, I get invalid
function. I wonder if simply setting up a rout that will re-direct the
above to just URL(r=reque
There could be a firewall or there could be another process running on
the same port. Try changing the port.
On Apr 7, 12:21 pm, davidjensen wrote:
> I trying to get web2py running on vista ultimate which has IIS
> installed. I can get helloworld.html running on localhost and also
> from the web
FIXED!!
That was the problem!
the embedded window needed an address ending in .html. However, web2py
doesn't provide that out of the box (which I think it should, btw,
just provide an example routes.py populated with what is needed to
take all .html links to the function preceding it).
I crea
I think your problem is the +".html" below
{{=URL(r=request, c='mycontroller',f='myfunction')}}.html
It should not be there.
On Apr 7, 12:30 pm, waTR wrote:
> I noticed that if I enter an href="{{=URL(r=request, c='mycontroller',
> f='myfunction')}}.html", the embedded window pops-up, however,
What error do you get?
Here are some other possible causes of errors:
- There are column names that do have a corresponding field in the
table
- field types do not match
- you have dates NOT in ISO format
- you have special characters in the strings (I see you have a "ê").
Strings must be UTF8 to
Suggest David to paste his command line to start web2py and the
console output, to make sure no simple typo inside.
By the way, can web2py provide useful information now, when port not
available? We mentioned that.
http://groups.google.com/group/web2py/browse_frm/thread/76c1751a01bf8d5d
On Apr8
Please post t on AlterEgo and I'll approve it
On Apr 7, 1:59 pm, waTR wrote:
> The problem was web2py was not serving files ending in .html to the
> browser. All I needed to do to get shadowbox running with web2py was
> create a routes.py that added .html to all web2py URLs.
>
> Here is the rout
Because if appadmin were to give a ticket people would interpret this
as a web2py (appamdin) bug.
If you call
db.youtable.import_from_csv_file(open(,'rb'))
and it fails, this will give you a ticket.
Massimo
On Apr 7, 1:19 pm, fredg wrote:
> > What error do you get?
>
> I don' t have a
> What error do you get?
I don' t have any ticket just the red warning.
Is there a log file where I can find something useful for you ?
> Here are some other possible causes of errors:
> - There are column names that do have a corresponding field in the
> table
> - field types do not match
> - yo
On Sun, 5 Apr 2009 17:08:31 -0700 (PDT), richar...@gmail.com said:
> And my version is
> fast becoming out of date with all the new features.
This is not a complaint - I do not expect the book to be free - but the
above point is valid. I too have the printed book, but a lot has changed
since it
Just a couple more data points in case they are useful.
The -R was indeed unnecessary in the crontab, but it doesn't seem to
be the cause of the problem, as db.commit() is still required in order
to successfully insert into the database. Also, running the web2py
shell (-M -S appname) also require
I am learning all the new auth, crud, and mail tools now, and I have
one question:
Does web2py use the 'default' controller as an implicit global
controller across a single application, or is that even possible?
Here is my situation. When I create my:
## default.py controller
def user():
re
On Apr 7, 1:32 pm, zxynax wrote:
> So I found a workaround.
Great!
>
> The problem I have with this is I'd like to manipulate the xml
> contained within the .svg with web2py.
>
> Is an email to the author in order?
Not a clue. I've never touched WSGI before last night :)
Brian
--~--~-
I uncommented the alias line and it now serves SVG.
Problem is that none of the web2py code runs.
On Apr 7, 10:31 am, bsnipes wrote:
> On Apr 7, 9:52 am, zxynax wrote:
>
> > I thought that's what you intended. But as I'm the one who's
> > obviously not understanding something very simple - lik
You can do what you are talking about via routes.py.
I believe this will do it:
routes_in=(
('/yourapp/default/$f.html','/yourapp/$f'),
)
On Apr 7, 12:44 pm, g-man wrote:
> I am learning all the new auth, crud, and mail tools now, and I have
> one question:
>
> Does web
The problem was web2py was not serving files ending in .html to the
browser. All I needed to do to get shadowbox running with web2py was
create a routes.py that added .html to all web2py URLs.
Here is the routes.py file contents that fixed the problem. My
routes.py file now creates a URL followed
On Apr 7, 1:59 pm, zxynax wrote:
> That begs the question - what deployment method are you using?
>
It will be on Apache. Right now I am creating my first actual site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
and another one:
http://www.jjude.com/2009/04/07/why-i-chose-web2py-for-developing-yatsy/
On 6 avr, 22:16, desfrenes wrote:
> On 6 avr, 22:01, g-man wrote:
>
> > Where are all the web2py blogs and articles, people?
>
> here's
> one:http://www.desfrenes.com/blog/post/quel-framework-web-python-
So I found a workaround.
The alias directive should be as follows:
"Alias / //applications//static/"
This allows the web2py code to run properly and still allow .svg
images to be correctly given to the client with the proper image/svg
+xml header.
The problem I have with this is I'd like to man
That begs the question - what deployment method are you using?
On Apr 7, 1:39 pm, bsnipes wrote:
> On Apr 7, 1:32 pm, zxynax wrote:
>
> > So I found a workaround.
>
> Great!
>
>
>
> > The problem I have with this is I'd like to manipulate the xml
> > contained within the .svg with web2py.
>
> >
Awaiting approval.
Called "How to use shadowbox with web2py".
Cheers.
On Apr 7, 12:32 pm, mdipierro wrote:
> Please post t on AlterEgo and I'll approve it
>
> On Apr 7, 1:59 pm, waTR wrote:
>
> > The problem was web2py was not serving files ending in .html to the
> > browser. All I needed to
I am using the t2.logged_in variable to store the status of my user.
When the user logs in, the function changes the t2.logged_in = True.
However, when I then check t2.logged_in in another controller and
another page, t2.logged_in = False. Whats going on? It seems
t2.logged_in is not keeping tra
You can do:
index_url=URL(r=request,f=index')
def login(): return dict(form = auth.login(next=index_url))
def register(): return dict(form = auth.register(next=index_url))
...
etc.
Massimo
On Apr 7, 2:44 pm, g-man wrote:
> I am learning all the new auth, crud, and mail tools now, and I have
try {{=session}} to see what is going on
Is it possible you create the t2 object in the controller and not in
the model?
I think there is also a variable session.t2_person_id that you can
use for the check.
Massimo
On Apr 7, 3:50 pm, waTR wrote:
> I am using the t2.logged_in variable to stor
Just came across this nice post and am going to try it tonight:
http://groups.google.com/group/web2py/browse_thread/thread/8bab53777c1b1587/ddf09d126685fd7f?lnk=gst&q=apache#ddf09d126685fd7f
Brian
--~--~-~--~~~---~--~~
You received this message because you are sub
my model has the following for T2:
from applications.plugin_t2.modules.t2 import T2
t2=T2(request,response,session,cache,T,db)
session.t2_person_id prints "NONE"
am I missing something?
Here is my code logic:
check if username & password are correct.
if they are, then set t2.logged_in = True a
I read in a thread a while back about possible inclusion of ready-made
app classes and modules in web2py - I couldn't locate it so I figured
I would add it here.
A shopping cart class would be fantastic!
Something that would allow developers to build either cart-enabled
websites, or shopping car
Did you look into the eStore app on http://www.web2py.com/appliances ?
It needs some more work but it is decent.
Massimo
On Apr 7, 4:32 pm, Michael wrote:
> I read in a thread a while back about possible inclusion of ready-made
> app classes and modules in web2py - I couldn't locate it so I fig
That is the setup I use.
On Apr 7, 4:19 pm, bsnipes wrote:
> Just came across this nice post and am going to try it tonight:
>
> http://groups.google.com/group/web2py/browse_thread/thread/8bab53777c...
>
> Brian
--~--~-~--~~~---~--~~
You received this message beca
CODE:
form=FORM(TABLE(TR("Your name:",INPUT
(_type="text",_name="name",requires=IS_NOT_EMPTY(),
_class="frm_field")),
TR("Your email:",INPUT
(_type="text",_name="email",requires=IS_EMAIL(), _class="frm_field")),
TR("Subject",INPUT
(_name="subject",requires=I
I am looking to write a validator that takes as its arguments a
request.post_vars.pass1 and request.post_vars.pass2. This is to check
if when the use enters a password in 2 fields that they are the same.
It then checks if they match, and if they don't it flashes an error
saying passwords do not m
This is not in a view therefore you should do
form=FORM(, _action=URL(r=request, c='comm', f='esend'),
_method="post")
Massimo
On Apr 7, 5:58 pm, waTR wrote:
> CODE:
> form=FORM(TABLE(TR("Your name:",INPUT
> (_type="text",_name="name",requires=IS_NOT_EMPTY(),
> _class="frm_field")),
>
I just do
FORM(INPUT(_name='pass1'),INPUT(_name='pass2', requires=IS_EXPR
('value==%s' % repr(request.vars.pass1)),INPUT(_type='submit'))
On Apr 7, 6:37 pm, waTR wrote:
> I am looking to write a validator that takes as its arguments a
> request.post_vars.pass1 and request.post_vars.pass2. This
That's definetly better than what I was going to do :)
Thanks for the quick response!
On Apr 7, 4:56 pm, mdipierro wrote:
> I just do
>
> FORM(INPUT(_name='pass1'),INPUT(_name='pass2', requires=IS_EXPR
> ('value==%s' % repr(request.vars.pass1)),INPUT(_type='submit'))
>
> On Apr 7, 6:37 pm, waT
> stop blaming him for that silly 'problem' you can solve for $10.
FYI I have already bought the book. You are right that it is a trivial
amount for someone who is already convinced of the benefits of
web2py.
However it is an obstacle for beginners who are evaluating web2py
while the free documen
Hello mate,
We are able to register a user with empty password when using Auth API
for registration.
So basically if you have a controller like this :
# controller (with "auth" already define in model)
def register():
return dict(registerform = auth.register(next="blabla"))
# A view
{{=regist
Hi,
I tried to use {{=xxx}} in javascript tags but it did not work. e.g.
if ( {{=xxx}}=='True'){
}
What do I do?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to
When I called one year ago they would not publish the book at all. Now
we have 10 times more users so it may me worth calling them again. I
will give it a try.
Massimo
On Apr 7, 7:33 pm, Baron wrote:
> > stop blaming him for that silly 'problem' you can solve for $10.
>
> FYI I have already bou
Assuming the JS is in a view (not a .js file)
if ( {{=xxx}}=='True'){
should work but probably does not do what you want. My guess is that
you want
if ( "{{=xxx}}"=='True'){
or
{{import gluon.contrib.simplejson as sj}}
if ( {{=js.dumps(xxx)}}==true){
check the source if the genera
OperationalError: (1050, "Table 'users' already exists")
I know it already exists, but I want you to just know about it rather
than try to create it all the time. I tried clearing out my /databases
folder as well. Any other ideas?
--~--~-~--~~~---~--~~
You received
If the table already exists
db.define_table(, migrate=False)
Massimo
On Apr 7, 11:18 pm, TheDude wrote:
> OperationalError: (1050, "Table 'users' already exists")
>
> I know it already exists, but I want you to just know about it rather
> than try to create it all the time. I tried clearin
Denes,
> same here, IS_LENGTH is invalid with integers (numbers don't have a
> length property in Python).
I didn't know that, however, removing the IS_LENGTH() validator solved
the problem )after finishing the first version of the application I am
working on I'll definitely have to dive into P
86 matches
Mail list logo