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

2013-03-13 Thread Alex Glaros
In smartgrid, is there a way to keep the parent ID from repeating in the child file? I'd like for the parent ID field to appear only once in the child file at the beginning where the first child record begins thanks, Alex Glaros -- --- You received this message because you are subscribed

[web2py] How to share data between web requests(static variables)

2013-03-13 Thread Apoorve Mohan
Hi All I am sending ajax requests to the server every 100 milli secs. And I want to share a variable between every request that need to be updated on every request. I tried using global variable but it din't worked. Neither could I find anything like static variables. Please suggest

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

2013-03-13 Thread Teddy Nyambe
I would like to know how you can determine what button or operation was made by a user on the grid where they pressed edit or add or delete in the controller. Teddy L. -- ... Teddy Lubasi Nyambe Opensource

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

2013-03-13 Thread Niphlod
you mean in the exported file ? On Wednesday, March 13, 2013 7:21:18 AM UTC+1, Alex Glaros wrote: In smartgrid, is there a way to keep the parent ID from repeating in the child file? I'd like for the parent ID field to appear only once in the child file at the beginning where the first

[web2py] Re: how to update title from an ajax call

2013-03-13 Thread Niphlod
javascript. On Wednesday, March 13, 2013 6:56:30 AM UTC+1, weheh wrote: I'm using an ajax callback to dynamically update the main content in my page. I want to also change the page title and meta name='description' content='new description based on dynamically updated content' ... to

Re: [web2py] how to start Celery worker in web2py

2013-03-13 Thread Niphlod
if it's right, and I'm not sure it is since I couldn't get the to the inner circle of knowledge required to run such a thing and tell all the others people, THIS is the way ^_^ On Wednesday, March 13, 2013 5:09:18 AM UTC+1, Massimo Di Pierro wrote: This belongs to a blog post! -- ---

[web2py] Re: SQLFORM.smartgrid where are the default styles located

2013-03-13 Thread Niphlod
open firebug and see for yourself base styles are in web2py.css On Wednesday, March 13, 2013 2:12:56 AM UTC+1, leapin...@gmail.com wrote: I am trying to locate where the SQLFORM.smartgrid default styles are located in my web2py project. Any help would be appreciated *cheers --

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

2013-03-13 Thread Niphlod
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 operation was made by a user on the grid where they pressed edit or add or

Re: [web2py] Formatting radio widgets (or radio buttons)

2013-03-13 Thread Johann Spies
On Tuesday, 12 March 2013 14:34:20 UTC+2, Richard wrote: Just don't pickup the label, remove these entry from your custom form : form.custom.label[fieldname] It is not that easy: form.custom.label[fieldname] refers to the label of the field. Each option in IS_IN_SET has it's own label

[web2py] Re: How to share data between web requests(static variables)

2013-03-13 Thread Alan Etkin
I am sending ajax requests to the server every 100 milli secs. And I want to share a variable between every request that need to be updated on every request. I tried using global variable but it din't worked. Neither could I find anything like static variables. Why you don't use the

Re: [web2py] Formatting radio widgets (or radio buttons)

2013-03-13 Thread Niphlod
maybe we're beginning to go offtopic here . It's not a matter on how the form is displayed, it's how a widget for a radio selection gets built. He needs another widget instead of the default one, not a different way to show the form itself.. e.g. db.table.field.widget =

[web2py] Typo on the new homepage web2py.com

2013-03-13 Thread Remco K
Hi, I noticed a typo on the red button on the homepage: 'Sites powereb by web2py' Regards, Remco -- --- 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] Re: How to share data between web requests(static variables)

2013-03-13 Thread Niphlod
if you use sessions, consider something different then the disk-based ones 10 times a second can get messy faster then you think if multiple users are involved. I'd use caches, but default caches like cache.ram or cache.disk would have nearly the same problem. Consider switching to

[web2py] Re: web2py database drivers

