[web2py] Replace all forms to use the HTML5 `placeholder` rather than `label`?

2013-03-13 Thread Alec Taylor
How do I replace all forms to use the HTML5 `placeholder` rather than `label`? Here is how I currently do it: def signup_form_function(): signup_form = SQLFORM(db.auth_user) for label in signup_form.elements('label'): label["_style"] = "display:none;" placeholders = {

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Issues created: http://code.google.com/p/web2py/issues/detail?id=1390&sort=-id Am Donnerstag, 14. März 2013 00:10:16 UTC+1 schrieb Niphlod: > > can you please open an issue about this so it gets tracked ? > > On Wednesday, March 13, 2013 9:39:21 PM UTC+1, Derek wrote: >> >> As far as compatibili

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim S
Just re-read my post and saw that it says they aren't visualized by default. Does that mean there is a way to get them to be displayed? -Jim On Wednesday, March 13, 2013 8:42:33 PM UTC-5, Jim S wrote: > > ...but you can't use them in .grid and .smartgrid. > > from the book... > > Mind that virt

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim S
...but you can't use them in .grid and .smartgrid. from the book... Mind that virtual fields do not have the same attributes as the other fields (default, readable, requires, etc) and they do not appear in the list of db.table.fields and are not visualized by default in tables (TABLE) and grid

[web2py] Automated IP logging?

2013-03-13 Thread Lamps902
Is there an automated way to log the IPs associated with the initiatialization and clearing of each session (i.e. when a user logs in/logs out), or does this have to be accomplished manually through the use of request.client and some auth.settings variable (i.e. auth.settings.login_onaccept)? I

[web2py] Re: SQLFORM.grid with default field values from parent SQLFORM and TOTAL for a column

2013-03-13 Thread Jim S
If you are in 'edit' mode in your SQLFORM.grid, set the default value for that field equal to the value for your order. if request.args(0) == 'edit': db.order_items.order_id.default = request.args(2) Place this BEFORE your grid = SQLFORM.grid(...) -- not tested -- -Jim On Wednesday, March

[web2py] Re: enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Lamps902
Thanks, Niphlod! Will give it a go. -Lamps On Wednesday, March 13, 2013 6:12:41 PM UTC-5, Niphlod wrote: > > use callbacks it's not automatic as the archive functionality (that > basically sets "smarts" callbacks for you) but it's definitely > accomplishable. > > http://web2py.com/books/def

Re: [web2py] Re: SQLFORM.grid in LOADed component Delete behavior

2013-03-13 Thread Jim Steil
That's what I was hoping to avoid, but probably the only way it is going to work. Thanks for taking a look. -Jim On Wed, Mar 13, 2013 at 6:15 PM, Niphlod wrote: > I'd say that if you want a full reload after deleting the record you > should disable the default delete and code your own (with

[web2py] Passing parameters to web2py using apache/mod_wsgi

2013-03-13 Thread Julien Courteau
How to pass command line parameters to web2py (such as -K) when using apache and mod_wsgi. -- --- 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+unsubsc

[web2py] Re: SQLFORM.grid in LOADed component Delete behavior

2013-03-13 Thread Niphlod
I'd say that if you want a full reload after deleting the record you should disable the default delete and code your own (with redirect) using the links argument or intercepting earlier a request.args containing 'delete' . As for the sqlform in the other component, try to decouple and see what

[web2py] Re: enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Niphlod
use callbacks it's not automatic as the archive functionality (that basically sets "smarts" callbacks for you) but it's definitely accomplishable. http://web2py.com/books/default/chapter/29/06#before-and-after-callbacks On Wednesday, March 13, 2013 7:27:16 PM UTC+1, Lamps902 wrote: > > At p

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
can you please open an issue about this so it gets tracked ? On Wednesday, March 13, 2013 9:39:21 PM UTC+1, Derek wrote: > > As far as compatibility issues, sqlite, mysql, and postgres all support > ISO8601 with an optional T. > > On Wednesday, March 13, 2013 1:28:30 PM UTC-7, Marian wrote: >> >>

[web2py] global variables and menu

2013-03-13 Thread pgilbert902
(newbie to both web2py and python - please be gentle) I am trying to use two menu selection items to control a view and I need guidance on the general strategy one should use. Intuitively (to me) this seems like it should be easy, but I have made various attempts, all of which fail in differen

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-13 Thread Anthony
SQLFORM.factory creates a dummy DAL Table object with the fields submitted, so you cannot use duplicate field names, as they are illegal in DAL tables. Note, technically your form can have input elements with the same name, but once the values are submitted to the server, the values will be join

[web2py] Re: smartgrid: how to disable repeating parent ID in child record

2013-03-13 Thread Jeison Dück
Putting this, on controller - db.project_table.description.readable = False - before loading the Smartgrid component, does not work? It worked for me. Regards Jason On Wednesday, March 13, 2013 3:21:18 AM UTC-3, Alex Glaros wrote: > > In smartgrid, is there a way to keep the parent ID from

[web2py] Re: how to automatically get the parent primary key into the child foreign key?

2013-03-13 Thread Derek
The form factory would be the way to do this. You create a form which has both the parent information and the child information. You'd add in your "if form.process().accepted:" this: id = db.parent.insert(**db.parent._filter_fields(form.vars)) that "id" is now the ID of the parent record, which

[web2py] SQLFORM.grid with default field values from parent SQLFORM and TOTAL for a column

2013-03-13 Thread Jeison Dück
Hello, all, I have those 3 models bellow: db.define_table('order', db.Field('customer', db.customer), db.Field('autor', db.auth_user), db.Field('created', 'datetime'), ) db.define_table('product', db.Field('name'), db.Field('value'), format='%(name)s' ) db.define_table('ord

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Derek
You'd add a virtual field for that. http://web2py.com/books/default/chapter/29/06#Virtual-fields On Wednesday, March 13, 2013 2:40:06 PM UTC-7, Alex Glaros wrote: > > can anyone point to any examples where there is a running count of detail > records for each parent? > > Parent_one link_to_c

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Alex Glaros
can anyone point to any examples where there is a running count of detail records for each parent? Parent_one link_to_child 3 records Parent_two link_to_child 0 records Parent_three link_to_chile 10 records this is so that users don't have to click on the Parent_two link to find

Re: [web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim Steil
Glad to hear On Wed, Mar 13, 2013 at 3:59 PM, Alex Glaros wrote: > Yeah, it worked great. > > Thanks Jim, > > Alex > > > On Wednesday, March 13, 2013 1:36:31 PM UTC-7, Jim S wrote: > >> ...and doesn't changing the _plural value of that table change it? It >> should! >> >> >> On Wed, Mar 13, 20

Re: [web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Alex Glaros
Yeah, it worked great. Thanks Jim, Alex On Wednesday, March 13, 2013 1:36:31 PM UTC-7, Jim S wrote: > > ...and doesn't changing the _plural value of that table change it? It > should! > > > On Wed, Mar 13, 2013 at 1:39 PM, Alex Glaros > > wrote: > >> I may be on the wrong topic. Anyway, see

[web2py] Re: MSSQL

2013-03-13 Thread Derek
As far as compatibility issues, sqlite, mysql, and postgres all support ISO8601 with an optional T. On Wednesday, March 13, 2013 1:28:30 PM UTC-7, Marian wrote: > > ISO 8601 format seems to be a better format, at least for mssql. Patching > this maybe can lead to compatibility issues. I don't kn

[web2py] Re: MSSQL

2013-03-13 Thread Derek
Ok, this page may explain what's going on... http://msdn.microsoft.com/en-us/library/ms180878(v=sql.100).aspx For ANSI SQL date format, it IS DATEFORMAT dependent (we're using a datetime not datetime2) and for 8601 it is NOT DATEFORMAT dependant. MSSQL only recognizes the "T" containing one as

Re: [web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim Steil
...and doesn't changing the _plural value of that table change it? It should! On Wed, Mar 13, 2013 at 1:39 PM, Alex Glaros wrote: > I may be on the wrong topic. Anyway, see attachment. > > > On Wednesday, March 13, 2013 9:57:43 AM UTC-7, Jim S wrote: > >> I'm having trouble seeing the differe

[web2py] Re: MSSQL

2013-03-13 Thread Marian
ISO 8601 format seems to be a better format, at least for mssql. Patching this maybe can lead to compatibility issues. I don't know. :( -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emai

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-13 Thread Ricardo Pedroso
On Wed, Mar 13, 2013 at 7:31 PM, Richard wrote: > Hello, > > I would like to build a bunch insert form and I wouldn't have to duplicate > fields definition for SQLFORM.factory > > I try naively > > > inputs = [] > for i in range(0,10): > inputs.append(db.table1.field1) > i

[web2py] Re: MSSQL

2013-03-13 Thread Derek
I don't see any reason why the base adapter can't use the ISO 8601 format with a 'T' in it. On Wednesday, March 13, 2013 1:08:23 PM UTC-7, Marian wrote: > > This seems to be ANSI SQL format, which seems to be not language neutral > > http://www.karaszi.com/sqlserver/info_datetime.asp > > -- -

[web2py] Re: MSSQL

2013-03-13 Thread Marian
This seems to be ANSI SQL format, which seems to be not language neutral http://www.karaszi.com/sqlserver/info_datetime.asp -- --- 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,

[web2py] Re: MSSQL

2013-03-13 Thread Marian
The query is something like this: '2013-03-13 20:59:25' -- --- 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...@googlegroups.com. For more optio

[web2py] CISPA is back - big problem

2013-03-13 Thread Cliff Kachinske
This week the US Congress is holding hearings on CISPA. This bill is even worse than SOPA and PIPA. If you are a US citizen, you can help by helping the EFF. Just follow this link: https://www.eff.org/deeplinks/2013/03/34-civil-liberties-groups-speak-out-against-cispa-lead-hearings Thank you,

[web2py] Re: MSSQL

2013-03-13 Thread Derek
Do a trace and see what's actually being passed into that query. On Wednesday, March 13, 2013 12:45:35 PM UTC-7, Marian wrote: > > import pyodbc > import datetime > > cnxn = pyodbc.connect('DRIVER={SQL Server Native Client > 10.0};SERVER=barney;DATABASE=imagecontest_dev;UID=imagecontest2013;PWD=i

[web2py] Re: MSSQL

2013-03-13 Thread Marian
import pyodbc import datetime cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=barney;DATABASE=imagecontest_dev;UID=imagecontest2013;PWD=imagecontest2013' ) cursor = cnxn.cursor() now = datetime.datetime(2013, 3, 13, 16, 46, 4, 117000).isoformat()[:19]. replace('T',' ') cu

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Ok that was a good hind. working directly with pyodbc: Working: now = datetime.datetime(2013, 3, 12, 16, 46, 4, 117000).isoformat()[:19].replace('T',' ') Not working: now = datetime.datetime(2013, 3, 13, 16, 46, 4, 117000).isoformat()[:19].replace('T',' ') -- --- You received this message b

[web2py] Re: MSSQL

2013-03-13 Thread Derek
Looks like line 1447 in DAL.py is to blame. if isinstance(obj, datetime.datetime): obj = obj.isoformat()[:19].replace('T',' ') should be: obj = obj.isoformat()[:19] That will preserve the 'T' If you don't need the 'T' (hey, why strip it if it works?) You should do th

[web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-13 Thread Richard
Hello, I would like to build a bunch insert form and I wouldn't have to duplicate fields definition for SQLFORM.factory I try naively inputs = [] for i in range(0,10): inputs.append(db.table1.field1) inputs.append(db.table1.field2) form = SQLFORM.factory(*inputs)

[web2py] Re: MSSQL

2013-03-13 Thread Derek
It probably worked yesterday because yesterday was 3-12 which could be interpreted as December 3rd or March 12th. 3-13 can only be interpreted as march 2013, so perhaps it was reading the date incorrectly? On Wednesday, March 13, 2013 9:16:26 AM UTC-7, Marian wrote: > > Yes this fails, this is r

[web2py] enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Lamps902
At present, auth._enable_record_versioning and db.table._enable_record_versioning update a record every time something is modified or deleted (including the flipping of the *is_active* field). Is there a way to use the functionality provided by these functions to update an archive only upon del

[web2py] SQLFORM.grid in LOADed component Delete behavior

2013-03-13 Thread Jim S
Hi I have a LOADed component that has a SQLFORM.grid in it. The definition looks like this: grid = SQLFORM.grid(updateQuery, fields=[db.tankSite.name], left=left, create=False, editable=False, details=False, maxtextlength=45, orderby=[db.tankSite.name], csv=False, searchable=False, showbuttonte

[web2py] Re: MSSQL

2013-03-13 Thread Marian
I did a patch in the MSSQLAdapter.represent function. This is the only format working for me. But it is obviously not a good way to implement an own dateformat. elif fieldtype == 'datetime': if isinstance(obj, datetime.datetime): obj = obj.isoformat()[:19]

Re: [web2py] Re: SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Jim S
I think I've gotten to the bottom of my problem. I was using a custom form to display the form created in my controller. And yes, there are numerous forms on this page. And, this form is in a LOADed component using AJAX. If I use this for the custom form definition: {{=form.custom.begi

Re: [web2py] Re: SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Anthony
The main reason for setting your own formname is if you have more than one form on the same page that would otherwise be assigned the same default name by SQLFORM. Anthony On Wednesday, March 13, 2013 12:15:55 PM UTC-4, Niphlod wrote: > > nope. formname "overrides" the hidden field value _formn

[web2py] Re: problem: loading bs4 (beautifulsoup4) package is successfull only if I try it twice

2013-03-13 Thread Mirek Zvolský
Ticket is here: https://code.google.com/p/web2py/issues/detail?id=1388 -- --- 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...@googlegroups.com.

Re: [web2py] Re: SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Jim Steil
Thanks On Wed, Mar 13, 2013 at 11:15 AM, Niphlod wrote: > nope. formname "overrides" the hidden field value _formname > > > On Wednesday, March 13, 2013 5:11:48 PM UTC+1, Jim S wrote: > >> Thanks Anthony. If I put formname='membership' in the >> form.process().accepted like this: >> >> form.pr

Re: [web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim Steil
I'm having trouble seeing the difference. If you put the change to _plural in your controller then it is always there for that controller. If you want it permanent, put it in your model. Maybe a screen shot would help me better understand. On Wed, Mar 13, 2013 at 11:33 AM, Alex Glaros wrote:

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Alex Glaros
My question isn't related to singular/plural but completely renaming the child table display name so the table name displays as "Click_here" instead of "Child_table_name". Let me know if you need screen shots. On Wednesday, March 13, 2013 9:14:21 AM UTC-7, Jim S wrote: > > I'm pretty sure that

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Yes this fails, this is really strange. As said it worked yesterday and it's not a local database server which I restarted or something like that. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop rec

Re: [web2py] Re: SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Niphlod
nope. formname "overrides" the hidden field value _formname On Wednesday, March 13, 2013 5:11:48 PM UTC+1, Jim S wrote: > > Thanks Anthony. If I put formname='membership' in the > form.process().accepted like this: > > form.process(formname='membership').accepted: > > Then does that refer to the

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim S
I'm pretty sure that is what we've been talking about. I think it uses the _plural value for the child table. If this isn't what you were getting at post some code/screen shots so there isn't any confusion. -Jim On Wednesday, March 13, 2013 10:54:47 AM UTC-5, Alex Glaros wrote: > > In smartgr

Re: [web2py] Re: SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Jim Steil
Thanks Anthony. If I put formname='membership' in the form.process().accepted like this: form.process(formname='membership').accepted: Then does that refer to the _id arg set by SQLFORM.factory(_id='membership')??? -Jim On Wed, Mar 13, 2013 at 10:51 AM, Anthony wrote: > Not sure if this is

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
ok. seems that -MM-DD HH:MM:SS is somewhat unrecognizeable by your databasethis is strange because that representation should be "universally valid". Let's try with a more specific (just to nail it) now = '2013-03-13 16:46:04' and see if the issue is the same On Wednesday, March 13

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Maybe this helps from the web2py error ticket: (self=, table=, fields=[(, 'auth'), (, datetime.datetime(2013, 3, 13, 16, 46, 4, 117000)), (, '192.168.77.4'), (, 1), (, 'User 1 Logged-in')]) -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Alex Glaros
In smartgrid, the user first sees the parent records. There is a link to the child table records on the far right. Is there a way to change the name of the child table link on the far right from default "child_Table_name" to "Click_here_to_see_details_for_this_item" ? Or is there a way to dis

[web2py] Re: SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Anthony
Not sure if this is the problem, but formname is an argument of .process(), not .__init__(). Anthony On Wednesday, March 13, 2013 11:29:07 AM UTC-4, Jim S wrote: > > I have the following code: > > form = SQLFORM.factory(Field('auth_group', 'integer', label='Groups',required > =True), formname='m

[web2py] Re: MSSQL

2013-03-13 Thread Marian
That's why I appreciate your help :) Now there's the DataError: Traceback (most recent call last): File "D:\Temp\test_pyodbc.py", line 9, in cursor.execute("insert into auth_event(time_stamp, client_ip, origin, description) values (?, ?, ?, ?)", now, '192.0.0.1', 'origin', 'description' )

[web2py] Re: web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-13 Thread Anthony
You might also consider using SQLFORM.smartgrid . Anthony On Wednesday, March 13, 2013 10:59:08 AM UTC-4, rif wrote: > > try https://github.com/rif/web2admin and post back your impressions. > > -rif > > miercuri, 1

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
remote testing makes me sick :P another trial. now = datetime.datetime.now().isoformat()[:19].replace('T',' ') On Wednesday, March 13, 2013 4:39:30 PM UTC+1, Marian wrote: > > This works also > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py] Re: MSSQL

2013-03-13 Thread Marian
This works also -- --- 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...@googlegroups.com. For more options, visit https://groups.google.com/grou

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
what about using now = datetime.datetime.now() ? On Wednesday, March 13, 2013 4:28:03 PM UTC+1, Marian wrote: > > Ok I did a quick test and this time it worked: > > import pyodbc > import datetime > > cnxn = pyodbc.connect('DRIVER={SQL Server Native Client > 10.0};SERVER=host;DATABASE=db;UID=user

[web2py] Re: smartgrid: how to disable repeating parent ID in child record

2013-03-13 Thread Niphlod
Sorry, I don't see any "easy way" to do it natively: the table you see in a smartgrid is a resultset from a join, and rdbms don't group natively in an "analytic" fashion the resultset. you can try with javascript, though. On Wednesday, March 13, 2013 4:31:01 PM UTC+1, Alex Glaros wrote: > > not

[web2py] Re: smartgrid: how to disable repeating parent ID in child record

2013-03-13 Thread Alex Glaros
not the export file, I meant to suppress its display to the user like: John's projects - feed the dog - water the garden - mow the lawn Sues' projects - vacuum the house - wash the dishes right now it comes out like this John's projects feed the dog John's projects water

[web2py] SQLFORM.factory form.process().accepted not behaving as expected

2013-03-13 Thread Jim S
I have the following code: form = SQLFORM.factory(Field('auth_group', 'integer', label='Groups',required =True), formname='membership', submit_button='Add Membership') if form.process().accepted: user_update = form.vars if user_update['auth_group'] and user_update['auth_group'] != '0':

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Ok I did a quick test and this time it worked: import pyodbc import datetime cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=host;DATABASE=db;UID=user;PWD=pw') cursor = cnxn.cursor() now = datetime.datetime(2013, 3, 13, 15, 2, 9) cursor.execute("insert into auth_event(time

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Niphlod
bad for lazy_tables though. On Wednesday, March 13, 2013 4:03:34 PM UTC+1, Jim S wrote: > > Or you can do it in code after the table is defined using: > > db.myfeet._plural = 'Feet' > db.myfeet._singular = 'Foot' > > -Jim > > On Wednesday, March 13, 2013 9:22:59 AM UTC-5, Cliff Kachinske wrote: >>

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim S
Or you can do it in code after the table is defined using: db.myfeet._plural = 'Feet' db.myfeet._singular = 'Foot' -Jim On Wednesday, March 13, 2013 9:22:59 AM UTC-5, Cliff Kachinske wrote: > > db.define_table('myfeet', > Field(...) > ..., > singular='Foot', > plural='Feet', >

Re: [web2py] Re: web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-13 Thread António Ramos
Sad to see it is not first choice but one must install it! 2013/3/13 rif > try https://github.com/rif/web2admin and post back your impressions. > > -rif > > miercuri, 13 martie 2013, 15:33:49 UTC+2, RunSky ruan a scris: > >> I want to use the web2py because it easy to use, >> but the appadmin i

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
the issue is that it seems that the adapter can't "adapt" the datetime object to the necessary buffer of commands that are needed to ship to mssql. If you have time you can help testing if connecting outside the DAL the insert works ... cnxn = pyodbc.connect() .. etc etc etc I don't have a py

[web2py] Re: web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-13 Thread rif
try https://github.com/rif/web2admin and post back your impressions. -rif miercuri, 13 martie 2013, 15:33:49 UTC+2, RunSky ruan a scris: > > I want to use the web2py because it easy to use, > but the appadmin is not easy to use. > is there some beautiful appadmin like the django? > -- --- You

[web2py] Re: Translation plural

2013-03-13 Thread Francisco Costa
Translation Pluralization may be found here: http://web2py.com/books/default/chapter/29/04?search=plural#Internationalization,-and-Pluralization-with-T On Tuesday, September 11, 2012 4:23:08 PM UTC+1, Francisco Costa wrote: > > How to use the plural featurein tranlation T.plural ? > -- --- Yo

[web2py] package import

2013-03-13 Thread Phillipp Schmidt
I want to use the tablib package. https://github.com/kennethreitz/tablib So I put it in the modules folder of my application and use `import tablib`. Although the package is working locally, when trying to use it in web2py I keep getting import errors from files inside the package. It doesn't see

[web2py] Re: Translation plural

2013-03-13 Thread Francisco Costa
Translation Pluralization may be found here: http://web2py.com/books/default/chapter/29/04?search=plural#Internationalization,-and-Pluralization-with-T -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and sto

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Oh no thank you for your help. :) The user language is german and encoding of the database is Latin1_General_CI_AS. -- --- 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

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
I could have answered seeing the message... supposedly German ? On Wednesday, March 13, 2013 3:36:21 PM UTC+1, Niphlod wrote: > > something on the adapter side is terribly wrong... what's the default > language of the user connecting to this instance ? > > PS: thanks for the patience. > > On Wedn

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
something on the adapter side is terribly wrong... what's the default language of the user connecting to this instance ? PS: thanks for the patience. On Wednesday, March 13, 2013 3:29:51 PM UTC+1, Marian wrote: > > Event with odbc syntax it fails like this: > > >>> import datetime > >>> now = da

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Event with odbc syntax it fails like this: >>> import datetime >>> now = datetime.datetime(2013, 3, 13, 15, 2, 9) >>> db.auth_event.insert(client_ip='bogus', time_stamp=now) Traceback (most recent call last): File "", line 1, in File "D:\web2py\gluon\dal.py", line 8443, in insert ret = s

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Cliff Kachinske
db.define_table('myfeet', Field(...) ..., singular='Foot', plural='Feet', ) On Wednesday, March 13, 2013 10:08:29 AM UTC-4, software.ted wrote: > > Is there a way to change the labels of the tables in the generated > breadcrumbs of the SQLFORM.grid as well as the link pointing

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
ok... one more trial. import datetime now = datetime.datetime(2013, 3, 13, 15, 2, 9) db.auth_event.insert(client_ip='bogus', time_stamp=now) and . did you try connecting to the database using the odbc syntax ? db = DAL('mssql://Driver={SQL Server Native Client 10.0};Server=myServerAddres

[web2py] Re: MSSQL

2013-03-13 Thread Marian
The databse driver is pyodbc-3.0.6-py2.7 -- --- 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...@googlegroups.com. For more options, visit https

[web2py] web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-13 Thread RunSky ruan
I want to use the web2py because it easy to use, but the appadmin is not easy to use. is there some beautiful appadmin like the django? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving email

[web2py] Re: MSSQL

2013-03-13 Thread Marian
I am running on Windows 7 Ent. 64, with Python 2.7.2 x64 as you also can see in the log. It seems it fails even if I do not insert a timestamp. Created by Massimo Di Pierro, Copyright 2007-2013 Version 2.4.4-stable+timestamp.2013.03.11.20.32.00 Database drivers available: SQLite(sqlite3), MySQL

[web2py] REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Teddy Nyambe
Is there a way to change the labels of the tables in the generated breadcrumbs of the SQLFORM.grid as well as the link pointing to the linked tables to something custom. -- ... Teddy Lubasi Nyambe Opensource Zam

[web2py] Re: Poweredby Web2py not found links

2013-03-13 Thread Anthony
I check the list occasionally. Just did another pass. Anthony On Wednesday, March 13, 2013 8:47:46 AM UTC-4, Ramos wrote: > > Does anyone check the links in the page > > http://web2py.com/poweredby > > Some of them do not exist if i follow the link > > > -- --- You received this message becau

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
ok, next step. Are you on windows ? what driver have you available for mssql ? (you can see as soon as you start web2py.py in the console) next step: open a shell (web2py.py -M -S theappname) and do (or try to do) auth.log_event('something') db.commit() db.auth_event.insert(client_ip='bogus', use

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Ah ok sorry. The structure is like this: id (PS, int, NOT NULL) time_stamp (datetime, NULL) client_ip (varchar(512), NULL) user_id (FS, int, NULL) origin (varchar(512), NULL) description (text, NULL) -- --- You received this message because you are subscribed to the Google Groups "web2py-users

Re: [web2py] Why does session get reset every time a page is loaded?

2013-03-13 Thread Anshul
Yes I can see why pickling instances would be a bad idea. Then maybe it's better if I give the class something more useful to return that can be easily pickled like a tuple. Although afaik, Pickle just stores the object.__dict__ when pickling and then replaces a fresh instance's __dict__ with the

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
I was asking for the actual structure of the auth_event table on the database On Wednesday, March 13, 2013 2:21:51 PM UTC+1, Marian wrote: > > The connection string is: > mssql://USER:PASSWORD@HOST/DATABASE > > The auth_events table is the build in table of auth. I did not customize > it but

[web2py] Re: MSSQL

2013-03-13 Thread Marian
The connection string is: mssql://USER:PASSWORD@HOST/DATABASE The auth_events table is the build in table of auth. I did not customize it but I customized auth_user. auth.settings.extra_fields['auth_user']=[ Field('image', 'upload', default='', autodelete=True, requires=IS_EMPTY_OR(IS_IMAGE

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
seems a casting error: what is the definition on the database of your auth_events table as stored in the database ? what is your connection string ? On Wednesday, March 13, 2013 1:46:43 PM UTC+1, Marian wrote: > > Somehow my web2py is not working with my mssql database anymore. I am > pretty sur

[web2py] MSSQL

2013-03-13 Thread Marian
Since yesterday my web2py cannot log events to a mssql database any more. I'm pretty sure yesterday everything worked fine. Even the welcome app fails on register now. I dropped every table, delete the database logs and even recreated the database itself. I'm always getting a char to datetime c

[web2py] MSSQL

2013-03-13 Thread Marian
Somehow my web2py is not working with my mssql database anymore. I am pretty sure it worked yesterday. Today it seems every log_event in auth fails. Even the welcome app fails on register an user. I dropped all tables and even recreated the database. Nothing works anymore. web2py™ Version 2.4.

Re: [web2py] Why does session get reset every time a page is loaded?

2013-03-13 Thread Ricardo Pedroso
On Wed, Mar 13, 2013 at 1:08 AM, Vixus wrote: > I have defined a Search class in models/search.py and I store this in > session: > > if session.search == None: > session.search = Search() > > But I was wondering why nothing that was being set in the class was being > carried throughout the sessi

[web2py] Poweredby Web2py not found links

2013-03-13 Thread António Ramos
Does anyone check the links in the page http://web2py.com/poweredby Some of them do not exist if i follow the link -- --- 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

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-13 Thread Alan Etkin
> > I can make this. Translators need it. > About different versions, the spanish translation first chapters are translated against the 4th edition (about the 4th chapter), while the rest is being translated against the current github repo files. I can see that this not too sound way of transl

[web2py] Re: Version 2.4.4 Bug?

2013-03-13 Thread Jyoti Sharma
I still do get the above error without any changes. And I am not getting the line (Running on %s) like I could see on the demo site yesterday, today (now) that site is dysfunctional: http://www.web2py.com/demo_admin Regards, Jyoti On Wednesday, 13 March 2013 17:50:15 UTC+5:30, Massimo Di Pierro

[web2py] Web2py 2.4.4

2013-03-13 Thread Annet
In Web2py 2.4.4, when I click the Create/Upload button under Modules to create a module, the create file with filename dialog appears under Static, when I create a new file it ends up in the Static folder, not in the Modules folder. Kind regards, Annet. -- --- You received this message beca

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-13 Thread Massimo Di Pierro
I can make this. Translators need it. On Wednesday, 13 March 2013 06:01:01 UTC-5, david xiao wrote: > > Just wondering, if it's possible, i think i will be helpful to know the > new features. > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py] Re: Version 2.4.4 Bug?

2013-03-13 Thread Massimo Di Pierro
Do you still get the error after restart? You should not. On Wednesday, 13 March 2013 00:12:35 UTC-5, Jyoti Sharma wrote: > > I run it using uwsgi and nginx on ubuntu. I stopped nginx server then > restarted uwsgi and then started the nginx server. > > Regards, > Jyoti > > On Tuesday, 12 March 2

[web2py] Re: "Not Supported" error when making a select with an OR over GAE

2013-03-13 Thread José Manuel López
Thank you massimo, I think nothing have changed :). I have made two queries and then I've joined the two results. Result: 2 queries and 2 For sentences to get the same that a simple OR ... crazy... On Tuesday, March 12, 2013 3:54:36 PM UTC+1, Massimo Di Pierro wrote: > > Unless things have ch

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-13 Thread Alan Etkin
> > Just wondering, if it's possible, i think i will be helpful to know the > new features. > 1) Grab the first 4th edition markmin chapters 2) Grab the last 5th edition markmin chapters 3) for each chapter number do $ diff <4th edition chapter>.markmin <5th edition chapter>.markmin > .diff N

[web2py] REF: SQLFORM.grid Display Name

2013-03-13 Thread Teddy Nyambe
I am having a challenge displaying the first_name and lastname concatenated in the grid listing its not displaying but the label is displayed correctly but without records...but for View, Add and Edit the field is displaying data correctly. Controller: def mp_info(): db.emp_portfolio.emp_id.requi

Re: [web2py] Re: REF: SQLFORM.grid programmatically determine operation [add, edit or delete]

2013-03-13 Thread Teddy Nyambe
Thanks got it! On Wed, Mar 13, 2013 at 10:45 AM, Niphlod wrote: > inspect request.args ... edit, delete, new should appear accordingly to > the operation. > > > On Wednesday, March 13, 2013 9:04:19 AM UTC+1, software.ted wrote: >> >> I would like to know how you can determine what button or oper

  1   2   >