I was trying to make one of those fancy url behaviors where the name
of the url actually has some meaning. Well, i was trying to create a
blog and wanted to have this kind of url to be valid:
http://site.com/blog/blog-name/year/month/day/id/
would be valid and the parameters blog-name, year, mon
After changes in the database, like submiting a form, if you're not
"ajaxing things up!", is good practice to redirect the user to some
page. This avoids the problem where the refresh button from the
browser would re-submit the form and stuff like that. If you can't
send flash messages after a red
I can't grab a button, like submit buttons, with jquery. At least as
far as I can tell. I have to add a class to them. So...
How do I add a class to buttons in my SQLForms?
BR
Jason Brower
--~--~-~--~~~---~--~~
You received this message because you are subscr
On 8-apr-2009, at 18:33, mdipierro wrote:
> OK, uploading to trunk. Thanks.
I see you have reverted the change:
http://code.google.com/p/web2py/source/diff?spec=svn822&r=822&format=side&path=/trunk/gluon/main.py&old_path=/trunk/gluon/main.py&old=817
due to "__file__ caused problems on o
Sorry, I haven't a clue how to do that. :( But would be happy to learn.
BR
Jason Brower
On Wed, 2009-04-15 at 21:50 -0700, mdipierro wrote:
> The editor is not supposed to expire the session because there is a
> keepalive ajax request.
> If it is disconnecting you than there is a bug. Can you a
I think that storing messages in the database is overkill and storing
them in cookies is unsafe (unless we encrypt cookies and that is also
overkill) and would not work when cookies are off.
What is so bad about the current way of doing it?
Massimo
On Apr 15, 10:21 pm, Italo Maia wrote:
> In d
db.Field() because it avoid conflicts when running on Google App
Engine.
On Apr 15, 10:37 pm, Italo Maia wrote:
> Just saw a video (http://www.vimeo.com/2720410) where db.Field was
> user, and not SQLField...Which should be used?
--~--~-~--~~~---~--~~
You received
The editor is not supposed to expire the session because there is a
keepalive ajax request.
If it is disconnecting you than there is a bug. Can you add a print
statement to the admin/controller/keepalive and check what is going
on?
Massimo
On Apr 15, 10:08 pm, Jason Brower wrote:
> A minor issu
response.flash is just a variable and so is session.flash.
session.flash is copied into response.flash after redirection.
You are free to do things like:
session.flash=['warning','red','message']
or
session.flash='warning/red/message'
and have the JS break use its components. I'd prefer to le
Just saw a video (http://www.vimeo.com/2720410) where db.Field was
user, and not SQLField...Which should be used?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, se
In django, they use a messaging system based in the database, and
relate messages from the user with his session. When the message is
fetched to the user, it is then removed immediatly. That makes it
possible for redirects to show messages for an user after a redirect,
tought it does not work for
I am trying to make jquery pull all the buttons made in my forms and
turn them into nice looking html buttons.
I have all the code ready except that I don't know how to set a class to
a button. I didn't notice any class set to the buttons now either.
What would be the best approach to this?
Regar
A minor issue I am sure, but when I am developing I leave all the
windows open just the way a like and suspend and comeback at a later
time. Doing so makes my editor windows say the have a "communication
error" because my session timed out. I would like it to be able to let
me log back in to my
Sure. I even have a totally different design for mine.
I made it fade in instead, and I had it use an entire block. I did that
with the jquery calls in the web_ajax.html file in the view section.
Then I set the area in my layout.html. Basically, take the old flash
area text and cut and past it
Currently I think most of us use response.flash as a resort to give
all kinds of feedback. For example:
def foo():
form=SQLFORM(...)
if form.accepts(...):
if there_is_some_minor_issue:
response.flash='Warning: your input is unusual, but anyway the
data is accepted'
else:
r
This is not a bug. I misunderstood the question.
db.define_table('states',
SQLField('State','string',length=2)
)
db.define_table('provider',
...
...
SQLField('State'), ### has to be a string to store a
string in it.
Because I cannot find a way to make it work. I do not believe it is
possible. I may be wrong and if you find a way send me a patch.
Massimo
On Apr 15, 6:38 pm, ceej wrote:
> Is there a reason response.flash doesn't work with redirect('/') ?
--~--~-~--~~~---~--~~
Currently there is no flag to change it. I will add one.
Massimo
On Apr 15, 5:40 pm, Wes James wrote:
> Is there a line for update instead of read for:
>
> /default/data/select/table
>
> I'd like to have the select links be updates
>
> .../default/data/update/table/id
>
> instead of
>
> ...
Let me look into this tonight. It may be a bug.
Massimo
On Apr 15, 3:29 pm, JohnMc wrote:
> Hmm. Unfortunately I receive --
>
> File "/home/rootuser/web2py/gluon/sqlhtml.py", line 544, in accepts
> fields[fieldname] = int(fields[fieldname])
> ValueError: invalid literal for int() with bas
Is there a reason response.flash doesn't work with redirect('/') ?
--~--~-~--~~~---~--~~
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 unsubscr
Is there a line for update instead of read for:
/default/data/select/table
I'd like to have the select links be updates
.../default/data/update/table/id
instead of
.../default/data/read/table/id
thx,
-wj
--~--~-~--~~~---~--~~
You received this message be
Hmm. Unfortunately I receive --
File "/home/rootuser/web2py/gluon/sqlhtml.py", line 544, in accepts
fields[fieldname] = int(fields[fieldname])
ValueError: invalid literal for int() with base 10: 'TX'
Thanks
On Apr 15, 3:06 pm, mdipierro wrote:
> db.provider.State.requires=IS_IN_DB(db,'st
db.provider.State.requires=IS_IN_DB(db,'states.State','%(State)s')
Massimo
On Apr 15, 2:59 pm, JohnMc wrote:
> I have a similar situation to that of Mr. Jeppesen. Here is the setup
> --
>
> db.define_table('states',
> SQLField('State','string',length=2)
>
> )
>
> db.define_table
I have a similar situation to that of Mr. Jeppesen. Here is the setup
--
db.define_table('states',
SQLField('State','string',length=2)
)
db.define_table('provider',
...
...
SQLField('State',db.states),
...
Fixes a bug introduced in 1.61 that caused inability to run bytecode
compiled apps. Thanks to CJ for reporting this.
Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to th
this is interesting as I was going to ask when we would work on being
2.6 compatible (since I started looking at parsers, and may have other
interests in potentially using 2.6+ only things).
On Tue, Apr 14, 2009 at 11:05 PM, mdipierro wrote:
>
> There is a python 2.5 requirement mostly beca
> See if http://forum.webfaction.com/viewtopic.php?pid=8473#p8473
> provides any hints for you
Thanks Yarko.
It still has the troublesome line:
WSGIScriptAlias / /home/[YOUR ACCOUNT]/webapps/apachewsgi/web2py/wsgihandler.py
Which essentially tells apache to handle anything coming at the ro
Hi Massimo -
I will be at choir tonight (it's a "in one house" rehearsal w/ several
choirs) and go to Poor Phils, but I will need to ride home tonight (Joan
wanted "a break, with no phone calls" -- I have no idea what is going on...)
I have been tired / exhausted this past month, so I will not stay
Thanks for letting us know. I am sure others will find the information
useful.
This type of wsgi issues are a mistery to me.
Massimo
On Apr 15, 10:16 am, stefan wrote:
> Thank you very much.
> Indeed, mod_mem_cache was the problem.
> Once disabled, the page loaded as expected.
>
> Thank you.
>
Thank you very much.
Indeed, mod_mem_cache was the problem.
Once disabled, the page loaded as expected.
Thank you.
On 15 Apr, 18:06, mdipierro wrote:
> Follow this thread...
>
> http://www.modpython.org/pipermail/mod_python/2008-December/025871.html
>
> They have a solution. It is not a web2py
Follow this thread...
http://www.modpython.org/pipermail/mod_python/2008-December/025871.html
They have a solution. It is not a web2py problem.
Massimo
On Apr 15, 9:33 am, stefan wrote:
> Hello,
>
> Trying to get web2py to work with mod_wsgi but still no
> luck.http://myIP/welcome/default/in
can you post the language file?
what database are you using?
Massimo
On Apr 15, 9:10 am, jmverm...@xs4all.nl wrote:
> Massimo,
>
> > SQLField('datum',type='date',requires=IS_DATE(str(T('%Y-%m-%d'
>
> I changed this.
>
> > The main problem is here:
>
> > > fromdate=request.vars.datum
> > > to
Hello,
Trying to get web2py to work with mod_wsgi but still no luck.
http://myIP/welcome/default/index shows Internal error and the issued
ticket number/link.
My current setup is:
Apache/2.2.3 (CentOS_x64) DAV/2 mod_wsgi/2.4 Python/2.5.4 PHP/5.1.6
mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5
Python
If required validate it as a date:
SQLField('datum',type='date',requires=IS_DATE(str(T('%Y-%m-%d'
else
SQLField('datum',type='date',requires=IS_NULL_OR(IS_DATE(str(T('%Y-%m-
%d')
Massimo
On Apr 15, 9:30 am, annet wrote:
> In a previous post Massimo corrected the following definition:
In a previous post Massimo corrected the following definition:
SQLField('datum',type='date',requires=[IS_DATE(str(T('%Y-%m-
%d'))),IS_NOT_EMPTY()])
It should be:
SQLField('datum',type='date',requires=IS_DATE(str(T('%Y-%m-
%d'
In this specific case the date field is required, however, I a
Massimo,
> SQLField('datum',type='date',requires=IS_DATE(str(T('%Y-%m-%d'
I changed this.
> The main problem is here:
>
> > fromdate=request.vars.datum
> > todate=IS_DATE()(fromdate)[0]+datetime.timedelta(days=int(request.vars.dage
> > n))
These lines now read like:
fromdate=request.v
This cannot be done out of the box. You need to use ajax to make a
part of page dependent on another part of the same page.
assuming you have form=SQLFORM(db.tourplan), the in your HTML you need
something like
$('#tourplan_city').change(function(){ $.ajax( ) }
and write the code t
You can do this:
query="%s.id>0" % (table)
records=SQLTABLE(db(query).select())
or this:
query=db[table].id>0
records=SQLTABLE(db(query).select())
Notice that in the first case you have quotes so you are writing raw
SQL, hence no db exists (the db connection object is only known to
web2py not
Hi,
I am a python and web2py newbie. Sorry in advance for the dumb question.
I am trying to use the following code
table=request.vars.table # This gives us the table name to query
query="db.%s.id>0" % (table) # this sets up the query
records=SQLTABLE(db(query).select()) # this should get us rec
Hi all
Posted this already - but apparently it did not show - so here we go
again.
I have the following problem (I am a rookie - so forgive me if this is
already explained elsewhere):
db.define_table('country', SQLField('name','string'))
db.define_table('city',
SQLField('country',db.countr
Yes. that is why we do not have it yet. This is the problem to be
solved
On Apr 15, 3:53 am, AchipA wrote:
> Careful with sessions in ram. Your app can go schizophrenic if you
> have, say, multiple wsgi processes. Your user would appear to have one
> session when going to one of the processes, a
yes
SQLField(,label=T("whatever"))
On Apr 15, 3:39 am, CK Ng wrote:
> Is it possible to T.force('en-zh') for SQLFORM label?
>
> def adduser():
> form = SQLFORM(db.user)
> return dict(form=form)
--~--~-~--~~~---~--~~
You received this message because y
This
SQLField('datum',type='date',requires=[IS_DATE(str(T('%Y-%m-
%d'))),IS_NOT_EMPTY()])
should be
SQLField('datum',type='date',requires=IS_DATE(str(T('%Y-%m-%d'
other than that it is fine.
The main problem is here:
> fromdate=request.vars.datum
> todate=IS_DATE()(fromdate)[0]+datetim
I am also not happy with the CGI performance of GAE.
Some interesting numbers:
welcome/default/index:
cold request time: ~1500ms
warm request time: ~150ms (about 1/10 time of a cold request)
a warm process is reaped in just *60 sec* if there is no activity.
If you have a low activity site, w
Denes,
> form_factory already gives you the dropbox using the OptionsWidget.
> Do you want something different?.
No, I would like to use the OptionWidget. I had a look at the
OptionsWidget class in gluon/sqlhtml file, but wasn't able to figure
out how to use it in a function.
form=form_factory
Careful with sessions in ram. Your app can go schizophrenic if you
have, say, multiple wsgi processes. Your user would appear to have one
session when going to one of the processes, and another when ending up
on the other wsgi process. The same caveat exists with cache.ram
With the disk-on-app yo
Is it possible to T.force('en-zh') for SQLFORM label?
def adduser():
form = SQLFORM(db.user)
return dict(form=form)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to th
Massimo,
I had to add:
T.force('en-nl')
to db.py to get the strings translated.
This introduced the following error:
File "/Library/Python/2.5/site-packages/web2pyfitwise/applications/
core/controllers/eventlist.py", line 25, in byplace
todate=IS_DATE()(fromdate)[0]+datetime.timedelta(da
48 matches
Mail list logo