[web2py] Re: authenticate against a secondary users table

2013-06-10 Thread Annet
I had a similar problem to solve and tried several solutions. The one that worked best for me is a 'super' table 'node' and 'sub' tables 'organization', 'person' and 'groups' (groups because group is a reserved word) and in the auth_user table a field referencing the id of table 'node'. Table

Re: [web2py] Re: apache-modwsgi problem

2013-06-10 Thread Johann Spies
Sometimes the app does not react on web requests. Restarting apache sometimes helps. That is why I went to the Apache logs to find out what was going on. Regards Johann On 6 June 2013 21:01, Niphlod niph...@gmail.com wrote: ehm... I maybe missing something but your traceback starts here

[web2py] what is syntax for concatenating differently formatted represents clauses?

2013-06-10 Thread Alex Glaros
I'm trying to concatenate the results of two represents clauses for the same field: relationshipTypeIDThe first represents clause returns subjectAreaCode and the second returns relationshipTypeCode. Without all the queries, this could normally be accomplished by '%(field_1)s

Re: [web2py] Re: Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread Jason (spot) Brower
HI, I'm not totally sure what the gpio file is about, but an easy way to do it is to have while loop in a python file. Each time it goes through the loop it can do things like check the serial line for sensor data, run any automated items like turning on the lights in the evening, and read for

Re: [web2py] Re: Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread António Ramos
Sorry to disappoint you but raspberry pi go a lot better with nodejs javascrcipt framework.Almost no CPU usage check this http://pijs.io/ 2013/6/10 Jason (spot) Brower encomp...@gmail.com HI, I'm not totally sure what the gpio file is about, but an easy way to do it is to have while

Re: [web2py] Re: Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread Jason (spot) Brower
Sounds interesting. Personally my system ran with very little cpu at all. There are way to make it run effeciently. Node is a fun new technology, but I personally don't trust it for commercial use yet. It's still at that young and fragmenting stage so the technology could change to fast. :) Have

Re: [web2py] Re: Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread freak...@gmail.com
Thanks Jason and Antonio for your help. Jason, thanks for the additional tips and info. You are right is not web2py related, it's just python related when it comes to having the GPIO working, then again anything assembled with web2py is related to it... the GPIO file contains that while loop

[web2py] Re: how to do a google search

2013-06-10 Thread Massimo Di Pierro
If you want to return the results in a google results page it is easy form action=https://www.google.com/search; input name=q/ input type=submit value=search / /form If instead you want to send the query to your server, you want the server to ask google and return the results in JSON, than you

[web2py] Re: Combining rows

2013-06-10 Thread Massimo Di Pierro
locs=[row for row in dept_locs if row.id in todept_locs.as_dict()] The . was missing. On Monday, 10 June 2013 00:21:43 UTC-5, webpypy wrote: locs=[row for row in dept_locs if row.id in todept_locs as_dict()] is invalid syntax. what is the problem? -- --- You received this

[web2py] Web2py app creation from command line

2013-06-10 Thread Muqeet Khan
Hi, I am trying to create a web2py app from command line with -S ... However, I would like to create an app without the No app, Create one? question. Is there someway I can create it in a forceful manner. I have tried app_create() from gluon.admin but there I face the problem of the

[web2py] Re: Web2py app creation from command line

2013-06-10 Thread Massimo Di Pierro
Assuming you are under the web2py folder using the linux Bash shell you can do mkdir applications/appname cd applications/appname tar zxvf ../../welcome.w2p If instead you want to do it from Python, also assuming you are in the web2py folder: import os from gluon.admin import w2p_unpack

[web2py] Multitenancy

2013-06-10 Thread Domagoj Kovač
Hi, I have multitenancy application, in my application i have a table called countries where i have fields: id name alpha_2_code alpha_3_code numeric_code request_tenant My loged user has request tenant value of 3 but in my log i see query without this condition: SELECT country.id,

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread António Ramos
I' not spanishhh. Portuguese from Portugal. I have a web2py app to control all outside workers via an RFID reader. I use arduino to read the card and send it via serial. Then in the local PC I have nodejs to read it and call a web2py service that via tornado sockets updates a web page. My web2py

[web2py] Re: Multitenancy

