[web2py] Re: Populating of fields for a new record in a grid

2013-04-01 Thread Derek
http://web2py.com/books/default/chapter/29/06#Common-fields-and-multi-tenancy Look at db._common_fields On Monday, April 1, 2013 9:07:12 AM UTC-7, Sverre wrote: I have a query of N records for a grid like this one query = (db.locations.cid == static_cid) Every time I want to do a new record

[web2py] Re: I wonder where Web2Py stands here...

2013-04-01 Thread Derek
That particular benchmark was quite unfair to rails, they had configured it in dev mode which recompiles code on every request. Also, it's not unbiased. They've released a lot of their own software which is written in Java, and it pays to have your own software ranked as highest performance,

[web2py] Re: IMG in A tag of SQLFORM `submit_button`?

2013-03-29 Thread Derek
button type=submit works with images. On Thursday, March 28, 2013 7:52:08 PM UTC-7, Anthony wrote: The value of submit_button goes in the value attribute of the submit input element, so it can only be text, not more HTML elements. If you need an alternative to a standard submit button with

[web2py] Re: In a grid can I control justification of columns

2013-03-28 Thread Derek
I love nth-child :) As for IE support, try this: http://selectivizr.com/ On Thursday, March 28, 2013 9:48:49 AM UTC-7, Anthony wrote: You could do it via a CSS rule using nth-child. For example, suppose you want to right justify the 5th column: .web2py_grid td:nth-child(5) {text-align:

[web2py] Re: JSON and COUNT: avoid _extra field?

2013-03-28 Thread Derek
Why not do this with client side javascript? data['table']['count'] = data['count']; On Thursday, March 28, 2013 9:11:59 AM UTC-7, Rocco wrote: Hello, I'm doing some exciting test using jqplot and handsontable with web2py. The approach is almost linear: controller with

Re: [web2py] using the IS_URL validator with complex URLs

2013-03-28 Thread Derek
Is there a web2py-dev where I can ask questions such as submitting patches? On Thursday, March 28, 2013 1:34:01 AM UTC-7, Niphlod wrote: send a patch with tests and you'll have it :P On Wednesday, March 27, 2013 11:12:02 PM UTC+1, Derek wrote: Also looks like the TLDs don't include

[web2py] Re: is there a stable blog app for web2py ?

2013-03-28 Thread Derek
What needs to be updated with instant-press? On Wednesday, March 27, 2013 8:37:32 PM UTC-7, RunSky ruan wrote: I need a blog app for my website. Is there a stable blog app for web2py,the instant-press seems last update at 2010,it's not updated for a long time -- --- You received this

[web2py] App Go-Live Checklist

2013-03-27 Thread Derek
I was wondering if there is anything such as a Go-Live Checklist for W2P apps. Like things you want to check before you go live, or optimizations you can enable once your 'development' phase is done. For example: 1. Disable migrations 2. Enable 'lazy tables' 3. Enable DB Cache on queries 4.

Re: [web2py] using the IS_URL validator with complex URLs

2013-03-27 Thread Derek
It should be checking against RFC 3986, not RFC 2396. On Wednesday, March 27, 2013 11:44:08 AM UTC-7, Jonathan Lundell wrote: On 27 Mar 2013, at 11:25 AM, Lamps902 dhea...@gmail.com javascript: wrote: It seems that every once in a while, the IS_URL validator doesn't want to accept a URL

Re: [web2py] using the IS_URL validator with complex URLs

2013-03-27 Thread Derek
Also looks like the TLDs don't include the internationalized country code top level domains, only the test ones. On Wednesday, March 27, 2013 2:57:00 PM UTC-7, Derek wrote: It should be checking against RFC 3986, not RFC 2396. On Wednesday, March 27, 2013 11:44:08 AM UTC-7, Jonathan Lundell

[web2py] Re: Error when listing newly created database tables from appadmin

2013-03-27 Thread Derek
Right, if you use the 'reference sometable' syntax, that will allow you to have tables reference something which doesn't exist yet. If you use the db.othertable format, then the othertable absolutely has to exist. On Monday, March 25, 2013 7:48:02 AM UTC-7, Cliff Kachinske wrote: As I

