I am using the web2py binary distribution on Windows as my development
environment. I want to ship my application (myapp) with numpy inside so
that the deployment environment does not need to have it installed.
According to the discussion linked below, I should put the numpy folder
inside the
I need to validate extension of documents being uploaded in my app: doc,
pdf, odt, ... .
Image upload has its IS_IMAGE validator, which takes "extensions" argument,
so list of accepted extensions can be provided.
The only validator I see for non-image uploads is IS_UPLOAD_FILENAME, which
takes
This should work: replace navbar section in layout.html with
{{=response.flash or ''}}
{{is_mobile=request.user_agent().is_mobile}}
{{=response.logo or ''}}
{{='auth' in globals() and
auth.na
That's pretty much what it does.
-Jim
On Friday, June 28, 2013 2:19:35 PM UTC-5, greenpoise wrote:
>
> Can more than one table be linked? sort of in like a stairs/hierarchy.
>
> Parent
> -->child
> -->childofchild
>
>
>
>
--
---
You received this message because you are subs
Can more than one table be linked? sort of in like a stairs/hierarchy.
Parent
-->child
-->childofchild
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, s
sure. first of all, all callbacks accepts some parameters.
the ondelete takes the table and the id of the deleted row.
If you instead want to play with request.args and vars, a delete request
looks like
/app/controller/function/delete/table_name/id
so the id of the deleted record is the last arg
http://www.realpython.com/blog/python/web2py-migrating-from-sqlite-to-mysql/
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroup
I have an SQLFORM.grid w/ an ondelete calling a function customer_delete().
However, the the function is not being called and the records are not
actually being deleted from the DB. If I remove the
"ondelete=customer_delete" in my grid args, the records are being deleted.
The way I understand i
Once again, thank you
No dia Sexta-feira, 28 de Junho de 2013, Tom Russelltom@caregointl.comescreveu:
> Actually probably just comment out the line:
>
> fs3=form[0][-1] # submit row (last)
>
> and that I think will put the submit outside the fieldset.
>
>
> On Fri, Jun 28, 2013 at 2:50 AM, An
Anthony,
Thanks.
On Friday, June 28, 2013 1:49:12 PM UTC-4, Anthony wrote:
>
> I suppose use either an onaccept callback with the SQLFORM, or set up
> _after_insert and _after_update callbacks on the db.item_batch table (those
> will run any time db.item_batch is changed, even if not via a form
I suppose use either an onaccept callback with the SQLFORM, or set up
_after_insert and _after_update callbacks on the db.item_batch table (those
will run any time db.item_batch is changed, even if not via a form).
Anthony
On Friday, June 28, 2013 1:41:05 PM UTC-4, Cliff Kachinske wrote:
>
> I
>
> record = db.patient(request.args(0))
db.appointment.patient.default = record
>
Above "record" is a row object, but db.appointment.patient is a reference
field, which simply stores the integer ID of the record it references. So,
that second line should just be:
db.appointment.p
I could be wrong and am still new here but maybe SQLFORM.Factory? Thats
what I use on a form that has 2 tables.
On Fri, Jun 28, 2013 at 1:41 PM, Cliff Kachinske wrote:
> I have two tables something like this:
>
> db.define_table('item',
> Field('name'),
> Field('on_hand', integer),
> )
>
>
I have two tables something like this:
db.define_table('item',
Field('name'),
Field('on_hand', integer),
)
db.define_table('item_batch',
Field('item', 'reference db.item' ...),
Field('batch_yield', integer),
)
Every time I insert a item_batch record, I increment the on_hand field of
the
Nice, I will check that out.
On Fri, Jun 28, 2013 at 1:37 PM, Anthony wrote:
> Yea thanks I tried that as well with no luck.
>
>
> Then you're doing something else wrong. It might help if you show all of
> the code. If you have a model file that does:
>
> db = DAL(...)
> ...
> auth = Auth(db)
>
Well whatever the case was it did give me some errors, cant remember which
now but I tried a few things to no avail.
I know its always this way starting out, been around the block a few times
already :)
On Fri, Jun 28, 2013 at 1:34 PM, LightDot wrote:
> On Friday, June 28, 2013 6:59:19 PM UTC+
I have a smartgrid with a link in it like this:
links = [lambda row: A(T('Create Appointment'),_href=URL("default",
"appointment_create",args=[row.id]))]
And I pass that to this function:
@auth.requires_login()
def appointment_create():
record = db.patient(request.args(0))
db.appointment
>
> Yea thanks I tried that as well with no luck.
Then you're doing something else wrong. It might help if you show all of
the code. If you have a model file that does:
db = DAL(...)
...
auth = Auth(db)
auth.define_tables()
The db.auth_user will be available in any subsequent model as well as
On Friday, June 28, 2013 6:59:19 PM UTC+2, Tom Russell wrote:
>
> Yea thanks I tried that as well with no luck.
>
That's impossible. But never mind, hang in there, after you finish your
first project, you'll be remembering this beginnings with a smile.
> I ended up just creating a new db_wizar
Yea thanks I tried that as well with no luck. I ended up just creating a
new db_wizard.py in my model and this set up works great now. Its mentioned
in the book but thats it, just mentioned. For new users there should be a
guide to setting all of this up correctly. Maybe there is? I could write
som
Well, you have:
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
defined, then you initiate auth with:
auth.define_tables(username=True, signature=True)
which sets up auth tables etc. in the above database. But then you override
the previously set db with:
db = DAL('sqli
I am confused about how I have my db.py set up for tables etc.
At the top I have what is generated for me:
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
else:
Actually probably just comment out the line:
fs3=form[0][-1] # submit row (last)
and that I think will put the submit outside the fieldset.
On Fri, Jun 28, 2013 at 2:50 AM, António Ramos wrote:
> I dont understand how that gets the submit button out of the last fieldset
>
>
> 2013/6/28 T
Massimo,
>From here on, when someone looks to see what technologies are behind any
given project, it will identify web2py as a framework and reports it in
use. (it is on demand) The exact markers they use to identify web2py was
not disclosed but I will shot Gary an email if that is of importanc
Export file from the two linked tables
Here is the example of DB Schema
def get_name(c):
row = db(db.child.id == c).select(db.child.name).first()
return row.name
*Child Table*
* *
db.define_table('child',
Field('name')
)
*P
I tried what you suggested, but it gave the same error. :(
On Tuesday, June 25, 2013 8:24:48 PM UTC+5:30, dhmorgan wrote:
>
> you're welcome; I'd been wanting to run through the tutorial,
>
> yes,within test_static_pages.py (though I guess you've probably tried it
> by now) it will work that wa
Vey interesting. I have no explanation the compilation is just caching pyc
files.
On Friday, 28 June 2013 07:49:47 UTC-5, David Marko wrote:
>
> I just tested my web2py installation using Apache Benchmark and found
> strange thing. When I benchmarked common examples app, that is available in
>
I just tested my web2py installation using Apache Benchmark and found
strange thing. When I benchmarked common examples app, that is available in
web2py core (this url: /examples/simple_examples/hello5 ) I found that
compiled app gives me around 100 req/sec but uncompiled 155 req/sec which
is
@paolo: You can't mix & match python with SQL and expect consistent results.
@massimo: there's a problem: they'll never be consistent among databases.
Some db return timerange, some number of days, some number of seconds, when
you subtract two dates without involving functions. that's one of the
Hi Massimo, can you point out how to write query with date diff?
I tried this:
db(diff_date > timedelta(days=4)).select()
and I got the same ticket, I don't know if this is there right way for
expressing query with date_diff.
Paolo
On Friday, June 28, 2013 12:41:13 PM UTC+2, Massimo Di Pierro w
As far as i remember, it worked fine.
That was one year ago.
>
>>
>> Ashraf
>>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googl
Perfect! Thanks.
On Thursday, June 27, 2013 4:43:07 PM UTC-4, Niphlod wrote:
>
> tables list = db.tables
> field list for table 'a_table' = db.a_table.fields
>
>
>
> On Thursday, June 27, 2013 10:30:24 PM UTC+2, Woody wrote:
>>
>> I hope the answer to this is something that's not too obvious, but
Please open a ticket about this. Expressions like date_diff were designed
to be in the query, not in the list of selected columns. I think this can
be done but need to check what breaks.
On Friday, 28 June 2013 03:02:06 UTC-5, Paolo valleri wrote:
>
> Dear all,
> I am trying to run simple mathe
I do not understand this.
On Monday, 19 March 2012 16:11:33 UTC-5, webpypy wrote:
>
> Hi,
>
> Pls, upgrade eCardsonMap to V3
>
> Regards,
>
> Ashraf
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and sto
@testers, please upgrade to trunk. A few changes went in that needs to be
tested as well.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr.
are you aware that web2py handles timezones automatically if set to do so ?
If you want to leverage mysql own function, you have to write raw queries
for that.
On Friday, June 28, 2013 11:35:03 AM UTC+2, Stelios Koroneos wrote:
>
> Greetings.
>
> I am saving all time related references in UTC ti
Greetings.
I am saving all time related references in UTC timezone and want to convert
them to the user's timezone when the request to display them comes.
Mysql offers the convert_tz which can handle this pretty much
'automagically' during the query.
Is there a way to use convert_tz from a 'stan
Yes, the word ACROSS clarifies it.
Besides, i've got another problem escaping SQL.
I want to add this to the SQL sentence:
WHERE b.type LIKE 'L''%'
E.g. all types beggining with an L and following with an apostrophe.
I've escaped the apostrophe writing it twice, but if filter is user input i
Dear all,
I am trying to run simple mathematical operations with datetime and
postgres as backend
(http://www.postgresql.org/docs/9.0/static/functions-datetime.html)
I've prepared this simple example code:
from datetime import timedelta
db.define_table('test_sum',
Field('first_int', 'integer'),
39 matches
Mail list logo