2013-06-10 Thread Domagoj Kovač
I found the solution to my problem but i still dont understand why this doesnt workd like it should. Line: rows = db().select(db.country.ALL, limitby=limit_by) Must be: rows = db(db.country.id 0).select(db.country.ALL, limitby=limit_by) And then request_teneant = 3 is added as a condition

[web2py] Web2py Layout Pluggin

2013-06-10 Thread Apoorve Mohan
Hello All I am using the layout pluggin's provided by web2py and I observed that browser independence and screen resolution independence has not been handled properly in them. Can anyone suggest me how to resolve these problem??? -- Thanks Apoorve -- --- You received this message

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
OK, I'm starting to think it's a wrongly defined table. The table I would like to import has following structure: CREATE TABLE `cities` ( `ID` int(8) unsigned NOT NULL auto_increment, `country` char(2) NOT NULL, `region` char(3) NOT NULL, `url` varchar(50) NOT NULL, `name` varchar(50)

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
Yeah, the question is: how 'country' can be a UNIQUE KEY if countries have hundreds of cities. In the table, hundreds of cities will have the belong to the same country, so the no wonder the contry code (which is two letters) will not be unique. I'm confused. On Monday, June 10, 2013 12:59:26

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
Further with my monolog... Seems I need to implement this im my table definition: UNIQUE KEY `country` USING BTREE (`country`,`name`,`region`) How do I do it in web2py? On Monday, June 10, 2013 1:24:20 PM UTC+2, lesssugar wrote: Yeah, the question is: how 'country' can be a UNIQUE KEY if

Re: [web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'

2013-06-10 Thread Alok Joshi
Thanks. (Sorry for the ugly font size in my earlier related message.) On Sun, Jun 9, 2013 at 2:59 PM, Alan Etkin spame...@gmail.com wrote: is it my web2py version which gets used? My bad, I meant the web2py instance in pythonanywhere -- --- You received this message because you are

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
OK, found a way around. I executed the following commands in postgres and the CSV file imported correctly: ALTER TABLE city DROP CONSTRAINT city_country_key; ALTER TABLE city ADD CONSTRAINT city_country_key UNIQUE (name, country,region ); Cheers. On Monday, June 10, 2013 1:36:47 PM UTC+2,

[web2py] Re: Web2py Layout Pluggin

2013-06-10 Thread Anthony
I think most of those templates come from http://www.freecsstemplates.org/ and pre-date responsive design principles. It's all HTML and CSS, so you'll have to consult other resources to figure out how to achieve what you want. If you have specific questions (particularly that are specific to

[web2py] Trigger for the primary key on oracle database

2013-06-10 Thread Lionel Tokarz
Hello, I'm using web2py since a few months and this is my first message on this group. I hope it's the right place to report what seems to be a little bug. I'm actually developping a web2py application on top of an oracle database. By convention, all the primary keys of the database

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread Massimo Di Pierro
Tell us more. Have some pictures or screenshots? On Monday, 10 June 2013 05:21:50 UTC-5, Ramos wrote: I' not spanishhh. Portuguese from Portugal. I have a web2py app to control all outside workers via an RFID reader. I use arduino to read the card and send it via serial. Then in the

[web2py] Re: Trigger for the primary key on oracle database

2013-06-10 Thread Massimo Di Pierro
Thank you. Can you please open a ticket about this? On Monday, 10 June 2013 05:28:16 UTC-5, Lionel Tokarz wrote: Hello, I'm using web2py since a few months and this is my first message on this group. I hope it's the right place to report what seems to be a little bug. I'm

[web2py] Re: Multitenancy

2013-06-10 Thread Massimo Di Pierro
It is a bug. Please open a ticket about this (there may actually already be a ticket about this). On Monday, 10 June 2013 05:25:26 UTC-5, Domagoj Kovač wrote: I found the solution to my problem but i still dont understand why this doesnt workd like it should. Line: rows =

[web2py] Publish an app on web2py poweredby or appliances?

2013-06-10 Thread Loïc
Hello all What are the steps to publish a website/app on web2py poweredby or appliances? Thank you -- --- 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] Rendering null values in SQLFORM.grid

2013-06-10 Thread Lamps902
If there's a NULL value in my postgresql DB, SQLFORM.grid renders it as None. Is it there something that can be done globally for an SQLFORM.grid that would simply make it display all NULL values as an empty string (i.e. not display anything in the grid for NULLs), or does that have to be

[web2py] Re: what is syntax for concatenating differently formatted represents clauses?

2013-06-10 Thread Anthony
You could do both queries within the lambda and put the results together with string formatting: lambda id, r: '%s %s' % ( db((db.RelationshipType.id==id) (db.RelationshipSubjectArea.id == db.RelationshipType. relationshipSubjectAreaID)

[web2py] Re: Trigger for the primary key on oracle database

2013-06-10 Thread Lionel Tokarz
Ok, I will report it on google code this evening. Le lundi 10 juin 2013 15:16:08 UTC+2, Massimo Di Pierro a écrit : Thank you. Can you please open a ticket about this? On Monday, 10 June 2013 05:28:16 UTC-5, Lionel Tokarz wrote: Hello, I'm using web2py since a few months and this is

[web2py] Re: Publish an app on web2py poweredby or appliances?

2013-06-10 Thread Anthony
If it's a live site or a demo of an open source project, then you can post it on the poweredby site yourself (click the Site Create link at the top). If it's just code but you don't have a site running it, then it doesn't belong on poweredby. To post in appliances, the request goes to Massimo.

[web2py] Re: requires_login() not working for second instance of auth

2013-06-10 Thread Anthony
I started a discussion about it here: https://groups.google.com/d/msg/web2py-developers/E9ug6m6WHhE/XkPjiojqTOIJ. I was think it might be possible to just specify a base prefix which would get used both to name the session object and to prefix all the table names (the default would be auth,

Re: [web2py] Re: web2canvas looks nice

2013-06-10 Thread Michael Herman
Interesting. There's huge potential for projects like this: - http://javelinapp.com/ (http://pandodaily.com/2013/06/10/javelin-the-lean-startup-app-thats-a-product-of-lean-startup-methodology/) - http://www.kickstarter.com/projects/jmitchel3/coding-for-entrepreneurs/?ref=kicktraq

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread António Ramos
I´m working on putting here some screenshots or a video showing it. So far My arduino hardware... https://www.dropbox.com/s/rii867stp80pp5z/2013-05-09%2011.15.07.jpg https://www.dropbox.com/s/0vpsfluq3z0kub4/2013-05-09%2012.17.46.jpg I use: fullcalendar pypdf for the printing cards on the rfid

[web2py] Re: Trigger for the primary key on oracle database

2013-06-10 Thread Niphlod
uhm. I'm not sure I understood what is the bug if you defined tables as db.define_table('somwthing', Field('acc_rn', 'id'), Field('...'), ) Il giorno lunedì 10 giugno 2013 15:56:53 UTC+2, Lionel Tokarz ha scritto: Ok, I will report it on google code this evening. Le

[web2py] Re: Rendering null values in SQLFORM.grid

2013-06-10 Thread Niphlod
The second one you said (i.e. altering the default repr for None values). From a theoretical standpoint, a null value is not an empty string. If your app doesn't care for the difference, set a default='' on the interested fields. Il giorno lunedì 10 giugno 2013 15:42:21 UTC+2, Lamps902 ha

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread Niphlod
sorry to interrupt your monologue but, BTW, web2py's table definition has no notion of compound unique indexes, so the only way to enforce them (if you need those) is to alter the table manually (as you did). Il giorno lunedì 10 giugno 2013 14:51:05 UTC+2, lesssugar ha scritto: OK, found a

[web2py] Re: No module named plural_rules errro after upgrade

2013-06-10 Thread Niphlod
do you have a VERSION file in the folder ? Il giorno domenica 9 giugno 2013 22:44:36 UTC+2, mike dawson ha scritto: I downloaded the latest zip file from the web site and unzipped it to /usr/share/web2py folder (after deleting the old copy that had been there) On Sunday, 9 June 2013

[web2py] Re: Rendering null values in SQLFORM.grid

2013-06-10 Thread Lamps902
Thanks for the clarification, Niphlod. On Monday, June 10, 2013 10:32:33 AM UTC-5, Niphlod wrote: The second one you said (i.e. altering the default repr for None values). From a theoretical standpoint, a null value is not an empty string. If your app doesn't care for the difference, set a

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Andre Kozaczka
Correct, the column not found is the eft one. Below is the error message: class 'gluon.contrib.pymysql.err.InternalError' (1050, uTable 'auth_user' already exists)Versionweb2py™Version 2.5.1-stable+timestamp.2013.06.06.15.39.19Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Andre Kozaczka
Also, to clarify I'm trying to add this column after I've done some development and already had an auth_user table created... don't think this should matter, but wanted to throw this out there. Maybe I need to manually drop the MySQL table and then see if the migration works with the

[web2py] Re: Combining rows

2013-06-10 Thread webpypy
Thank you, Massimo. the following works fine. locs=[row for row in dept_locs if row in todept_locs] is as_dict() not mandatory all the time? Please, explain. Regards, Ashraf -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Re: PostgreSQL: duplicate key value...

2013-06-10 Thread lesssugar
Good to know, thanks. W dniu poniedziałek, 10 czerwca 2013 17:35:04 UTC+2 użytkownik Niphlod napisał: sorry to interrupt your monologue but, BTW, web2py's table definition has no notion of compound unique indexes, so the only way to enforce them (if you need those) is to alter the table

[web2py] Key/constraint issue when using separate database for archiving

2013-06-10 Thread Lamps902
I've asked this one before, but didn't get an answer; perhaps I was being too vague, so I'll give it another shot with more detail: I've got a primary postgresql database (db1), and I've set up a separate postgresql database (db1_archive) used for archiving several of the tables from db1.

[web2py] Does Windows multilingual support need ICU SQLite extension?

2013-06-10 Thread step
I am using the Windows web2py.exe binary version Version 2.4.7-stable+timestamp.2013.05.29.16.40.45. I need to know if web2py.exe supports multilingual, case-independed matches, such as SELECT FIELD LIKE 'à' -- should match when field value is 'À' (uppercase) and field is defined as FIELD TEXT

[web2py] Re: Trigger for the primary key on oracle database

2013-06-10 Thread Lionel Tokarz
That's exactly how I define the tables. In fact the bug appears when web2py generate the database. As there is no automatic numbering in Oracle, it needs to generate a sequence containing the value of the primary key and a trigger that get a new number and attribute it to the primary key of a

[web2py] Re: Does Windows multilingual support need ICU SQLite extension?

2013-06-10 Thread Massimo Di Pierro
On Monday, 10 June 2013 10:14:36 UTC-5, step wrote: I am using the Windows web2py.exe binary version Version 2.4.7-stable+timestamp.2013.05.29.16.40.45. I need to know if web2py.exe supports multilingual, case-independed matches, such as SELECT FIELD LIKE 'à' -- should match when field

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Massimo Di Pierro
Try, in order: 1) db = DAL(...,fake_migrate=True) ... # auth.settings.extra_fields['auth_user'] = [Field('eft', 'integer')] auth.define_tables(migrate=True) run appadmin. 2) db = DAL(...) ... auth.settings.extra_fields['auth_user'] = [Field('eft', 'integer')] auth.define_tables(migrate=True)

[web2py] Re: Combining rows

2013-06-10 Thread Massimo Di Pierro
It should not work without .as_dict(). Are you sure it does? On Monday, 10 June 2013 10:53:07 UTC-5, webpypy wrote: Thank you, Massimo. the following works fine. locs=[row for row in dept_locs if row in todept_locs] is as_dict() not mandatory all the time? Please, explain. Regards,

[web2py] Re: what is syntax for concatenating differently formatted represents clauses?

2013-06-10 Thread Alex Glaros
The 2nd example, function, gets an error: - In the controller the function error is: type 'exceptions.NameError' name 'rtid_represent' is not defined - If I put the function in the model, error is: type 'exceptions.SyntaxError' 'return' outside function (db.py, line 1013) The

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Andre Kozaczka
Tried step 1. I get the same 'auth_user' table already exists. class 'gluon.contrib.pymysql.err.InternalError' (1050, uTable 'auth_user' already exists) Step 2 gave the same error. Seems like whenever migrate is set to True when define_tables is run, I'm getting the table already exists

[web2py] Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Carl
I am passing the string {'POST' : 'query POST'} to my Web2py server code. Looking at gluon/main/py and tracing into sj.load(body) at line 225 leads to Python/Lib/json/decoder.py but eventually gets to errmsg(), line 36, with msg = Expecting proper name. doc = [{'POST' : 'qwerty POST'}] pos = 2

[web2py] Re: Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Derek
Post the whole traceback. Also, I just want to make the comment that what you put here is not valid json... {'POST' : 'query POST'} Single quotes aren't allowed. Verify your json by going here: http://jsonlint.com/ Also, before using JSON you might want to read the spec. http://www.json.org/

[web2py] Re: No module named plural_rules errro after upgrade

2013-06-10 Thread mike dawson
Yes I had a VERSION file in the folder. Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 This is now fixed. I deleted the folder again I uninstalled the binary version I unpacked the zip file into a new folder as superuser Started superuser terminal session cd in /usr/share/web2py I ran python

[web2py] Re: Customize SQLFORM.grid fields

2013-06-10 Thread keeperdss
Thanks for the reply, Niphlod. Now there was the following question: I add the following lines to the controller before the grid = SQLFORM.grid ... warn = db.executesql ('SELECT t.level_warn FROM TEMPER_RC t;') for val in warn: if (val == (1)): db.TEMPER_RC.level_warn.represent

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread freak...@gmail.com
Sorry my bad deduction ;P Eu no falo Portugues (only IT/EN/ES)... but in all cases: muito obrigado Antonio! :D On Jun 10, 2013, at 6:21 AM, António Ramos wrote: I' not spanishhh. Portuguese from Portugal. I have a web2py app to control all outside workers via an RFID reader. I use

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread freak...@gmail.com
Very interesting indeed! I'd love to read your blog/tutorial or watch your video on this project. Very interesting one... btw I love the wooden box for the RFID. Keep up the great work Antonio! Cheers! :) On Jun 10, 2013, at 10:46 AM, António Ramos wrote: I´m working on putting here some

[web2py] Re: Cheaper hosting...

2013-06-10 Thread Scott Williams
I've been a Fibervolt customer for about a year. When it's up the performance is great, but recently there's been frequent downtime at both LA and Chicago. Even though they advertise 99.9% uptime, according to serverbear.com they actually only get 81.74% currently. Right now the Chicago Data

[web2py] Re: Customize SQLFORM.grid fields

2013-06-10 Thread Niphlod
there are multiple errors (and lots of unnecessary parenthesis). first of all, define a single function to represent your value def represent_colored(value): if value == 1: return .. --green elif value == 2: yellow elif value == 3:

[web2py] Re: No module named plural_rules errro after upgrade

2013-06-10 Thread Niphlod
I'm quite confident that you did something wrong cause usually the binary distribution works only on windows. Anyway, I'm glad you resolved ^_^ On Monday, June 10, 2013 7:20:31 PM UTC+2, mike dawson wrote: Yes I had a VERSION file in the folder. Version

[web2py] Re: Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Niphlod
uhm. web2py handles usual encoded forms in multipart/form-data and application/x-www-form-urlencoded without problems. Additionally recent releases parse automatically into request.vars all requests that POST a json body if they're handled with content-type : application/json. Inspect your

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Niphlod
so probably you don't have an *_auth_user.table in the databases/* folder. Can you confirm ? On Monday, June 10, 2013 6:38:18 PM UTC+2, Andre Kozaczka wrote: Tried step 1. I get the same 'auth_user' table already exists. class 'gluon.contrib.pymysql.err.InternalError' (1050, uTable

[web2py] google groups losing posts?

2013-06-10 Thread step
Earlier today I posted a message to this group via google groups web interface. My message still isn't showing in google groups, but it is in the osdir archive of google groups? Is this normal or is google groups web interface not trustworthy? Link to my OP

Re: [web2py] Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Carl Roach
JSON isn't Python :) Of course single quotes was the issue! I've now got data from my Java GWT client app. I'm using JSON because JavaScript luvs JSON and GWT overlays makes handling such data very straightforward. On Monday, 10 June 2013, Niphlod wrote: uhm. web2py handles usual encoded

[web2py] Re: Trigger for the primary key on oracle database

2013-06-10 Thread Niphlod
now I understand. Usually you use web2py with 'id' when web2py handles the creation of the tables, but you can use Field('whatever', 'id') with legacy tables that already exist. You, on the other hand, need to have a Field('whatever', 'id') in tables directly managed with web2py. That was the

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Andre Kozaczka
Correct, I do *not* have that file in the databases folder. On Monday, June 10, 2013 3:16:42 PM UTC-4, Niphlod wrote: so probably you don't have an *_auth_user.table in the databases/* folder. Can you confirm ? On Monday, June 10, 2013 6:38:18 PM UTC+2, Andre Kozaczka wrote: Tried step 1.

[web2py] Re: Key/constraint issue when using separate database for archiving

2013-06-10 Thread Niphlod
I'd go for filing a bug on web2py's issues and just removing the constraint on your archive tables. nothing should break. I think that the code creating the archive tables is just the one used to create the original one, so the archive table gets created with the same constraint as the

[web2py] Re: Trigger for the primary key on oracle database

2013-06-10 Thread Lionel Tokarz
No problem, I was probably not explicit enough in my first message. I will create the issue, even if I found a working solution, I think it could be useful for other people. btw, thanks for the answers and the reactivity. -- --- You received this message because you are subscribed to the

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread Massimo Di Pierro
Yes the wooden box is fantastic! On Monday, 10 June 2013 13:51:06 UTC-5, freäk qnc wrote: Very interesting indeed! I'd love to read your blog/tutorial or watch your video on this project. Very interesting one... btw I love the wooden box for the RFID. Keep up the great work Antonio!

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Niphlod
that's why web2py is trying to create a table on your database. let's try this db = DAL(., fake_migrate=True) #auth.extra_fields[''] = auth.define_tables(fake_migrate=True) this will recreate the relevant file. Be sure to comment out your extra_fields definition so the fake

[web2py] Re: Error when modifying auth_user table

2013-06-10 Thread Andre Kozaczka
Worked as described. Thank you! On Monday, June 10, 2013 4:03:24 PM UTC-4, Niphlod wrote: that's why web2py is trying to create a table on your database. let's try this db = DAL(., fake_migrate=True) #auth.extra_fields[''] = auth.define_tables(fake_migrate=True) this will

Re: [web2py] Raspberry Pi GPIO home automation by willq44 - Customization

2013-06-10 Thread António Ramos
The woden box its one piece only with a hole to fix the arduino nano and the rfid reader. A friend made it. I asked him to make another one. I need 2 boxes, one to be used in the entrance of our company, so users can pass the card to enter. The other to be used by our security dept to issue cards

[web2py] Re: IOS, Json, Web2py.

2013-06-10 Thread Philipp Müller
So far, this seems to work fine. I struggle though when trying to write this data in my database. I tried doing: data = sj.loads(request.body.read()) #and later return dict(db.someDatabase.insert(data)) #or return dict(db.someDatabase.validate_and_insert(data)) for all of which I got the error

[web2py] Re: IOS, Json, Web2py.

2013-06-10 Thread Massimo Di Pierro
return dict(db.someDatabase.insert(**data)) #or return dict(db.someDatabase.validate_and_insert(**data)) On Monday, 10 June 2013 15:58:16 UTC-5, Philipp Müller wrote: So far, this seems to work fine. I struggle though when trying to write this data in my database. I tried doing: data =

[web2py] Re: IOS, Json, Web2py.

2013-06-10 Thread Niphlod
ps: recent web2py releases should parse application/json POSTs transparently, no need to request.body.read() anymore it goes all in request.vars and request.post_vars as usual. On Monday, June 10, 2013 11:02:36 PM UTC+2, Massimo Di Pierro wrote: return dict(db.someDatabase.insert(**data))

[web2py] Re: IOS, Json, Web2py.

2013-06-10 Thread Philipp Müller
Thanks so much. This works for dict(db.someTable.validate_and_insert(**data)) but for some reason not for dict(db.someTable.insert(**data)) That's fine for me, I'm just wondering though. Btw: What exactly does ** do in this case? Thanks again and regards, Philipp Am Montag, 10. Juni 2013

[web2py] Re: mod_rewrite problems on Apache

2013-06-10 Thread thinkwell
Thank you very much for that suggestion! It solved my problem, for which I'm most appreciative. Thanks jonten! On Sunday, June 9, 2013 5:17:47 PM UTC-4, jonten wrote: I had a similar problem when I recently did a setup with Web2py and Apache which I did not want to dedicate to the directory

[web2py] using _after_delete callback when enable_record_versioning() is used

2013-06-10 Thread Lamps902
When enable_record_versioning is being utilized, db rows aren't actually deleted, but the is_active bit is flipped off instead. As far as I can tell, this means that the _after_delete callback for a given table won't be called, which is problematic when you are using this callback to

[web2py] Re: Key/constraint issue when using separate database for archiving

2013-06-10 Thread Lamps902
Thanks a lot, Niphlod! I'll go ahead and file it. On Monday, June 10, 2013 2:29:38 PM UTC-5, Niphlod wrote: I'd go for filing a bug on web2py's issues and just removing the constraint on your archive tables. nothing should break. I think that the code creating the archive tables is just the

[web2py] Re: http://web2py.com/plugins is broken

2013-06-10 Thread Oleg
does anybody know what happens to web2py.com/plugins? :) On Monday, 10 June 2013 04:16:59 UTC+2, Oleg wrote: subj. -- --- 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: Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Derek
I've frankly never tried to pass two values with the same name, so I have no idea how I'd do it. I suppose I'd extend the CSV beyond the RFC 4180 by adding in subfields and a seperator of '^' as is commonly done. Yes, building your own serialization is a task to be done. You'd have to do that

[web2py] Re: google groups losing posts?

2013-06-10 Thread LightDot
I could see your original post trough the web interface and I still see it, the link to it is https://groups.google.com/d/msg/web2py/8wMlTzRixq0/udOdjEerFeUJ I've seen others mention that posts sometimes disappear and I had this happen once to me... And it was one of the longest posts I've

[web2py] Re: web2py 2.4.7 is Out

2013-06-10 Thread Aurelio Tinio
Hi Massimo, I haven't been able to isolate the reason for our memory leak other than having it be triggered when encountering an unknown page (i.e. 404 page). The investigation continues and will definitely keep you posted, especially if the problem is with web2py and not our own application

[web2py] Re: requires_login() not working for second instance of auth

2013-06-10 Thread André Kablu
I wrote some code here extending auth to create different sessions... Then I could create here the second instance of Auth... However I strongly think you are right... do all that code is not worth... too much code and handling to solve a minor problem... the field in the auth table is much

[web2py] Re: IOS, Json, Web2py.

2013-06-10 Thread Massimo Di Pierro
welll... this should work: db.someTable.insert(**data) but insert returns a number (actually a Reference object) and therefore you cannot pass it to a dict as in: dict(db.someTable.insert(**data)) Insert and validate returns a dict instead (containing the id and errors) On Monday, 10

[web2py] Re: web2py 2.4.7 is Out

2013-06-10 Thread Massimo Di Pierro
I do not have a good answer but with of all I would try isolate the problem. Can you reproduce it with the built-in web server? Can you reproduce it with a smaller application? Can you reproduce it with am app that does not use cache? etc. If you could post a minimalist code to reproduce it,

[web2py] Re: http://web2py.com/plugins is broken

2013-06-10 Thread Massimo Di Pierro
I agree there is a problem. For now I have disabled it. I will check tomorrow. I think it is a caching issue. On Monday, 10 June 2013 17:13:21 UTC-5, Oleg wrote: does anybody know what happens to web2py.com/plugins? :) On Monday, 10 June 2013 04:16:59 UTC+2, Oleg wrote: subj. -- ---