[web2py] Re: Populating jqGrid Tree with JSON

2013-03-26 Thread Derek
Where would one get this jqGrid Tree, and can you post a sample JSON dataset that this is supposed to work with? On Monday, March 25, 2013 3:51:10 PM UTC-7, Nate wrote: Nothing in the console. Firebug reports No Javascript on this pageIf script tags have a type attribute, it should equal

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread Derek
You can't auto-fill a location of a file to upload. Imagine the security holes that would open up on the web. No, users have to select the file on their system. On Tuesday, March 26, 2013 10:36:15 AM UTC-7, smoggy wrote: There is no view, it's rendered from the controller. About the

Re: [web2py] Query with multiple constraints

2013-03-25 Thread Derek
That's mentioned in the book as well; Python doesn't support overloading those operators. I do remember reading that in the book. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving

[web2py] Re: web2py and timezones

2013-03-25 Thread Derek
I'd rather store the dates in the database in local time with the offset stored (ie take out the [:19]). On Sunday, March 17, 2013 7:31:24 PM UTC-7, Massimo Di Pierro wrote: I was looking at code to detect the user timezone and store dates consistently in UTC format. I made some changes in

[web2py] Re: Table scrollbar problem in IE

2013-03-25 Thread Derek
Add a vendor-specific tag for IE... -ms-overflow-x: scroll; the scrollbar will appear when there is overflow on the X, all the other browsers will have the 'auto'. On Monday, March 25, 2013 6:18:25 AM UTC-7, Mark wrote: Hi all, I have a problem which only happened in IE (I tested IE9,

[web2py] Re: [OFF] App for crowdfundig sites (like KickStarter)

2013-03-25 Thread Derek
Pretty neat, one issue. Clicking the 'back' button on the scroller causes the 'try it' button to bounce off the right side then plop back in the proper place. Also, it does not reset the scrolling timer, so if you click 'back' before it's going to switch to the next one, it goes back then

[web2py] Re: Making a simple scheduler.

2013-03-25 Thread Derek
Here's a bit of javascript that will create a calendar for you... it won't offset the date by the day number, but it's a start anyway... html head style .calendarDay { width: 100px; float: left; } /style script var monthStart = new Date(2013, 3, 1); var monthEnd = new Date(2013, 3 + 1, 1); var

[web2py] Re: web2py and timezones

2013-03-25 Thread Derek
layer of complexity) On Monday, March 25, 2013 6:40:26 PM UTC+1, Derek wrote: I'd rather store the dates in the database in local time with the offset stored (ie take out the [:19]). On Sunday, March 17, 2013 7:31:24 PM UTC-7, Massimo Di Pierro wrote: I was looking at code to detect

[web2py] Re: Retrieve existing cache values

2013-03-22 Thread Derek
So help me out here... I have this code: def saveAddress(): #session.forget(response) houses = None useCached = True if request.post_vars.address: useCached = False newhouse = db.house.insert(address=request.post_vars.address,person

Re: [web2py] how keepvalues if the page reload by the form don't even get submit?

2013-03-22 Thread Derek
Why don't you just have a webpage, have the display of current values on top, a single form below for adding items, and submit as you go? On Thursday, March 21, 2013 9:14:05 AM UTC-7, Richard wrote: Hello, I have a bizzard case where I need to set the number of input (more number of rows

[web2py] Re: How to create a loop to add multiple child records