2013-03-13 Thread Alan Etkin
Hi, i have a trouble with database drivers. The problem begins after installing MapProxy http://mapproxy.org/ using easy_install MapProxy on the same machine i runs web2py. AFAIK, sqlite ships with a standard python installation, there's something wrong about the interpreter module

Re: [web2py] Formatting radio widgets (or radio buttons)

2013-03-13 Thread Annet
I had a form problem yesterday, which Anthony helped me solve. It's not the exact same problem you have but maybe the solution to my problem points you in the right direction. I needed an inline Bootstrap form: http://twitter.github.com/bootstrap/base-css.html#forms In the controller I

[web2py] Re: how to send bulk emails with web2py

2013-03-13 Thread Alan Etkin
hi, web2py mail.send checks if mail is sent or not, so if I want to send 1000 emails it will take a while or will break at some point because my server execution time is 30s so please advise me what to do in this case This app sends bulk mail in a batch process with a browser and ajax

[web2py] Re: Login not possible in Chrome and Firefox on 2.4.2 (stable) 2013-03-04 03:26:21

2013-03-13 Thread Eric
Removing the base / did the trick :) Tnx! -- --- 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

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

2013-03-13 Thread david xiao
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 group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [web2py] Re: how to send bulk emails with web2py

2013-03-13 Thread António Ramos
In web2py.com we have sites powered with web2py. This bulk email app does not fit in that requisite but should be listed in other category! 2013/3/13 Alan Etkin spame...@gmail.com hi, web2py mail.send checks if mail is sent or not, so if I want to send 1000 emails it will take a while or

Re: [web2py] Re: how to send bulk emails with web2py

2013-03-13 Thread Alan Etkin
In web2py.com we have sites powered with web2py. This bulk email app does not fit in that requisite but should be listed in other category! Hi Ramos, it could be listed in appliances, but, no one expects it to be in spanish! And also it has AGPL license, so I'm not sure it is compatible

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 niph...@gmail.com 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

[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():

[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 chapter

[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

[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 2013

[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 group.

[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

[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

[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

[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

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 vix...@gmail.com 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

[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

[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

[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 sure

[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,

[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 I

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 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

[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',

[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 because you

[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

[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),

[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 emails

[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

[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

[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 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 console, line 1, in module File D:\web2py\gluon\dal.py, line 8443, in insert ret =

[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 =

[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 Wednesday,

[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: 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 stop

[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

[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 ? -- --- You

[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: 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

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 feric...@gmail.com 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

[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', )

[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: 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

[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: 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] 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 the

[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

[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

[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 group.

[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.smartgridhttp://web2py.com/books/default/chapter/29/07#SQLFORM.grid-and-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, 13

[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 module cursor.execute(insert into auth_event(time_stamp, client_ip, origin, description) values (?, ?, ?, ?), now, '192.0.0.1', 'origin', 'description'

[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),

[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

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Maybe this helps from the web2py error ticket: (self=gluon.dal.MSSQLAdapter object, table=Table auth_event (id, time_stamp,client_ip,user_id,origin,description), fields=[(gluon.dal.Field object, 'auth'), (gluon.dal.Field object, datetime.datetime(2013, 3, 13, 16, 46, 4, 117000)),

[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,

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 abasta...@gmail.com wrote:

[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

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 _id arg

[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

[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 is

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

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 niph...@gmail.com 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:

[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 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 _formname

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: table

[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]

[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,

[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

[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

[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 code inputs = [] for i in range(0,10): inputs.append(db.table1.field1) inputs.append(db.table1.field2) form =

[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

[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

[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',' ')

[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

[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 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

[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 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 -- ---

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 ml.richard.vez...@gmail.com 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 code inputs = [] for i in range(0,10):

[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

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 alexgla...@gmail.com 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

[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

[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

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 alexg...@gmail.comjavascript: wrote: I may be on the wrong

  1   2   >