Yes, you can by adding errors to form.errors or simply setting form.errors
= True.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this
Hi Guys,
I am using a list:string to store a list of lists. Each seperate list has 4
values, qty (int), name (string), description (text) and price(double).
Stores nicely and looks fine in the db table eg.
[1, 'OS 7030', 'OS 7030', 755.0], [3, 'SMT 24 Btn', 'SMT IP Phone', 360.0],
[1, 'SMT
This worked for me:
Model:
db.define_table('products',
Field('id_crm', 'integer'),
Field('code'),
Field('description', 'text'),
Field('price_list', 'decimal(10,5)'),
Field('special_offer', 'boolean'),
)
Controller:
def from_csv():
form = SQLFORM.factory(
Shame on me.
I've wrote cvstxt instead of csvtxt... Anyway you've teach me some tricks,
thanks a lot.
Il giorno domenica 5 ottobre 2014 12:41:24 UTC+2, Leonel Câmara ha scritto:
This worked for me:
Model:
db.define_table('products',
Field('id_crm', 'integer'),
Field('code'),
Or do a redirect.
On Sunday, October 5, 2014 5:46:33 AM UTC-4, Leonel Câmara wrote:
Yes, you can by adding errors to form.errors or simply setting form.errors
= True.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
Can you show your code? If you want to store a Python structure, you're
probably better off using a json field type, which will automatically
serialize back and forth between Python and JSON (the list:string type is
meant for storing a list of strings, not a list of Python lists).
Anthony
On
I have a simple controller method where I insert a record in mes table and
return the id of inserted record as given below:
return db.mes.insert(me=metext,locale=localeid)
However it return incorrect id. When I check the id of the record through
MySQL workbench it shows some number greater
Just migrated code from an older version web2py app to the latest code
structure (js, css, etc.). The Multiple select box does not show up in the
form. I get a disabled dropdown button.
The same old app (without js, css updates) works totally fine on the 2.9.11
version. I think this has to do
app reproducing the issue would definitely help investigating what's going
on
On Sunday, October 5, 2014 9:01:30 PM UTC+2, DJ wrote:
Just migrated code from an older version web2py app to the latest code
structure (js, css, etc.). The Multiple select box does not show up in the
form. I
the id returned by DAL is the one mysql sends back as last_insert_id(). Do
you have an autoincrement field there ? the only explanation of a wrong id
could be that.
On Sunday, October 5, 2014 8:56:41 PM UTC+2, Gliese 581 g wrote:
I have a simple controller method where I insert a record in
One of my servers uses Ubuntu 13.04. Today I have changed to Ubuntu 14.04
and now it is not possible to access the webpage.
There is a lot of discussions about this topic in the net and I tried to
follow these hints.
-
Yes I have auto increment field and I have done manual insertions and deletions
in it. But insert should return latest id irrespective of what I do to the
table.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Please let me know what I have to do to get the id of inserted record.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because
Simple debug to do what web2py does.
print the statement
print db.mes._insert(me=metext,locale=localeid)
execute it in workbench and then do a select last_insert_id(). what does
workbench return ?
On Sunday, October 5, 2014 10:42:49 PM UTC+2, Gliese 581 g wrote:
Please let me
What exactly happens when you try to access your pages? Are you getting
404 responses or something else? Besides checking the apache error logs
take a quick look at the access logs to make sure there isn't a bad rewrite
rule causing you headaches - I seem to remember that's how I tasked down
When updating web2py, you should always update the JS (and the appadmin
controller and view), but only update the CSS if your HTML (and formstyles)
are designed to go with it. If your app's layout is based on the
scaffolding app, you have to be careful about updating the CSS without
changing
Ahh Anthony what would we do without you... tyvm... (again)
a few quick changes to code and works a charm...
Cheers
Greg
On Monday, 6 October 2014 00:48:09 UTC+10, Anthony wrote:
Can you show your code? If you want to store a Python structure, you're
probably better off using a json field
I have a geolocalisation application with 2 tables of interest i.e.
db.define_table('device', notnull=True, ...)
db.define_table('wp', 'device', type=reference device, notnull=True, ...)
The 'device' table may have several hundreds entries, while the 'wp' table
holding GPS-coordinates may have
Solved.
Thank you, Brian - you showed me the right way.
The error message was ERR_CONNECTION_TIMED_OUT, but the browser shows only
a message like page could be loaded (in German).
Two things happend:
- The new apache default.conf rewrites anything to https
- In consequence of the
19 matches
Mail list logo