2013-03-21 Thread Derek
:16 PM UTC-7, 黄祥 wrote: this cool man, thanks derek hi alex, hope this can help for you to follow the web2py slices (much more simple than the one on the discussion that i've attached before): p.s. please focus on the bold *pwd* /web2py/applications/test *cat controllers/default.py

[web2py] Re: web2py and timezones

2013-03-21 Thread Derek
Massimo, I think you need a new keyboard, looks like your 'o' key is failing you. Either that, or the ring finger on your right hand has a problem. Twice now there's a missing 'o'. On Thursday, March 21, 2013 8:33:42 AM UTC-7, Massimo Di Pierro wrote: I have a major patch from Niphlod that

[web2py] Re: How to create a loop to add multiple child records

2013-03-20 Thread Derek
Well, AJAX code would go in a view, it depends on jQuery, and yes, you'd need script tags. As for links, you'd use something like this (taken from the book): {{=A('add partners', callback=URL('add_partners'))}} On Tuesday, March 19, 2013 3:21:39 PM UTC-7, Alex Glaros wrote: @Derek: I'm

Re: [web2py] Re: How to create a loop to add multiple child records

2013-03-20 Thread Derek
keep getting an error 340 while trying to attach a file. I did create one, maybe I can email it to you separately from this group. On Wednesday, March 20, 2013 9:34:04 AM UTC-7, Richard wrote: Derek, Maybe you could wrote a little dummy app with your solution?? Richard On Wed, Mar 20

[web2py] Re: How to create a loop to add multiple child records

2013-03-20 Thread Derek
give me a second, I'm putting it on web2pyslices... On Wednesday, March 20, 2013 12:45:06 PM UTC-7, Alex Glaros wrote: Hi Derek, mail it here: http://www.gov-ideas.com/contact.htm thanks, Alex On Monday, March 18, 2013 5:33:41 PM UTC-7, Alex Glaros wrote: Does anyone know how

[web2py] Re: How to create a loop to add multiple child records

2013-03-20 Thread Derek
http://www.web2pyslices.com/slice/show/1612/ajax-adding-child-records-to-parent There you go. On Wednesday, March 20, 2013 12:45:06 PM UTC-7, Alex Glaros wrote: Hi Derek, mail it here: http://www.gov-ideas.com/contact.htm thanks, Alex On Monday, March 18, 2013 5:33:41 PM UTC-7, Alex

[web2py] Re: How to create a loop to add multiple child records

2013-03-20 Thread Derek
), and it will serialize it. P.S. I call everything a 'folder' now since that's what Windows calls it. Makes it easier on the less technical people. On Wednesday, March 20, 2013 2:17:12 PM UTC-7, Alex Glaros wrote: Hey Derek, that was great that you could post the example I'm a beginner

Re: [web2py] SQLFORM labels

2013-03-20 Thread Derek
pretty cool, I've been doing the CSS nth-of-type trick On Wednesday, March 20, 2013 11:46:24 AM UTC-7, Anthony wrote: You might consider creating a custom formstyle function, modeled after this one https://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#718, but without including

[web2py] Re: Problems after upgrading from 1.98 to 2.42

2013-03-19 Thread Derek
According to this: https://groups.google.com/forum/?fromgroups=#!topic/web2py/p-w38Wh1d0I Just replace element = element.copy() with element = dict(element) on template.py, or better, convert rows to dicts in your app: # read elements from db elements =

[web2py] Re: How to create a loop to add multiple child records

2013-03-19 Thread Derek
I would suggest having the 'register' page take only one address, and after creating, it redirects you to the 'view' of the client, which has a link to a page where it shows all addresses and allows you to ADD an address. You could also implement this in AJAX, which is what I would recommend.

[web2py] Re: language/zh.py it's not Simplified Chinese,i changed it

2013-03-19 Thread Derek
I think the existing one should probably be renamed to zh-tw instead of zh-cn On Tuesday, March 19, 2013 2:00:44 AM UTC-7, Niphlod wrote: please, attach it (even better open an issue and add it as an attachment) On Tuesday, March 19, 2013 8:41:46 AM UTC+1, RunSky ruan wrote: # coding: utf8

[web2py] Re: Not to open a can of worms ... about web2py.com

2013-03-15 Thread Derek
I hate the color scheme of nodejs.org and it's quite ugly... but here's what I do like: About NodeJS.org... 1. Unambiguous. Web2py.com has three images which appear to be three ipads displaying webpages. Turns out those webpages are for The web2py book, the web2py cookbook, and the web2py

[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] Re: MSSQL

2013-03-13 Thread Derek
this: obj = obj.isoformat(' ')[:19] If you need the space, On Wednesday, March 13, 2013 11:53:46 AM UTC-7, Derek wrote: 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

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

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

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

