I suspect that what I've got to tell you is not all that useful as I just
wanted to try out web2py and using EC2 was an easy way of doing it. I don't
have any longterm need to run it on EC2.
Like you I didn't really want to get involved in using Apache but I did use
the script you reference ori
Sorry my last attempt at a reply was poorly formatted ... here's another
attempt :
I suspect that what I've got to tell you is not all that useful as I just
wanted to try out web2py and using EC2 was an easy way of doing it. I don't
have any longterm need to run it on EC2.
Like you I didn't re
Thank you Massimo.
On Saturday, December 8, 2012 5:52:28 AM UTC+13, Massimo Di Pierro wrote:
>
> python web2py.py -a passwd -i 0.0.0.0 -p 80
>
> On Friday, 7 December 2012 03:21:55 UTC-6, Richard Shea wrote:
>>
>> I want to start a web2py server so that it can be accessed externally
>> to the host
i get syntax error for the first 'elif', i tried if pass, if pass... but i
wasnt able to escape error, what is wrong?
{{
def populate_row(value):
currency_map={'U':'USD','E':'Euro','P':'Pound'}
if value:
currency = value[-1:].upper()
value = int(value[:-1])
pass
if (value < 0 and currency == 'B')
insert like this:
{{form.insert(0,my_extra_element)}}
return like this:
{{=form[0]}}
if this solve your problem.
--
def populate_row(value):
currency_map={'U':'USD','E':'Euro','P':'Pound'}
if value:
currency = value[-1:].upper()
value = int(value[:-1])
pass
if (value < 0 and currency == 'B'):
return XML('%s'%value)
elif ( value > 0 and currency == 'B'):
retur
>
> It is conceivable that multiple update records on a single entry be done,
> due to complex conditions (e.g. under certain conditions, you update stock
> but not description, etc.)
>
> Since web2py either commits or rollbacks at the end of each request, all
> the works are done then. There
Since upgrading to web2py 2.x from 1.9x.x, (I'm running 2.2.1 stable from
source) auth.impersonate isn't working for me any more. My controller
"user.py" has an impersonate action that calls auth.impersonate (first bold
line below):
@auth.requires_login()
def impersonate():
user_id = int(re
it works, thank you.
--
1.99.7, running from source on Red Hat EL 6
--
I don't quite understand how this works. That's why I am asking a question
if webp2y supports this so-called feature called "Unit of Work", something
that SQLAlchemy supports. It is possible that this concept does not apply
to web2py DAL. I don't know. I have a feeling you are defensive abo
I believe this is fixed in the nightly built.
On Sunday, 9 December 2012 07:44:45 UTC-6, weheh wrote:
>
> Since upgrading to web2py 2.x from 1.9x.x, (I'm running 2.2.1 stable from
> source) auth.impersonate isn't working for me any more. My controller
> "user.py" has an impersonate action that c
This should no longer be a problem in 2.2.x. The spoofed requests should be
rejected.
On Sunday, 9 December 2012 09:15:07 UTC-6, Chris wrote:
>
> 1.99.7, running from source on Red Hat EL 6
--
Hello VP,
niphlod is right. It does not apply to the DAL only to ORMs. Another way to
put it, the DAL does not have it because it is contrary to the
DAL philosophy.
The SQLA docs (http://www.sqlalchemy.org/features.html) say "SQLAlchemy's
Object Relational Mapper (ORM), organizes pending inse
Need email + password only for authentication and authorization. Each user
represents an entity (organization) defined by their unique email +
password combination. A user has no role defined and if there were a
default role defined internally in web2py it would be the same for all
users. Wh
Thanks Richard. We use WinSCP + PuTTy and so your instructions make sense.
It would be good to get confirmation from the moderators as I suspect it
must be a common request these days to access EC2 from a remote Windows or
Mac (as well as not wanting Apache!).
--
I've been investigating the use of the DAL feature
"detect_record_change=True". Apparently it was conceived as a way of
detecting when the record in the database has changed since the form was
originally built and populated. My need is for a way to detect when the
USER has changed fields in
Still not sure what the problem is. Are you saying all users have the same
permissions? If so, then you don't need to bother with roles or permissions
at all -- just verify that the user is logged in in order to control
access. If something in the session is needed to determine access, then you
I'm not advocating for a change, just suggesting that if we're going to
make one anyway, "Sign in" might be preferable.
Anthony
On Saturday, December 8, 2012 10:36:59 PM UTC-5, Massimo Di Pierro wrote:
>
> I like this better than Log In. Yet we would have to change it in a lot of
> places.
>
>
How do I clear the session storage object?
Controller as below. Call setsession and it sets session.temp and shows all
the session variables. If I call clearsession then it shows a page with an
empty storage object as if it had cleared the session object. However if I
then call showsession the
Something like this?
form=SQLFORM(db.table,record_id)
if form.process(dbio=False).accepted:
if any(v!=form.record[k] for k,v in form.vars.iteritems()):
record_has_changed
else:
record_has_NOT_changed
On Sunday, 9 December 2012 10:51:14 UTC-6, Joe Barnhart wrote:
>
>
> I've b
I think you found a bug. This bug was introduced recently as result of
optimization. I will fix it today and it will be gone by the next stable
release.
On Sunday, 9 December 2012 12:22:34 UTC-6, simon wrote:
>
> How do I clear the session storage object?
>
> Controller as below. Call setsession
I have data in an old cobol legacy system using ISAM files two of the files
are customer and sales_history. There is a relationship between these two
files based on customer_id which is auto incremented in the legacy system
by add 1 to the last customer_id used. I already have a python program
I'm trying to setup a server with apache 2.2, wsgi_mod and web2py. So far
it works until I choose in the app wizard the matplotlib pluging. I'm
getting a
No module named
matplotlib.backends.backend_agg
I tried then to run the plugin file direct with the python interpreter
which is working w
Not a problem per se but request for clarification which has been provided
ie. all users have the same permission and so don't need a role to be
defined. Working through the book examples and should be done soon. Thanks!
--
This is something I faced building w2p_tvseries. There is a page with
several tabs and I needed to tell the user to remember to save the changes
before going elsewhere..
What I knew already was that this has to be done client-side: you can't -
yep, some ajax post hooked up to the unload even
did you search on google first ? this is usually an issue with mod_wsgi and
maplotlib. In this group you can find several replies already, including
https://groups.google.com/forum/#!topic/modwsgi/97bnQk9ojtY
On Sunday, December 9, 2012 6:23:28 PM UTC+1, Ralph wrote:
>
> I'm trying to setup a se
Sounds like a good plan. You will still need to
db.define_table(, migrate=False)
The migrate=False to tell web2y the table already exists.
On Sunday, 9 December 2012 12:25:48 UTC-6, len wrote:
>
> I have data in an old cobol legacy system using ISAM files two of the
> files are customer a
Also, if you specify auth.settings.everybody_group_id='[a group name]', a
role with that name will be created, and everyone will be assigned to it by
default. That way, you can use the auth.requires_membership() decorator and
specify that role, even if you want to allow access to everyone with a
This is now fixed in trunk and nightly. Thanks for reporting this nasty
problem.
Massimo
On Sunday, 9 December 2012 12:43:14 UTC-6, Massimo Di Pierro wrote:
>
> I think you found a bug. This bug was introduced recently as result of
> optimization. I will fix it today and it will be gone by the
Hello guys, I'm trying to add a button to a form and when clicked, I'd like
for an action to be called that erases a record from the db.
I saw the butting addition can be done with form.add_button('Delete
Record', URL('other_page'))
However, I am wondering how I can tie in an action instead of
Sometimes the changes in the code of a module (in the modules directory)
are not working when requesting the url that uses these modules. in the
modules directory I have a subdirectory with python files that form a
package (__init__.py file in this subdirectory). I have added
from gluon.custom
The uploads seem to be working now, but I still can't figure out how to
display them.
I have a line in my controller that gets the images in the database:
images = [row.t_Image for row in db().select(db.tutor.ALL)]
which I can access in the view with {{=images}}
Buthow do i get those images
WOHO!!! I GOT IT!!!
I needed to put URL('download', args=images[0])
I was spending time trying to figure out what the heck that
request.args[-1]thing was. Is that even necessary?
On Wednesday, December 5, 2012 2:06:57 PM UTC, Daniele wrote:
>
> Guys I know this sounds simple but I'm h
This has come up before.
from gluon.custom_import import track_changes; track_changes()
must be a model file, before the modules are imported, not in the modules
themselves which are otherwise cached and therefore the line may or may not
be executed.
Massimo
On Sunday, 9 December 2012 15:34:0
Is there a way to add a private function that isn't exposed/accessible via
URL to a controller?
I imagine there is a way to do this with routes, and I know it can be done
with modules; however, I have only a single, short method that is repeated
in multiple actions in the same controller and do
There are three ways:
- function takes arguments
- function name is prefixed by __
- there is a space between the function name and (). (*)
I do not like (*) very much and I cannot really promise will stay in the
future since it is not documented.
Massimo
On Sunday, 9 December 2012 14:51:52 UT
Hi,
I "converted" the problematic row ( row = db(db.assets.asset_id ==
form.vars.id).update(asset_name = form.request_vars.asset_name_2) ) into
normal SQL and used it on the database directly, works fine.
I made a static version of the same row ( row = db(db.assets.asset_id ==
273).update(ass
For update forms I used the following strategy (maybe hackish but it does
its dirty work)
The submit button is disabled at start.
I added (by the controller) to each form control:
- an attribute "initval" containing the stored value
- an attribute "isdirty" with default = "false"
- an event "on
look is this
http://ovidiomfalcao.wordpress.com/2011/10/24/web2py-ja-roda-em-python3-web2py-py3k/
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net.br
ITJP - itjp.net.br
83 8826 9088
Hi,
I've made a customised login form that gets displayed in the sidebar like
so:
def mini_login(form):
for lbl in form.elements("label"):
lbl["_style"] = "display:none"
form.element(_name="email")["_placeholder"] = "Email Address"
form.element(_name="email")["_class"] = "btn
> I was spending time trying to figure out what the heck that
> request.args[-1] thing was. Is that even necessary?
>
request.args[-1] simply refers to the last arg in the URL (which in this
case is the only arg).
Anthony
--
Wow, I wish I could mark all of you as "best answer."
Massimo -- I was thinking at lunch and wondered if I can calculate the same
hash function on the form vars in the browser. I suppose I could at least
create a server callback that takes the form.vars and uses the same hashing
function to cr
I tried running nightly build, but web2py wouldn't start:
Traceback (most recent call last):
File
"N:\eclipse\plugins\org.python.pydev.debug_2.4.0.2012020116\pysrc\pydevd.py",
line 3, in
import pydev_imports
File
"N:\eclipse\plugins\org.python.pydev.debug_2.4.0.2012020116\pysrc\pydev_i
could this be a part of w2p.
http://sqlrelay.sourceforge.net/documentation.html
--
45 matches
Mail list logo