[web2py] Re: Error messages for a failed insert MSSQL ... where are they?

2013-04-19 Thread Tim Richardson
OK, I'll make sure I can reproduce first. On Friday, 19 April 2013 22:42:03 UTC+10, LightDot wrote: > > Please open a bug report if this still looks like a bug to you... Sure > sounds like one, but since I didn't see the code... > > > -- --- You received this message because you are subscrib

Re: [web2py] Re: How to structure a represent lambda for a non-primary field?

2013-04-19 Thread Alex Glaros
They both worked beautifully, thanks Anthony. (Note to anyone copying this, Google Groups formatted a hard return that should be removed to make Anthony's examples work). Alex On Fri, Apr 19, 2013 at 10:15 PM, Anthony wrote: > Or slightly shorter: > > db.PartyPhoneNumberIntersection.countryTel

[web2py] Re: How to structure a represent lambda for a non-primary field?

2013-04-19 Thread Anthony
Or slightly shorter: db.PartyPhoneNumberIntersection.countryTelephoneCode.represent = lambda id, row: db.Country(countryTelephoneCode=row.countryTelephoneCode).countryName Anthony On Saturday, April 20, 2013 1:13:19 AM UTC-4, Anthony wrote: > > Oh, yeah, forgot the code is not the id field o

[web2py] Re: How to structure a represent lambda for a non-primary field?

2013-04-19 Thread Anthony
Oh, yeah, forgot the code is not the id field of the Country table -- you need a full query: db.PartyPhoneNumberIntersection.countryTelephoneCode.represent = lambda id, row: db(db.Country.countryTelephoneCode == row.countryTelephoneCode).select ().first().countryName Anthony On Saturday, Ap

[web2py] Re: How to structure a represent lambda for a non-primary field?

2013-04-19 Thread Alex Glaros
it looks good Anthony but this error is raised: 'NoneType' object has no attribute 'countryName' thanks, Alex On Friday, April 19, 2013 9:47:55 PM UTC-7, Anthony wrote: > > Notice that the current row is passed into the lambda, and > countryTelephoneCode is a field in that row, so you have

[web2py] Re: onvalidation

2013-04-19 Thread Anthony
The Crud methods automatically handle processing, so you should not call form.process on a Crud form. Review the book section on Crud. Anthony On Saturday, April 20, 2013 12:09:39 AM UTC-4, lucas wrote: > > how come this code doesn't update the text to upper()? thanx in advance, > lucas > > de

[web2py] Re: How to structure a represent lambda for a non-primary field?

2013-04-19 Thread Anthony
Notice that the current row is passed into the lambda, and countryTelephoneCode is a field in that row, so you have to refer to it as row.countryTelephoneCode: db.PartyPhoneNumberIntersection.countryTelephoneCode.represent = lambda id, row: db.Country(row.countryTelephoneCode).countryName Antho

[web2py] Re: problem with sparklines

2013-04-19 Thread Anthony
Looks like you have broken up your string into multiple lines without using the line continuation character ("\"). Should be: chartoptions = "{type: 'bar', barColor: 'green', 'chartRangeMin':\ Anthony On Friday, April 19, 2013 9:11:16 PM UTC-4, greaneym wrote: > > In trying the sparklines slic

[web2py] How to structure a represent lambda for a non-primary field?

2013-04-19 Thread Alex Glaros
What is the syntax for having countryName appear in place of countryTelephoneCode using the represent feature? Notice in the above situation that countryTelephoneCode is not the primary key of the Country table. db.define_table('Party', ## super-type for people and organizations Field('partyTyp

[web2py] onvalidation

2013-04-19 Thread lucas
how come this code doesn't update the text to upper()? thanx in advance, lucas def xyz(): #stuff if cidi: form = crud.update(tCt, cidi, onvalidation=county_check) else: form = crud.create(tCt, onvalidation=county_check) if form and form.process().accepted:

[web2py] Re: SQLFORM question

2013-04-19 Thread lucas
thanx again anthony, perfect. lucas -- --- 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://g

[web2py] problem with sparklines

2013-04-19 Thread greaneym
In trying the sparklines slice, I am getting an error. Using osx with web2py v2.3.2, here is the error: EOL while scanning single-quoted string (index.html, line 83)VERSIONweb2py™(2, 3, 2, datetime.datetime(2012, 12, 17, 15, 3, 30), 'stable')PythonPython 2.5.1: /Applications/web2py/web2py.ap

[web2py] Re: csv import export

2013-04-19 Thread Reza Shah
I just found out there was a mistake in the csv file i used when importing. The problem was i open the csv exported from admin in libreoffice, but i didnot notice that the separator converted to tab. -- --- You received this message because you are subscribed to the Google Groups "web2py-user

Re: [web2py] Re: Return value from javascript to controller

2013-04-19 Thread fun man
Apologize everyone, and Niphlod, I forgot to restart my browser, and now the 2 values are consistent .. my bad for the disturbance. On Sat, Apr 20, 2013 at 9:16 AM, fun man wrote: > Hi Niphlod, > > def index(): > # when people first login, they will get their timezone set. > tz = f

Re: [web2py] Re: No `Field`s generated by 'extract_sqlite_models.py'

2013-04-19 Thread Michele Comitini
The problem is that the script makes some assumptions, since it is a very simple port of analogous mysql script. One problem with sqlite is that .schema extracts the DDL statements in the exact form they where issued, there is not any attempt to reverse db table to a sequence of DDL statements. Th

Re: [web2py] Re: Return value from javascript to controller

2013-04-19 Thread fun man
Hi Niphlod, def index(): # when people first login, they will get their timezone set. tz = fast_tz_detector() print print 'Hi, you should save this returned by request.vars', request.vars # if you debug, uncomment this line, and make sure return tz=tz below print "plugin_t

[web2py] Re: SQLFORM question

2013-04-19 Thread Anthony
http://web2py.com/books/default/chapter/29/07#Custom-forms You can also write a custom formstyle function -- not documented yet, but for an example, see https://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#780. Anthony On Friday, April 19, 2013 6:04:54 PM UTC-4, lucas wrote: > > hel

[web2py] Re: Alternative to SQLFORM for Angular

2013-04-19 Thread Anthony
Good points. I think this is roughly the approach taken in web3py: https://github.com/mdipierro/web3py/blob/master/web3py/forms.py. Anthony On Friday, April 19, 2013 4:49:57 PM UTC-4, RHC wrote: > > Thinking about this some more, what I would like would be for a controller > to generate this js

[web2py] SQLFORM question

2013-04-19 Thread lucas
hello one and all, i am quite used to using SQLFORM to present my database tables. say i have two fields, the normal SQLFORM will show those two fields as two rows in a table, that is fine, but i have a modification i need on that. how can i present those same two fields as a single row in the

[web2py] Re: "Converting" SQLite to DAL?

2013-04-19 Thread Cliff Kachinske
Pardon me if I'm telling you things you already know. For the short version, skip to the bottom two paragraphs. You can think of a db driven application as having several layers. The bottom layer is the database engine and the rdbms. For this simplicity I'm discussing them as one unit, thoug

[web2py] saving UPS shipping labels

2013-04-19 Thread Jim Gregory
I'm working on a script to generate UPS shipping labels and save them on our server. The shipping labels are passed as binary data in an XML file from UPS. I am using the ClassicUPS library to parse the XML file and save the data. I wrote a simple script to test the library, and it works OK w

[web2py] Re: Alternative to SQLFORM for Angular

2013-04-19 Thread RHC
Thinking about this some more, what I would like would be for a controller to generate this json: { form: { fields: [ {name: 'id', type: 'int', value: 234, error: '', comment: ''}, {name: 'title', type: 'string', length: 100, value: 'My Test Record', error: '', comment: '

Re: [web2py] Re: costum error log

2013-04-19 Thread BlueShadow
well that was my personal trial to get a 400 error. I just want to find out why there are about 5-10 400 errors on my webpage per day. and if they are caused by some bad bots or something. So I can lock them out with my firewall. If its just typos I won't do a thing. Right now I'm saving the req

[web2py] Re: No `Field`s generated by 'extract_sqlite_models.py'

2013-04-19 Thread Niphlod
it should be a problem related to regexes finding the right things in your database. the script starts issuing the query select name,sql from sqlite_master where type='table' and not name like '\_%' and not lower(name) like 'sqlite_%' you can start from there and see where it breaks. PS

Re: [web2py] Re: costum error log

2013-04-19 Thread Niphlod
given that you want a ready-to-use solution, can you give an example ? with /app/controller/function"#" you can't get what follows #, but the first " is in requested_uri as it should be. On Friday, April 19, 2013 8:53:52 PM UTC+2, BlueShadow wrote: > > Thats no anchor thats the first random cha

[web2py] Re: How to count views of a record in forms

2013-04-19 Thread Niphlod
goes with more or less the same check. whenever a record is displayed (pressing the "view" button) , there's a 'view' in request.args. On Friday, April 19, 2013 9:02:41 PM UTC+2, Alex Glaros wrote: > > Here is the controller: > > def search_shared_services(): > grid = SQLFORM.smartgrid(db

[web2py] Re: How to count views of a record in forms

2013-04-19 Thread Alex Glaros
Here is the controller: def search_shared_services(): grid = SQLFORM.smartgrid(db.SharedService, linked_tables=[ 'SharedServicePartnerIntersection'], maxtextlength={'SharedServicePartnerIntersection.sharedServiceID':140, 'SharedService.shortSharedServiceTitle':140, 'SharedService.shortSh

Re: [web2py] Re: costum error log

2013-04-19 Thread Kevin Bethke
Thats no anchor thats the first random character i found. Try it it fails. Code 400 Am 19.04.2013 20:50 schrieb "Niphlod" : > uhm you can't (even in a normal request) have the value that is > assigned with an #anchor (call it anchor, fragment, whatever) ... that > doesn't get passed to the web

[web2py] Re: costum error log

2013-04-19 Thread Niphlod
uhm you can't (even in a normal request) have the value that is assigned with an #anchor (call it anchor, fragment, whatever) ... that doesn't get passed to the webserverso you can't have a page that fails because of that #part On Friday, April 19, 2013 8:22:21 PM UTC+2, BlueShadow wrot

Re: [web2py] Re: "access denied" not available in translate page

2013-04-19 Thread Niphlod
the simpler thing is specifying your own "access denied page" with auth.settings.on_failed_authorization = URL('whatever', 'needs_to_be') and code one with as much customizations as you like. Don't overlook "error pages" templates: they play a pretty big role in every application, if you want t

[web2py] Re: How to count views of a record in forms

2013-04-19 Thread Niphlod
grid: if request.args(-3) == 'view': add +1 factory: you know that already, you have to pass it crud: same as factory sqlform : same as factory What's the issue ? On Friday, April 19, 2013 7:19:19 PM UTC+2, Alex Glaros wrote: > > I want to count how many web users have looked at a record.

[web2py] Re: How to count views of a record in forms

2013-04-19 Thread Anthony
I suppose it depends on how the record is being viewed -- do you already have code that displays the record? Generally, you might add something like a "views" field to the table (defaulting to 0) and increment the value every time a record is displayed. Anthony On Friday, April 19, 2013 1:19:1

[web2py] costum error log

2013-04-19 Thread BlueShadow
Hi I got a custum error page which saves some of the data to give me a quick overview of the why those errors happen. it stores the error code the request.url and the useragent. my problem is I get a bunch of 400 errors. and I want to know what the users/bots typed in exactly. request_uri gives

[web2py] How to count views of a record in forms

2013-04-19 Thread Alex Glaros
I want to count how many web users have looked at a record. If a user uses a web2py form (sqlform, factory, crud, etc.) to search for a record, and then opens and views that record, how can I keep track of that view? I'd like to keep a total count of the number of times the record was viewed.

[web2py] No `Field`s generated by 'extract_sqlite_models.py'

2013-04-19 Thread Alec Taylor
Using aforementioned script I get no `Field`s in the generated DAL schema; all I get are the table names. For example: CREATE TABLE "OeTy"("OfNa" varchar(50),"FiAm" float,"Of A" smallint,"OfSt" varchar(255)); Becomes: legacy_db.define_table('OeTy', migrate=False) How do I get this to w

Re: [web2py] Re: "access denied" not available in translate page

2013-04-19 Thread António Ramos
Your are "dead" right! :) 2013/4/19 Niphlod > with my Jedi powers I see through the fog .. I think he means this > > https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2937 > > > On Friday, April 19, 2013 6:13:41 PM UTC+2, Massimo Di Pierro wrote: >> >> Some context would be helpf

[web2py] Re: "access denied" not available in translate page

2013-04-19 Thread Niphlod
with my Jedi powers I see through the fog .. I think he means this https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2937 On Friday, April 19, 2013 6:13:41 PM UTC+2, Massimo Di Pierro wrote: > > Some context would be helpful. > > On Friday, 19 April 2013 09:52:13 UTC-5, Ramos wrote

[web2py] Re: web2py server does not start automatically

2013-04-19 Thread Massimo Di Pierro
Not a good idea to run web2py (or any other web app) as root. On Friday, 19 April 2013 09:56:48 UTC-5, LightDot wrote: > > To clarify: this is probably a question of a security policy, as the > web2py process, run as root, is trying to open a browser GUI and this fails. > > You could run web2py a

[web2py] Re: "access denied" not available in translate page

2013-04-19 Thread Massimo Di Pierro
Some context would be helpful. On Friday, 19 April 2013 09:52:13 UTC-5, Ramos wrote: > > hello > > > > Not authorized is available to translate but > > "ACCESS DENIED" > is not available in translate page > web2py 2.0.* > > tku > -- --- You received this message because you are subscribed to

[web2py] Re: web2py and paradox databases

2013-04-19 Thread Niphlod
lol. Nice solution, +1 for discarding unsupported dynosaur-ages lib. -- --- 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. F

[web2py] Re: web2py and paradox databases

2013-04-19 Thread David S
Update: I decided to keep the solution as easy as possible. I found a command line paradox db converter from here: http://www.dbf2002.com/paradox-converter/index.html and used subprocess.call() to it which converts the paradox db into a .csv. Then I used import_from_csv_file() to get the data.

Re: [web2py] Re: jquery 2.0

2013-04-19 Thread Richard Vézina
+1 Anthony Richard On Fri, Apr 19, 2013 at 11:02 AM, Niphlod wrote: > +1 too. For myself, I'd wait *at least* that all my "custom jquery > plugins" are compatible with 2.0 . > To be fair, that's the most pressing issue that's bothering me, and the > reason behind pushing for live tests on web2

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Richard Vézina
Thank you again for this precious information. :) Richard On Fri, Apr 19, 2013 at 10:59 AM, Niphlod wrote: > they both process tasks. > the "line" is what I described in the previous post: if you need rapidly > firing jobs, better stick with rq, if you need periodic jobs, rq setup > needs a n

[web2py] Re: jquery 2.0

2013-04-19 Thread Niphlod
+1 too. For myself, I'd wait *at least* that all my "custom jquery plugins" are compatible with 2.0 . To be fair, that's the most pressing issue that's bothering me, and the reason behind pushing for live tests on web2py apps... ^_^ On Friday, April 19, 2013 4:47:46 PM UTC+2, LightDot wrote: > >

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Niphlod
they both process tasks. the "line" is what I described in the previous post: if you need rapidly firing jobs, better stick with rq, if you need periodic jobs, rq setup needs a new component. The only other "cons" on the rq list (but is negligible) is that it works only with redis and on unix.

[web2py] Re: web2py server does not start automatically

2013-04-19 Thread LightDot
To clarify: this is probably a question of a security policy, as the web2py process, run as root, is trying to open a browser GUI and this fails. You could run web2py as a regular user, I would actually recommend this approach. You'll probably need to chown the contents of /home/augusto/Downloa

[web2py] "access denied" not available in translate page

2013-04-19 Thread António Ramos
hello Not authorized is available to translate but "ACCESS DENIED" is not available in translate page web2py 2.0.* tku -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, s

[web2py] Re: jquery 2.0

2013-04-19 Thread LightDot
+1 On Friday, April 19, 2013 4:39:31 PM UTC+2, Anthony wrote: > > They're going to maintain the 1.x branch and keep it compatible with 2.x > for quite some time, so the scaffolding app should probably stick with 1.x > for now, as there's not much to be gained by the switch (easy enough to > swi

[web2py] Re: web2py server does not start automatically

2013-04-19 Thread LightDot
You are logged in the graphical environment as a regular user, but you're starting web2py in a terminal, as root? After the above error, if you open your web browser manually and visit: http://127.0.0.1:8000/ do you see the welcome page? Regards, Ales On Friday, April 19, 2013 3:52:56 PM UTC+2

[web2py] Re: jquery 2.0

2013-04-19 Thread Anthony
They're going to maintain the 1.x branch and keep it compatible with 2.x for quite some time, so the scaffolding app should probably stick with 1.x for now, as there's not much to be gained by the switch (easy enough to switch manually if someone desires). Anthony On Friday, April 19, 2013 9:4

[web2py] web2py server does not start automatically

2013-04-19 Thread Augusto Santos
Hi guys, I am new in web2py and I was following the tutorial to start learning and developing with web2py. But when I came across the part about starting the server I had a problem that I didn't succeed to solve. That's why I am here to kindly ask you some help. Actually, I got the GUI to star

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Richard Vézina
Thanks Niphold for the answer... Do you see other usage of the queing stack proposed by Bruno other then emails shippement... I have a couple of CRON job that I would eventually include in web2py to make thing more managable when server update for instance or new deployment. But at the date of cre

[web2py] Re: RESTful api and JSON POST data with curl

2013-04-19 Thread Brent Zeiben
Ok Thanks Niphlod Thought I could use json to prepare the data, using urllib.urlencode on the dictionary instead. Didn't have to change the curl command. Thanks again. Brent On Friday, 19 April 2013 01:52:57 UTC-6, Niphlod wrote: > > uhm... I may be wrong but request.restful accepts the a

[web2py] jquery 2.0

2013-04-19 Thread Massimo Di Pierro
it is out http://blog.jquery.com/2013/04/18/jquery-2-0-released/ drops support for IE 6,7,8. I think it may be too early to move. What do you think? Massimo -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Niphlod
python-rq is more "engineered" towards speedier "I queued it and .. voilà is executed" kind of environments. Scheduler needs to "balance" between that and "please run this every hour" scenarios (periodic) ... additionally leaving your db alone as much as possible ^_^ python-rq has an external

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Richard Vézina
Hello, First, thanks Bruno to share your experiments with python-rq, redis and queing stuff... I would like to know if this is the way to go over Scheduler for emails shippement (around 200 emails each time once or twice a weeks)? Thanks Richard On Fri, Apr 19, 2013 at 6:23 AM, Ricardo Pedros

[web2py] Re: regular expressions in DAL?

2013-04-19 Thread Niphlod
only with databases that support it and with the db.table.field.regex() syntax. Don't know how much is tested, but if doesn't work wouldn't take that much to fix it. PS: you'd have to use whatever regex syntax is supported on the backend: don't expect the same flexibility of python's regex engi

[web2py] Install web2py in virtualenv

2013-04-19 Thread Denis Rykov
Trying to install web2py in virtualenv on Ubuntu but when I run "w2p_run" I get an error "RuntimeError: Cannot determine web2py version". -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving em

[web2py] Re: Error messages for a failed insert MSSQL ... where are they?

2013-04-19 Thread LightDot
Please open a bug report if this still looks like a bug to you... Sure sounds like one, but since I didn't see the code... Regards, Ales On Friday, April 19, 2013 2:31:29 PM UTC+2, Tim Richardson wrote: > > > > On Friday, 19 April 2013 22:24:23 UTC+10, Willoughby wrote: >> >> They should show in

[web2py] Re: Error messages for a failed insert MSSQL ... where are they?

2013-04-19 Thread Tim Richardson
On Friday, 19 April 2013 22:24:23 UTC+10, Willoughby wrote: > > They should show in the ticket under "Error Traceback" > At least they do for me... > > > > On Friday, April 19, 2013 7:14:08 AM UTC-4, Tim Richardson wrote: >> >> I'm trying to insert into a MSSQL 2005 database via DAL. >> The inser

[web2py] Re: Error messages for a failed insert MSSQL ... where are they?

2013-04-19 Thread Willoughby
They should show in the ticket under "Error Traceback" At least they do for me... On Friday, April 19, 2013 7:14:08 AM UTC-4, Tim Richardson wrote: > > I'm trying to insert into a MSSQL 2005 database via DAL. > The insert fails (because I missed a column non-NULL with no default > value). > Wha

[web2py] regular expressions in DAL?

2013-04-19 Thread António Ramos
is it possible to use regular expressions in DAL queries? -- --- 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 opt

Re: [web2py] Re: Return value from javascript to controller

2013-04-19 Thread Funmanhk
Niphlod, Thank you for pointing this out. I have some serious learning ahead. Thank you for being patient with my questions. I am good with your approach below. The first suggestion works out for me, and my time zone issue is resolved. Thank you! On 19 Apr, 2013, at 15:39, Niphlod wrote:

[web2py] Error messages for a failed insert MSSQL ... where are they?

2013-04-19 Thread Tim Richardson
I'm trying to insert into a MSSQL 2005 database via DAL. The insert fails (because I missed a column non-NULL with no default value). What bothers me a bit is that I don't seem to get an error message anywhere. The insert returns None rather than the ID which makes sense. I see nothing in sql.log.

Re: [web2py] Re: Return value from javascript to controller

2013-04-19 Thread fun man
Thanks again, Niphlod. I am getting close to finish what i want to do :-) I can see that I get the time zone. After changing the timezone a few times, I am not seeing it any more. I am trying to trouble shoot this. I figured that i need to close my browser, but this doesn't seem to make it wo

[web2py] pam authentication works?

2013-04-19 Thread danny
I must be doing something wrong, but just following the manual instructions for PAM authentication I get ... global name 'username' not defined even before I try to login. changing auth.settings.login_methods.append(pam_auth() ) to auth.settings.login_methods.append(pam_auth) solved

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Ricardo Pedroso
On Thu, Apr 18, 2013 at 10:02 PM, Niphlod wrote: > PS: on the web2py process side, it seems that at most 10 connections are > istantiated with Redis: is there a connection pool? I guess, because you are running the web server with 10 threads. python redis by default use a connection pool... see b

[web2py] Need help getting "cgihandler.py" to work

2013-04-19 Thread Alec Taylor
I have a server which only supports talking to Python using CGI. It also requires a custom shebang line. I was able to get the sample one working, from: http://wiki.python.org/moin/CgiScripts But I can't figure out how to make the "cgihandler.py" version work. Thanks for all suggestions, Alec T

[web2py] Re: Custom IS IN DB

2013-04-19 Thread Domagoj Kovač
Thanks, that is what i need. -- --- 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.go

[web2py] Re: Custom IS IN DB

2013-04-19 Thread Niphlod
look at http://web2py.com/books/default/chapter/29/07#Database-validators ... there are snippets that show you how you can "tune" the set of allowed parameters. On Friday, April 19, 2013 11:47:25 AM UTC+2, Domagoj Kovač wrote: > > Hi, > > i have a table of attributes like this: > > ID field_name

[web2py] Custom IS IN DB

2013-04-19 Thread Domagoj Kovač
Hi, i have a table of attributes like this: ID field_name field_type 4 name STRING 5 description TEXT 6 power INTEGER 7 available BOOLEAN 8 price DECIMAL 9 date_of_entry DATE 11 companies STRING-LOV Each of this entries represents field on a form. Type STRING-LOV

Re: [web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Ricardo Pedroso
On Fri, Apr 19, 2013 at 10:01 AM, BlueShadow wrote: > I did now and I can't import it in python: > ImportError: No module named gubby > Dont know if is a copy paste typo, but is guppy not gubby Anyway: Since you are using cache.disk, the cache file is simply a shelve file you can inspect it wit

[web2py] Re: populate upload field type and store it in blob type field

2013-04-19 Thread 黄祥
> > it's a matter of "precedence". there's a clean section on the book on > how to do it > > http://web2py.com/books/default/chapter/29/06?search=More+on+uploads > > it's work well now, thank you so much for your pointer, niphlod. if db(db.test2).isempty(): stream = open('./applications/

[web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Niphlod
this is what appadmin does from guppy import hpy hp = hpy() On Friday, April 19, 2013 11:01:56 AM UTC+2, BlueShadow wrote: > > I did now and I can't import it in python: > ImportError: No module named gubby > > > On Friday, April 19, 2013 9:54:08 AM UTC+2, Niphlod wrote: >> >> did you try openin

[web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread BlueShadow
I did now and I can't import it in python: ImportError: No module named gubby On Friday, April 19, 2013 9:54:08 AM UTC+2, Niphlod wrote: > > did you try opening a python shell and seeing if you can still import > guppy (i.e. it wasn't removed after all) ? > > On Thursday, April 18, 2013 11:51:05

[web2py] Re: populate upload field type and store it in blob type field

2013-04-19 Thread Niphlod
it's a matter of "precedence". there's a clean section on the book on how to do it http://web2py.com/books/default/chapter/29/06?search=More+on+uploads PS: you're importing populate from gluon.contrib but not using it: are you sure you need it ? On Friday, April 19, 2013 9:44:25 AM UTC+2,

[web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Niphlod
did you try opening a python shell and seeing if you can still import guppy (i.e. it wasn't removed after all) ? On Thursday, April 18, 2013 11:51:05 PM UTC+2, BlueShadow wrote: > > I did kill all processes remotly related to web2py an uswgi and the > internet restarted all and the cache page s

[web2py] Re: RESTful api and JSON POST data with curl

2013-04-19 Thread Niphlod
uhm... I may be wrong but request.restful accepts the args as a normal page, that is a application/x-www-form-urlencoded or a multipart/form-data . with curl would be something like curl -d name=blablabla -d otherparameter=blablabla http://theurl On Friday, April 19, 2013 1:24:03 AM UTC+2,

[web2py] populate upload field type and store it in blob type field

2013-04-19 Thread 黄祥
hi, i've made comparison for populate upload field type which is test1 doesn't store it in blob type field and test2 store it in blob type field the result is test1 success to save the image file, but not in the test2, it return in shell and return None in Database Administration. is it possibl

Re: [web2py] Re: Return value from javascript to controller

2013-04-19 Thread Niphlod
fast_tz_detector returns a SCRIPT(). Of course you can't "read it" because the page executes it, so it's fine if you see a blank space: If you see the page source (using firefox, right click --> View page source) you'd see a blablablabla On the "let's save it to the database" topic . try i

Re: [web2py] Problem with the search when using two SQLFORM.grid on the same web page

2013-04-19 Thread Yuval
Great answer, I was not aware of this, Thank you. On Friday, April 19, 2013, Niphlod wrote: > this is an excerpt from the book > > Because of the way grid works one can only have one grid per controller > function, unless they are embedded as components via LOAD. To make the > default search grid

[web2py] Re: Problem with the search when using two SQLFORM.grid on the same web page

2013-04-19 Thread Niphlod
this is an excerpt from the book Because of the way grid works one can only have one grid per controller function, unless they are embedded as components via LOAD. To make the default search grid work in more than one LOADed grid, please use a different formname for each one. So, 2 steps requi