[web2py] Re: new app www.foxter.co

2013-03-12 Thread Derek
Looks good, my only issue is the login, I hate having to setup a new login for a new website. Any way you can just enable janrain? On Tuesday, March 12, 2013 11:51:11 AM UTC-7, samuel bonilla wrote: hi all... foxter.co is a social network in spanish based in movuca(

[web2py] Re: Creating a DB that mirrors the structure of an existing DB for archiving purposes?

2013-03-12 Thread Derek
Enable versioning. Add this line to your db.py... auth.enable_record_versioning(db) On Tuesday, March 12, 2013 11:02:09 AM UTC-7, Lamps902 wrote: Hi, group. For each database in a subset of my project's databases, I would like to have a corresponding database that (almost) clones the

[web2py] Re: No CMS for Web2Py?

2013-03-12 Thread Derek
Well, the thing about web2py is that it's been backwards compatible from the start, so an abandoned project should work just fine in the latest version of Web2py. The way it's laid out, it makes modifying code easy as well. Don't be afraid to pick up an older CMS and run with it. On Tuesday,

Re: [web2py] override smartgrid 'add' button

2013-03-11 Thread Derek
Nope, in fact, I'm bypassing the grid altogether and writing my own functions. luckily it's not too difficult. I just have a controller return the data, then I get that as json, and do with it what I want. I'm using jqote2 for that, as well as a little custom javascript. On Sunday, March 10,

[web2py] Re: web2py 2.4.3 is OUT

2013-03-11 Thread Derek
Uninstalled an app, flash popped up application 'newappadmin' uninstalled clicked on the 'x' in the span closeflash and the flash doesn't close. It's stuck on the screen. Chrome 25 on windows. On Monday, March 11, 2013 12:54:29 PM UTC-7, Massimo Di Pierro wrote: Fixes many bugs reported by

[web2py] Re: web2py 2.4.3 is OUT

2013-03-11 Thread Derek
More info... Uncaught TypeError: Property '$' of object [object Object] is not a function web2py.js:70 On Monday, March 11, 2013 1:03:50 PM UTC-7, Derek wrote: Uninstalled an app, flash popped up application 'newappadmin' uninstalled clicked on the 'x' in the span closeflash and the flash

[web2py] session in cache from book not working

2013-03-06 Thread Derek
I have Web2Py 2.4.2 (source edition) on Windows. Reading the book, I see that I can store sessions in cache. So, here's how it says to do it... http://web2py.com/books/default/chapter/29/13#Sessions-in-memcache from gluon.contrib.memdb import MEMDB

[web2py] Re: session in cache from book not working

2013-03-06 Thread Derek
\ntpath.py, line 170, in split d, p = splitdrive(p) File C:\Python27\lib\ntpath.py, line 125, in splitdrive if p[1:2] == ':': TypeError: 'NoneType' object is not subscriptable On Wednesday, March 6, 2013 2:51:15 PM UTC-7, Derek wrote: I have Web2Py 2.4.2 (source edition) on Windows. Reading

[web2py] Re: session in cache from book not working

2013-03-06 Thread Derek
, Derek wrote: after taking that out from my db.py file, I get the following error: Traceback (most recent call last): File C:\Temp\web2py\gluon\main.py, line 577, in wsgibase session._try_store_in_cookie_or_file(request, response) File C:\Temp\web2py\gluon\globals.py, line 753

[web2py] Re: 2.4.2 breaks query

2013-03-06 Thread Derek
No idea why you are getting that _extra. It's supposedly not matching the regex_table_field Anyway, when I do a select, and I want specific columns, I do it like so... rows = db( query ).select(db.projects.prj_type,db.projects.prj_name,db.projects.prj_environment,db.projects.prj_zone,

[web2py] Re: web2py 2.4.2 is OUT

2013-03-05 Thread Derek
Tried to 'graph models' on a windows machine, old apps get the error: invalid function (appadmin/graph_model) Created a new app from the wizard, clicked 'graph models' pygraphviz library not found Tried to install pygraphviz on Windows (after installing Graphviz), get this message: Your

[web2py] Re: web2py 2.4.2 is OUT

2013-03-05 Thread Derek
to just check the OS. Also, if the button is hidden in case the lib import fails, then new users would never see it and be reminded that they can install the library and use it. In both cases, the button serves a cause, IMHO. Regards, Ales On Tuesday, March 5, 2013 6:27:09 PM UTC+1, Derek

[web2py] Re: Help with query

2013-03-05 Thread Derek
You can negate a part of a query by using a tilde (~). On Tuesday, March 5, 2013 10:30:50 AM UTC-7, Pepe Araya wrote: Hi! In words what i need is to get a set from this query: select the 'persons.email' and 'persons.id' from table 'persons' *that are not in*table ' invitations.to' my

[web2py] Re: How to order by IP address? Or how to write an orderby function?

2013-03-05 Thread Derek
You could have a virtual field and sort it based on that. import socket, structprint struct.unpack(!I, socket.inet_aton(f_ip_addr))[0] In other words, convert your IP address to decimal, and sort it based on the decimal representation. On Monday, March 4, 2013 3:48:41 PM UTC-7, François

[web2py] Re: Loading component is quite slow?

2013-02-20 Thread Derek
ajax loading probably waits for the whole page to finish rendering before it loads the component. On Wednesday, February 20, 2013 11:01:22 AM UTC-7, Loïc wrote: *Niphlod* Yes I'm working on Windows (7 pro x64) with the default rocket webserver. I have tried to deploy my application on my

[web2py] Re: RPC Versioning Scheme

2013-02-19 Thread Derek
Seems like a lot of hard work. Is your interface in production already but you are going to make changes to it? First, i'd suggest you treat your API as released and don't make changes to the parameters. If you do add parameters, have defaults set for the new parameters. If you need to change

Re: [web2py] separate database and web server web2py installation

2013-02-18 Thread Derek
ssh does encryption, and encryption is a type of minor compression, so you may be transmitting less data on the line. On Monday, February 18, 2013 3:15:07 PM UTC-7, Richard wrote: Final result : no_ssh : 32.810 seconds (worst) remote with ssh : 32.010 seconds local : 31.494 seconds These

[web2py] Improve this code about ( sql query, dict creation for json service)

2013-02-16 Thread Derek
Looks good. Might want to order by date and then select top 1. Found this in an old post by Massimo... (db .table.id0).select(orderby=~db.table.recordtiime,limitby=(0,1)).first() -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Re: How to include a select field in a many to many relationship

2013-02-14 Thread Derek
You could make it a list:reference and then process that on accept by assigning the appropriate groups. On Wednesday, February 13, 2013 11:58:02 PM UTC-7, José Manuel López Muñoz wrote: Hi, I want to make a user creation form, and I need to select the group that this user belongs. As

[web2py] Re: Database validators IS_IN_DB_IF

2013-02-13 Thread Derek
Yup. See here: http://stackoverflow.com/questions/14724584/web2py-custom-validators On Wednesday, February 13, 2013 8:48:25 AM UTC-7, BlueShadow wrote: Hi, I got a table for my news articles which are normally linked to a table which specifies the region/country where my news comes from. I

[web2py] Re: Cannot label id field

2013-02-11 Thread Derek
Seems to work for me. db.define_table('customers', Field('name', 'string',length=50, requires=IS_NOT_EMPTY()), ... Field('country','string',length=3), Field('active','boolean'),format='%(name)s', singular='customer', plural='customers') db.customers.id.label=T('TEST ID') On

[web2py] Re: clear data session

2013-02-11 Thread Derek
why are you not doing this: * if request.vars.action=='remove':* *del session.order[id]* * *On Monday, February 11, 2013 11:16:52 AM UTC-7, 黄祥 wrote: hi anthony, here is the code : *# controller * def order_callback(): id=int(request.vars.id) if request.vars.action=='add':

[web2py] Re: How to use a text file instead of a db?

2013-02-11 Thread Derek
put it in /static and access it by name. On Monday, February 11, 2013 1:54:34 PM UTC-7, rh wrote: On Mon, 11 Feb 2013 11:33:56 -0800 (PST) Niphlod nip...@gmail.com javascript: wrote: open the file, read it and do what you need to do. your question leaves a lot of holes about what

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Derek
It shouldn't be the default because it doesn't work for everyone (at least, it doesn't work for me) class 'pyodbc.ProgrammingError' ('42000', [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Introducing FOREIGN KEY constraint 'plugin_web2admin_history_modified_by__constraint' on table

Re: [web2py] Re: Auth with Wordpress

2013-02-07 Thread Derek
I guess you could have wordpress set a cookie of some sort if they have access, and then use that cookie in web2py to control access. On Thursday, February 7, 2013 11:13:41 AM UTC-7, Kenneth wrote: Hi Michael, Am I understanding you solution completly wrong but isn't it so that web2py

[web2py] Why must 'id' primary-key Field in DAL be an integer?

2013-02-06 Thread Derek
It doesn't have to be. Use the primary_key attribute. -- --- 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,

[web2py] Re: How to handle one-to-many relationship with sqlform and checkboxes?

2013-02-06 Thread Derek
It's a list:reference field then, look at the reference in chapter 6: the database abstraction layer On Wednesday, February 6, 2013 2:09:50 PM UTC-7, brac...@gmail.com wrote: Hello, I was reading about the Links to referencing recordshttp://web2py.com/books/default/chapter/29/07 part in

[web2py] Re: Include odbc and mssql support with pypyodbc.py

2013-02-05 Thread Derek
pypyodbc as pyodbc and I get: gluon.contrib.pypyodbc.OdbcNoLibrary: 'ODBC Library is not found' Can you help? On Monday, 4 February 2013 18:09:31 UTC-6, Derek wrote: Any way we can add this? http://code.google.com/p/pypyodbc/ It's a pure python implementation of pyodbc. I've tested

[web2py] Re: Is it possible to modify textarea cols of SQLFORM.grid ?

2013-02-05 Thread Derek
edit the web2py.css and change the width and height of 'textarea'. On Tuesday, February 5, 2013 11:55:37 AM UTC-7, Calycé wrote: Hi all, Can someone tell me if it's possible to change the number of cols for a textarea when editing a record through SQLFORM.grid ? I tried with maxtextlength

[web2py] Re: Include odbc and mssql support with pypyodbc.py

2013-02-05 Thread Derek
, 2013 12:26:32 PM UTC-7, Massimo Di Pierro wrote: Which os? Not for me. On Tuesday, 5 February 2013 12:53:07 UTC-6, Derek wrote: As I said, I edited dal.py and replaced references to pyodbc to pypyodbc and that seemed to work. I believe the only adapter referencing it as a driver was the mssql

[web2py] Re: Include odbc and mssql support with pypyodbc.py

2013-02-05 Thread Derek
Yup. It uses ctypes to access your existing odbc libraries. On Tuesday, February 5, 2013 3:22:45 PM UTC-7, Massimo Di Pierro wrote: What you are telling me is that pypyodbc does not require additional python packages but it requires odbc. On Tuesday, 5 February 2013 14:02:54 UTC-6, Derek

[web2py] Re: html5 code to load/save textarea or other input

2013-02-04 Thread Derek
Pretty cool. I just started working on something like this last week. My goal was to process CSV files client side though, without having to use Web2py's csv parser (it's good, but not good enough for some of my files). This is a good javascript CSV parser that does meet RFC 4180 specs.

[web2py] Re: Background M2M communication

2013-02-04 Thread Derek
Well, depends on the MFUs I guess. I would probably bypass web2py for this and simply use a javascript based polling reader based on websockets. Of course, you'd have to have a websockets enabler on all the MFUs Is there any reason why you'd use a database for this? If all you are looking for

[web2py] Include odbc and mssql support with pypyodbc.py

2013-02-04 Thread Derek
Any way we can add this? http://code.google.com/p/pypyodbc/ It's a pure python implementation of pyodbc. I've tested it with pypy1.9 on web2py 2.3.2 and it works fine (yes, I edited dal.py and renamed all instances of pyodbc to pypyodbc). -- --- You received this message because you are

[web2py] Re: selecting database entries

2013-01-24 Thread Derek
Well, you don't want to select images then, you want to select articles - then get a single image attached to the article. On Thursday, January 24, 2013 8:51:42 AM UTC-7, BlueShadow wrote: Hi I got two tables in my application one for images and one for articles. an artical can have

Re: [web2py] update easy_install

2013-01-24 Thread Derek
sorry I meant pypi. On Wednesday, January 23, 2013 3:09:11 PM UTC-7, Richard wrote: Did you try pip? Richard On Wed, Jan 23, 2013 at 4:56 PM, Derek sp1...@gmail.com javascript:wrote: I know how to get the latest version. I was just mentioning that when I run easy_install, it tries

Re: [web2py] update easy_install

2013-01-24 Thread Derek
Hmm, I just tried pip and same thing, installs 2.1.1 On Wednesday, January 23, 2013 3:09:11 PM UTC-7, Richard wrote: Did you try pip? Richard On Wed, Jan 23, 2013 at 4:56 PM, Derek sp1...@gmail.com javascript:wrote: I know how to get the latest version. I was just mentioning that when I

[web2py] update easy_install

2013-01-23 Thread Derek
running: easy_install web2py - it installs version 2.1.1 - can you make this install the latest stable version? --

Re: [web2py] update easy_install

2013-01-23 Thread Derek
/web2py_src.zip Latest stable. Then you unzip it where you want. On Wed, Jan 23, 2013 at 3:53 PM, Derek sp1...@gmail.com javascript:wrote: running: easy_install web2py - it installs version 2.1.1 - can you make this install the latest stable version? -- --

[web2py] Re: can smartgrid use a SET as a table?

2013-01-22 Thread Derek
No. The first argument of SQLFORM.grid can be a table or a query. A SQLFORM.smartgrid looks a lot like a grid, in fact it contains a grid but it is designed to take as input not a query but only one table and to browse said table and selected referencing tables. You can use SQLFORM.grid, but

[web2py] Re: How to disable deleting profile pictures...

2013-01-22 Thread Derek
Add: ondelete = 'NO ACTION' to the field... that will make it not deletable. They may still see the checkbox though. On Tuesday, January 22, 2013 8:08:49 AM UTC-7, sasogeek wrote: #model db.define_table( auth.settings.table_user_name, Field('profile_picture', 'upload',))

[web2py] Re: Sqlform.Factory upload file error!

2013-01-22 Thread Derek
From the docs... By default SQLFORM.factory generates the form using html id attributes generated as if the form was generated from a table called no_table. To change this dummy table name, use the table_name attribute for the factory: form = SQLFORM.factory(...,table_name='other_dummy_name')

[web2py] Re: Sqlform.Factory upload file error!

2013-01-22 Thread Derek
I believe I posted a reply, but now it shows as deleted. I didn't delete it. I was just quoting from the book. You need to specify table= in your sqlform.factory. On Tuesday, January 22, 2013 2:53:57 PM UTC-7, Massimo Di Pierro wrote: This is true. The fact is the SQLFORM.factory is not

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread Derek
I'd just like to point out, that couldn't he also do this: return dict(form2=form2, form1=form1) then in the view you can have this: {{=form1}} {{=form2}} On Friday, January 18, 2013 10:04:22 AM UTC-7, Anthony wrote: If you go to the URL /yourapp/default/index, when the index.html view is

[web2py] Re: Build a web store

2013-01-16 Thread Derek
Did you try looking here: https://github.com/mdipierro/web2py-appliances On Wednesday, January 16, 2013 4:02:54 AM UTC-7, Guillaume Barthe wrote: How can I access the web store project Massimo Di Pierro has done on Youtube?

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-15 Thread Derek
It is said earlier in the 'grid' documentation that onvalidation, oncreate, onupdate, and ondelete are all callbacks, as such, callbacks are functions, not dictionaries. Callbacks are functions that are passed to other functions. onvalidation, oncreate, onupdate and ondelete are callback

Re: [web2py] Re: width

2013-01-15 Thread Derek
Inspect the element in Chrome, it will say where it gets the width, for my app, it's web2py.css and the width is 300px. You can change the CSS to make it larger, or take out the width and let it automatically size. On Tuesday, January 15, 2013 1:13:27 PM UTC-7, Saba wrote: thanks for the

[web2py] Re: Exposing validators as JSON?

2013-01-15 Thread Derek
That would be cool, perhaps you could add a class to the fields and key off the classes. Or, have the validation function append error messages to a list and return that as json? On Tuesday, January 15, 2013 10:03:06 AM UTC-7, Alec Taylor wrote: How do I expose validators as JSON? I am not

[web2py] Re: DAL _after_delete vs _before_delete

2013-01-14 Thread Derek
That's the way to do it. Although I'd use a session variable instead of global. If you are using global, you are bound to have some race conditions. On Monday, January 14, 2013 8:20:16 AM UTC-7, Kostas M wrote: According to the book, in the DAL chapter, subtitle: 'before and after

[web2py] Re: web2py, stripe, and pci compliance

2013-01-14 Thread Derek
If your application handles credit card information, it must be audited for compliance. So it may or may not be compliant, an audit will determine that. What most companies do is avoid the audit by not handling credit card information. If you use authorize.net (as an example) you can use the

[web2py] Re: web2py, stripe, and pci compliance

2013-01-14 Thread Derek
. On Monday, January 14, 2013 11:05:04 AM UTC-7, Derek wrote: If your application handles credit card information, it must be audited for compliance. So it may or may not be compliant, an audit will determine that. What most companies do is avoid the audit by not handling credit card

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Derek
What book are you looking at? I can't find that phrase anywhere in the book. On Monday, January 14, 2013 6:09:22 AM UTC-7, Kostas M wrote: What I have found out about not firing at all is that in SQLFORM.smartgrid, ondelete and oncreate callbacks should not be dictionaries! Although the

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Derek
You must have missed this part: The smartgrid takes the same arguments as a grid and some more with some caveats: On Monday, January 14, 2013 12:25:15 PM UTC-7, Kostas M wrote: The exact

Re: [web2py] Re: Hierarchical Database Selection

2013-01-14 Thread Derek
Yes, I'm all for de-normalizing when it makes sense to do so. There's no reason for this data to be normalized. I'm going to give the thread starter the benefit of the doubt and assume it's not actually about trains. On Monday, January 14, 2013 10:10:34 AM UTC-7, Niphlod wrote: On Sunday,

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Derek
dictionaries in smartgrid, as editable and deletable do? On Monday, January 14, 2013 7:32:21 PM UTC, Derek wrote: You must have missed this part: The smartgrid takes the same arguments as a grid and some more with some caveats: --

Re: [web2py] Re: SQLFORM Next Item in Database

2013-01-09 Thread Derek
. In that scenario, a user may end up editing an entry that the shouldn't have been looking at in the first place. Good suggestion though. On Tue, Jan 8, 2013 at 3:57 PM, Derek sp1...@gmail.com javascript:wrote: It seems to me that you could add a 'next' button on that page, which would

[web2py] Re: how to prevent delete processing from ondelete callback?

2013-01-08 Thread Derek
From the bookhttp://web2py.com/books/default/chapter/29/06#before-and-after-callbacks : The return values of these callback should be None or False. If any of the _before_* callback returns a True value it will abort the actual insert/update/delete operation. I'm guessing the 'return true'

Re: [web2py] Re: self join on postgres

2013-01-08 Thread Derek
No way to set an index... perhaps you could use caching. On Tuesday, January 8, 2013 1:27:46 AM UTC-7, Paolo valleri wrote: Thanks for this explanations! To add more info, I can say that the elements on left column are naturally ordered, I have thousands of records(~5000record/day) for each

[web2py] Re: Auto populate form

2013-01-08 Thread Derek
You'd probably want to have a javascript that calls a special function on your controller that returns the results from gethostbyname(). On Tuesday, January 8, 2013 10:46:04 AM UTC-7, Saba wrote: hello, I have a table like this: db.define_table('host', Field('host_name',

<    1   2   3   4   5   6   7   8   9   >