This works for me:
db.define_table('image',
Field('name'),
Field('file', 'upload'))
def index():
image = db(db.image.id==request.args(0)).select().first()
form = SQLFORM(db.image, image, upload=URL('download'))
if form.process().accepted:
response.flash = 'image
Or you can just put regular ole script tags in your layout.html.
When a field in a table of models has a datetime as below,
db.define_table('tablename', ..., Field('time', 'datetime') )
I want to use the time value to query latest update of entries. So I
figured that below might achieve the purpose:
db.((db.tablename.account== id) (db.tablename.time
I figured out what the problem was but forgot to come back to the
forum.
The problem was that the keys of the dictionary was encoded as
unicode, for example u'keyname'. It was in unicode because the dict is
loaded from json. Specify their encoding as UTF-8 with following
routine, solved the
I have a clean install of web2py on webfaction and when I log in the
admin area:
1. I keep on having to re-enter my password on nearly every second
screen change
2. I am unable to save any files... any attempt at saving a file
results in a connection error
I can, of course change it via
Using Database in the cloud with google spreadsheets makes it easy
On 30 sep, 18:34, Richard Vézina ml.richard.vez...@gmail.com wrote:
Yes. OrientDB is totally written in Java and can run in any platform without
configuration and installation. The full Server distribution is about 1Mb
without
hi,
I am interested to know if there is anyone using jython with web2py in
production
- on top of what server
- with what database
- what is the memory consumption
- what is the performance
thank you
There is one more issue.
In normal case, (without overriding the click event), I could supply
request.args to controller function through URL('controller',
args[n1,n2,..]).
In this case, since the click event is handled (overridden) by $
(#anchorname).dialog({...,
how do I supply args to the
Good point. response.files is particularly useful if you only need to
include some JS (or CSS) files conditionally (i.e., only for particular
actions or when particular widgets are available on the page).
On Saturday, October 1, 2011 2:25:31 AM UTC-4, pbreit wrote:
Or you can just put regular
Look for permissions and change it to the apache/nginx user.
$chown -R user:user web2py/*
Also create the deposit file in web2py root folder if not exists.
And run web2py once from shell.
Search for webfaction on this group there is another threads about.
http://zerp.ly/rochacbruno
Em
T3 is dead. The replacement is cube2py (welcome + plugin_wiki)
http://code.google.com/p/cube2py/
On Oct 1, 12:24 am, dlypka dly...@gmail.com wrote:
T3 can do that.
On Sep 30, 9:09 pm, Bruno Rocha rochacbr...@gmail.com wrote:
On Fri, Sep 30, 2011 at 7:35 PM, Anthony abasta...@gmail.com
Hi,
I'm using the Welcome app (without any changes) and latest web2py trunk, and
I'm having the same problem with pbreit code too.
This problem shows after a submit where the image has been changed, and it
shows (immediately after the submit) that the image in the form (and even
the image
On Sep 30, 8:39 pm, Anthony abasta...@gmail.com wrote:
On Friday, September 30, 2011 3:48:53 PM UTC-4, DenesL wrote:
...requires=[IS_IN_SET(...), IS_NOT_EMPTY(), ...]
Are you saying that the above currently works but simply suppresses the
widget?
Well... it actually works! in theory it
Hi,
Is it possible to define different auth page for the same application ? I
mean having an auth page for regular user and another one for special
user.
I tried by adding a user function in a specific controller and added a
user.html for that controller but whenever an authentication is
Any Idea? Please.
On Sep 28, 2011, at 8:13 PM, Farsheed Ashouri wrote:
Hi everyone, I have a blog system and I need a pages like:
mysite.com/myappName/pages/blog?u=user1
map to something like this:
user1.mysite.com
I've read many posts here, the book and other resources i idea how this
regexpr thing
I have two tables (db.A and db.B) and db.B has a field that links to db.A
(in db.B model: Field('link', 'db.A')). How do I select rows from db.A that
do *not* have a corresponding db.B.link field?
I've tried to solve this from several angles and so far have had no luck. I
suspect I'm missing
db(~db.sometable.id.belongs(db.othertable.select(db.othertable.id))
The tilde means 'not'
On Oct 1, 4:16 pm, monotasker scotti...@gmail.com wrote:
I have two tables (db.A and db.B) and db.B has a field that links to db.A
(in db.B model: Field('link', 'db.A')). How do I select rows from db.A
I think i have no problem with DNS. cause i put a * value in subdomain
setting of DNS and now i have access to any sub-domain i want.
So you say there is no way to solve this in routes.py?
Fantastic. Thanks.
Ian
I think this works:
db(db.b.link==None).select(db.a.ALL, db.b.ALL,
left=db.b.on(db.a.id==db.b.link))
Until you figure out how to do it in routes.py, how about:
if request.vars.u:
redirect('%s.mysite.com' % request.vars.u)
On Oct 1, 2011, at 2:13 PM, Farsheed Ashouri wrote:
I think i have no problem with DNS. cause i put a * value in subdomain
setting of DNS and now i have access to any sub-domain i want.
So you say there is no way to solve this in routes.py?
With the regex mode, perhaps.
Can you branch in the user() function?
def user():
if request.function=='login' and user_is_special:
redirect('special_login')
Or it might be easier to do it in the view:
{{if user_is_special:}}
{{=form.custom.begin}}
...
{{=form.custom.end}}
{{else}}
{{=form}}
On Oct 1, 2011, at 3:13 PM, Jonathan Lundell wrote:
On Oct 1, 2011, at 2:13 PM, Farsheed Ashouri wrote:
I think i have no problem with DNS. cause i put a * value in subdomain
setting of DNS and now i have access to any sub-domain i want.
So you say there is no way to solve this in
Hmmmthat sounds like a caching problem and I'm not exactly sure what to
suggest.
Maybe add a redirect:
if form.process().accepted:
session.flash = 'image saved'
redirect('index', args=request.args(0))
I followed the web2py 3.1 Ed. book chapter for installation on Windows
(VISTA Enterprise in my case).
web2py and Apache 2.2 now work independently.
web2py still just working in its own Rocket server.
I made all the changes to C:\Program Files\Apache Software Foundation
\Apache2.2\conf\httpd.conf
I got a similar issue just right now and contacted the fluxflex
service. Was your problem resolved meanwhile?
Regards,
Jan
On 14 Sep., 07:20, Martin Weissenboeck mweis...@gmail.com wrote:
Hi,
has somebody tried the private mode of fluxflex? I have done it two times
with crazy results:
Some
Update:
https://138.85.50.99/welcome/default/index works!
http://138.85.50.99:8080 works! (Apache index.html)
http://138.85.50.99:8080/welcome/default/index does not work. What is
the problem?
On Oct 1, 5:27 pm, dlypka dly...@gmail.com wrote:
I followed the web2py 3.1 Ed. book chapter for
Hi,
It's not a caching problem, I've tested it on Firefox, Chrome, IE, Safari
and Opera, all with the same result.
Can any of you please try to reproduce this problem?.
Regards,
Carlos
For quite some time, I've been running nested web2py installations,
administrating various web2py from a top install folder, as a personal
control panel, and meanwhile , static subfolders containing several
web2py installations, with difrerent versions, and tests.
But since the change of hosting,
Thanks for the info. It seems to be a permission issue to me too.
I do have a deposit file and I have run web2py from the command line. So I
guess that leaves the file permissions,
How can I determine the user? I am using uwsgi. Does that mean that uwsgi
is the user of the process, since
OK, I did change the permissions to my user name and unfortunately still
unable to save edited files. I get a connection error as the message.
Secondly, I still need re-enter my password very often although from my
perspective I am still in the same session.
This must be a simple thing I am
I've had a few similar, strange errors with web2py on Fluxflex. One project
was stuck in initializing for four days. I contacted their support but
never heard back. I ended up just having to re-deploy web2py from scratch. I
also had runaway usage (and hit my quota in 10 minutes) the first time
Sure enough, I just pushed changes to the fluxflex server and checked my
site--got a 500 server error. I couldn't access anything on my project even
though git was saying the push went through fine. I re-installed web2py from
scratch and re-pushed the app and it's working again now. But the
To solve my problem the I could not get NON https to work in web2py
with Apache 2.2 On Windows VISTA Enterprise:
In httpd.conf, I had to add another Virtual Host entry, copied
mostly from the given :443 entry, but for port 8080:
NameVirtualHost *:8080
VirtualHost *:8080
:
:
I had to use port
On 10/02/2011 12:21 AM, pbreit wrote:
Can you branch in the user() function?
def user():
if request.function=='login' and user_is_special:
redirect('special_login')
Or it might be easier to do it in the view:
{{if user_is_special:}}
{{=form.custom.begin}}
...
I'm new to python and web2py. I'm studying the official web2py book.
In Chapter 8, there is a reference to PGP mail using the gpgme
module...
-
It is possible to send PGP encrypted emails using the following
settings:
1. from gpgme import pgp
2. mail.settings.cipher_type = 'gpg'
3.
It seemed to be working but when I just re-created it again it wasn't. But
now that I think about it, I'm not sure it should without a proper refresh
or some more help from JavaScript.
if form.process().accepted:
session.flash = 'image saved'
redirect(URL('imagetest',
What do you mean pbreit?, as far as I know, it should work without the need
of a redirect, the same way the other field types work, thanks.
I'm just not sure if it does. I'm sure there is a way. But images are a lot
different from text.
How do you know if a user that has not yet logged is special or not?
Can you provide an example?
On Oct 1, 1:22 pm, julie.bouil...@yedia.com
julie.bouil...@yedia.com wrote:
Hi,
Is it possible to define different auth page for the same application ? I
mean having an auth page for regular user
Have you looked in apache2/nginx redirect engine?
On 2 окт, 05:23, Jonathan Lundell jlund...@pobox.com wrote:
On Oct 1, 2011, at 3:13 PM, Jonathan Lundell wrote:
On Oct 1, 2011, at 2:13 PM, Farsheed Ashouri wrote:
I think i have no problem with DNS. cause i put a * value in subdomain
43 matches
Mail list logo