[web2py] I have an error with AutocompleteWidget

2013-06-10 Thread Luis Díaz
files presented below: controller modules models and throws error controller: ## @auth.requires_login() def update(): ubicacion = db.ubicacion(auth_user=auth_user_id) db.ubicacion.ciudad_pais.widget = SQLFORM.widgets.autocomplete( request, db.ciudad_pais.nombre, min_length=2,

[web2py] Re: using _after_delete callback when enable_record_versioning() is used

2013-06-10 Thread Anthony
Can you use the _after_update callback instead? On Monday, June 10, 2013 5:32:12 PM UTC-4, Lamps902 wrote: When enable_record_versioning is being utilized, db rows aren't actually deleted, but the is_active bit is flipped off instead. As far as I can tell, this means that the _after_delete

[web2py] Re: what is syntax for concatenating differently formatted represents clauses?

2013-06-10 Thread Anthony
On Monday, June 10, 2013 12:18:51 PM UTC-4, Alex Glaros wrote: The 2nd example, function, gets an error: - In the controller the function error is: type 'exceptions.NameError' name 'rtid_represent' is not defined - If I put the function in the model, error is: type

[web2py] Re: what is syntax for concatenating differently formatted represents clauses?

2013-06-10 Thread Alex Glaros
Anthony, I forgot that the “represent” clause could be in the controller. Yes, it works fine, thanks! I was wondering if you could help me with a problem that I’ve been submitting for months without getting any reply posts. I’m looking for a best practice example of a way to