[web2py] Re: Proposal: Documentation in form of a wiki

2015-08-18 Thread Niphlod
as long as he commits to support it for at least 2 years, go for it. Sorry but I'll stick to publish whatever recipe on web2pyslices.com for the moment. On Monday, August 17, 2015 at 11:39:45 PM UTC+2, Jaime Sempere wrote: I like the idea. I think we would need something like web2pyslices but

[web2py] Re: IIS 8.5 static file using rewrite problem

2015-08-18 Thread Niphlod
of specific user: IUSR (which is the default). Since this user is not given any direct access on the files, but following the books recipe the application pool group is. (http://www.web2py.com/books/default/chapter/29/13/deployment-recipes#IIS) Thanks anyway Niphlod! Op donderdag 13 augustus 2015

[web2py] Re: 2.12.1 is out

2015-08-17 Thread Niphlod
due to bad commit https://github.com/web2py/web2py/commit/e95115deb401552d122ff06c3482c264e02eaf32 multi-groan :P On Monday, August 17, 2015 at 4:41:25 PM UTC+2, Paolo Valleri wrote: @Massimo, I've just noticed that web2py 2.12.2 points to an old version of pydal. is that correct?

[web2py] Re: Change in application request.vars when switching from Rocket to Lighttpd+FastCGI

2015-08-14 Thread Niphlod
. Take a look at this screenshot to see. It's a real bummer as the NGINX has proven hard to install on centos 6.6. At least for us. :) On Sunday, March 1, 2015 at 10:38:37 AM UTC+2, Niphlod wrote: yep, but we do it for the users in all the important places, like this, we use

[web2py] Re: Load Balanced Server code updating

2015-08-13 Thread Niphlod
reiteration than the 1st. On Wednesday, August 12, 2015 at 5:50:10 PM UTC+2, Michael M wrote: That gives me a lot to go on. Thank-you Niphlod. I just got off the vanpool this morning and found out one of my co-workers runs some of our corporate infrastructure. He suggested I look at Puppet

[web2py] Re: IIS 8.5 static file using rewrite problem

2015-08-13 Thread Niphlod
401 means not authorized. What happens without rewrite (or incorrect ones) is usually 404 (not found) . Can you post more details about the structure of the iis site which the app belongs ? On Wednesday, August 12, 2015 at 6:01:45 PM UTC+2, Remco Boerma wrote: Hi, I'm migrating from

[web2py] Re: database query parsing

2015-08-12 Thread Niphlod
when you fetch fields from different tables, as you highlighted already, you don't have a resultset holding just columns, you have a dict holding table that hold fields. i.e. single table, named test_table with 2 fields, field_1 and field_2 will return a structure like {'field_1': value1,

[web2py] Re: Load Balanced Server code updating

2015-08-12 Thread Niphlod
the update process on several frontend servers can be split into 2 modes: you can have an incremental update, in which the newer version of the application doesn't break the old one, and the breaking update, in which the newer version of the application breaks the old one. in the first case,

[web2py] Re: Uploading app to server using ftp

2015-08-12 Thread Niphlod
if you're uploading the app, don't upload the packed version. Upload just the application structure inside the folder, as it is in your development server. On Wednesday, August 12, 2015 at 7:50:45 AM UTC+2, Joe wrote: I can't install my app on pythonanywhere server using the web2py admin

[web2py] Re: Modifying web2py JS files -- best practices?

2015-08-06 Thread Niphlod
in addition to what mdpierro said, I'd argue that the best solution is overriding, which can be done with the recent web2py.js versions. If a new version comes out, you'd need to review the changed functionality and update the custom overrides accordingly. We do this already

[web2py] Re: Oracle CLOB/text insert adapter issues

2015-08-04 Thread Niphlod
ok, we were discussing the same thing over at pydal's repo to address another issue, that is closely related . https://github.com/web2py/pydal/issues/155 On Monday, August 3, 2015 at 8:57:44 PM UTC+2, Boris Aramis Aguilar Rodríguez wrote: I've found the following: To insert a text using

[web2py] Re: Again on scheduler

2015-08-04 Thread Niphlod
repeats = 0, period = 3600 . On Tuesday, August 4, 2015 at 8:35:58 AM UTC+2, Paolo Amboni wrote: What if i need to *run an action every hour*? (Let's say to strore a data fom a sensor). I'm also trying to use cron but when i start python web2py.py -Y it gives me errors. Is there a way to

[web2py] Re: scheduler

2015-08-03 Thread Niphlod
you NEED db.commit() (not commiNt()) in the scheduler function. On Monday, August 3, 2015 at 2:20:24 PM UTC+2, Lisandro wrote: Look for the traceback information in the table scheduler_run. If the function fails, there will be a record in that table showing some detail about the error.

[web2py] Re: File upload/download over https freezes site

2015-08-03 Thread Niphlod
IMHO given that the majority of issues reported come with one step production deployment keywords, the book chapter http://web2py.com/books/default/chapter/29/13/deployment-recipes#One-step-production-deployment should be redacted to point to the script provisioning uwsgi and nginx instead

[web2py] Re: Error in last stable version when trying to delete through one to many relation

2015-08-03 Thread Niphlod
an app to reproduce the issue (or at least a model definition!) would be fine to spot the error. On Monday, August 3, 2015 at 2:13:45 PM UTC+2, Lisandro wrote: I've upgraded from version 2.10.3 to last stable version 2.11.2, but after the upgrade, an error is thrown when trying to delete a

[web2py] Re: Error in last stable version when trying to delete through one to many relation

2015-08-03 Thread Niphlod
uhm, I can't reproduce with a minimal model and 2.11.2 .. what backend are you using ? web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2015 Version 2.11.2-stable+timestamp.2015.05.30.11.29.46 Database drivers available: psycopg2, pymysql, imaplib, sqlite3, pg8000, pyodbc

[web2py] Re: Oracle CLOB/text insert adapter issues

2015-08-03 Thread Niphlod
to help pinpoint the issue, how do you insert a text, let's say of 8000 chars, into Oracle, using python and the cxOracle driver ? On Monday, August 3, 2015 at 5:51:16 PM UTC+2, Boris Aramis Aguilar Rodríguez wrote: Hi, I've been currently working with Oracle as a database backend, I have

[web2py] Re: File upload/download over https freezes site

2015-07-31 Thread Niphlod
:19 UTC-6, Niphlod wrote: I dropped off the apache train too soon to have any issues with it, but frankly, given the total sum of issues encountered so far on the forums, I'm starting to think that we'd need to officially discontinue our apache support.. may be total lack of luck in setting

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Niphlod
deployment? Can I likely set these values higher based on my hardware? Thanks again, Dave On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote: uhm, you left out some pretty specific details what resources has the server web2py is deployed on ? moreover, what's the size of the file

[web2py] Re: sqlite3 locking

2015-07-29 Thread Niphlod
to alleviate the issues, recent sqlite builds feature a mode to activate that is called WAL , which you can read about at https://www.sqlite.org/wal.html . you can enable it just executing PRAGMA journal_mode=WAL once in the database . if you want to do it in web2py, run this code just once

[web2py] Re: Does web2py support reCAPTCHA v2?

2015-07-29 Thread Niphlod
there's recaptcha v2 https://github.com/web2py/web2py/blob/master/gluon/tools.py#L971 On Saturday, July 25, 2015 at 10:06:54 PM UTC+2, Chris wrote: I recently got an email notifying me that Google is upgrading its captcha to the new no CAPTCHA version. Does web2py support that by default? I

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Niphlod
uhm, you left out some pretty specific details what resources has the server web2py is deployed on ? moreover, what's the size of the file ? and what code are you using to handle the upload? are you using the default 'upload' Field or is it in conjunction with a 'blob' one to store the file

[web2py] Re: sqlite3 locking

2015-07-29 Thread Niphlod
db.py is usually a model, so it gets executed once per request. Enabling WAL is a thing needed just one time only (that setting gets stored in the sqlite database file). When you reopen the file WAL is already been activated. There is no other activity involved once the database file has been

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-07-24 Thread Niphlod
iis on windows, nginx on linux. On Thursday, July 23, 2015 at 10:00:27 PM UTC+2, Alex Glaros wrote: Niphlod, can you please list some alternatives to Apache? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-07-20 Thread Niphlod
but slow as hell. ditch apache. On Monday, July 20, 2015 at 8:14:41 AM UTC+2, ermolaev...@gmail.com wrote: in /gluon/globals.py I edit all to pickle.dumps(self) , pickle.HIGHEST_PROTOCOL) and then web2py work good понедельник, 26 января 2015 г., 12:28:57 UTC+3 пользователь Dmitry

[web2py] Re: logout other user

2015-07-19 Thread Niphlod
cycle the sessions and delete the ones whose users you'd like to block in a separate process, or implement your own blockage in a model that gets checked at every request. The possibility to block a session while it's logged in would probably never implemented in the core because of the severe

[web2py] Re: AppConfig and Storage

2015-07-14 Thread Niphlod
: if I init some var in appconfig.ini: my_var1 = False and then use it in code: if my_var1: - will use as True so I need use in appconfig.ini that code: my_var1 = понедельник, 13 июля 2015 г., 19:35:59 UTC+3 пользователь Niphlod написал: sorry, what ?!?!?! On Sunday, July 12, 2015

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Niphlod
web2py doesn't use freetds by default as a driver, but SQL Server... so if you can connect with freetds with pypyodbc it's not said that the same works within web2py (unless you use the same driver args). That being said, the error no driver available smells. How did you install web2py ? On

[web2py] Re: AppConfig and Storage

2015-07-13 Thread Niphlod
sorry, what ?!?!?! On Sunday, July 12, 2015 at 11:21:04 PM UTC+2, ermolaev...@gmail.com wrote: in 0.py by using Storage: develop = False develop = 0 develop = '' all is work in appconfig.ini develop = False develop = 0 develop = '' setted as True !!! We need use now it: develop =

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Niphlod
On Monday, July 13, 2015 at 10:00:08 PM UTC+2, achristoffersen wrote: Hi Jose, Thanks Okay - So if I run python web2py -M I get this: Version 2.11.2-stable+timestamp.2015.05.30.16.33.24 Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000 I guess pyodbc here is

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Niphlod
result in the same exact underlying connection. On Monday, July 13, 2015 at 10:15:08 PM UTC+2, achristoffersen wrote: Thanks again Niphlod I don't think using SQL server is an option in linux-land? All the examples I have seen uses FreeTDS. On Monday, July 13, 2015 at 6:34:30 PM UTC+2

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Niphlod
the secret) and thus would be less secure than this. On Wednesday, July 8, 2015 at 1:16:31 PM UTC-7, Niphlod wrote: summarizing, IMHO web2py should probably implement JWT tokens http://jwt.io/ instead of this custom one to have it called properly API tokens -- Resources: - http://web2py.com

[web2py] Re: DAL Validator for list size

2015-07-08 Thread Niphlod
from the book IS_IN_SET and Tagging The IS_IN_SET validator has an optional attribute multiple=False. If set to True, multiple values can be stored in one field. The field should be of type list:integer or list:string. multiple references are handled automatically in create and update forms,

[web2py] Re: New feature in trunk: API tokens

2015-07-08 Thread Niphlod
summarizing, IMHO web2py should probably implement JWT tokens http://jwt.io/ instead of this custom one to have it called properly API tokens -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Web2py application running very slow on rocket server in production mode

2015-07-08 Thread Niphlod
the book has a recipe for running web2py under iis http://web2py.com/books/default/chapter/29/13/deployment-recipes#IIS there are a few steps involved but are far more easier than setting up apache + mod_wsgi, and it's far more performant by default. That setup is production-ready. there's

[web2py] Re: DAL Validator for list size

2015-07-08 Thread Niphlod
seems that IS_IN_DB accepts a multiple parameter in the same exact form https://github.com/web2py/web2py/blob/master/gluon/validators.py#L606 On Wednesday, July 8, 2015 at 7:42:55 PM UTC+2, Francisco Costa wrote: But what about the type list:reference? -- Resources: - http://web2py.com -

[web2py] Re: Apache on Windows + many applications

2015-07-06 Thread Niphlod
BTW: why don't you just serve web2py behind iis ? No weird exceptions, easier to debug, better performances, lesser resources, etc etc. Come on, it's not 2001 anymore! On Friday, July 3, 2015 at 1:44:10 PM UTC+2, Dmitry Ermolaev wrote: https://7pay.in/ - worked http://7pay.in/ - error in

[web2py] Re: Starter App (Scaffolding) selction on create app.

2015-07-02 Thread Niphlod
before having the option of having the option to choose for it'd be - at least required - to have something to choose from :-P On Thursday, July 2, 2015 at 6:04:40 PM UTC+2, Encompass solutions wrote: There has been some discussion about different types of frameworks. I too have options I

[web2py] Re: run time error - auth_user.table appears corrupted

2015-07-02 Thread Niphlod
stop web2py, drop the databases/*_auth_user.table file, set fake_migrate_all=True on the DAL connection, start web2py, hit the appadmin page (which should trigger recreation of all *.table files), remove fake_migrate_all statement from the DAL connection. On Wednesday, July 1, 2015 at 4:01:20

[web2py] Re: as_dict() on a row fails when connected to MySQL on Amazon RDS

2015-07-02 Thread Niphlod
I'm pretty sure that newly_inserted_id = db.table.insert(...) should return an integer, not a row. On Wednesday, July 1, 2015 at 4:01:19 PM UTC+2, Sean Ballow wrote: We are connecting successfully to MySQL on RDS And when attempting to insert a new record it appears to properly insert

[web2py] Re: Only one table fails to create in MySQL... and there's nothing special about it.

2015-06-30 Thread Niphlod
actually, pythonanywhere folks are really collaborative : no need to bash for something they aren't responsible for :P -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: bounty for window users

2015-06-29 Thread Niphlod
/me restricts himself to review the code before the actual merge. if noone rescues the bounty in a week I'll do it. On Monday, June 29, 2015 at 5:43:30 PM UTC+2, Massimo Di Pierro wrote: I offer $50 is you can do this in a couple of days: In the web2py admin interface there is a pack custom

[web2py] Re: Only one table fails to create in MySQL... and there's nothing special about it.

2015-06-29 Thread Niphlod
usually it's not rocket science.. do you have a databases/***_restaurants.table in your databases folder ? if yes, drop it and go to the appadmin controller to recreate it. From the error it seems that web2py is trying to migrate a table that is not on the backend but it's supposed to be there

[web2py] Re: How to make role inheritable?

2015-06-29 Thread Niphlod
either you add redundantly groups or you have to resort to a recursive query each time you need to check for membership at higher levels than the first one... in either case I really don't see the issue: given that auth_membership is a one-to-many, web2py isn't getting in your way. If you

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
IMHO token should not be restricted to a var... it should be also possible to use an header... Performance-wise...as it is it's as bad as it could possibly be. 1) the extra table needs a solid unique=True on the token field: we don't want to do a full scan of that table for every request

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
PS: the code doesn't take into consideration an expired token. the mere existance of the record allows the authentication. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
Ok, read it carefullyAll of that IMHO isn't really what users wants to implement a token-based auth on top of an API. Apart from the fact that if the scheme of the tokens table gets corrected (a FK to the user_id and token unique) the first two queries are collapsible into one, calling

[web2py] Re: bootstrap layout adaption

2015-06-26 Thread Niphlod
folder-what ? just download the styles and refer to the correct url in your layout... On Friday, June 26, 2015 at 8:23:06 AM UTC+2, Manuele wrote: Can anyone tell me if it could be easy to adapt this[1] bootstrap layout in order to be used for a web2py application? The best would be to

[web2py] Re: Layout problem

2015-06-25 Thread Niphlod
you're quite obviously missing css and js files serving. On Thursday, June 25, 2015 at 10:17:13 AM UTC+2, Chaitu P wrote: Does anyone have idea why web2py default layout not working. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: how to use onupdate with grid

2015-06-24 Thread Niphlod
or just onupdate=updateAuthorizationStatus On Tuesday, June 23, 2015 at 9:41:39 PM UTC+2, Alex Glaros wrote: is this right? grid = SQLFORM.grid(db.AuthorizedInstance.id==request.get_vars. specificAuthorizationID, editable=True, deletable=False, create=False, searchable=False,

[web2py] Re: IS_TIME format

2015-06-24 Thread Niphlod
if you need a cutsom widget with a custom format, and you already rewrote the widget, why don't you rewrite also the validator ?! On Wednesday, June 24, 2015 at 10:00:46 AM UTC+2, Annet wrote: I wrote a widget to format time: def timeplain(field, value): if value == None: value

[web2py] Re: empy string from csv for integer for integer field

2015-06-24 Thread Niphlod
an integer can't be ''. set them to null of to 0 at import time :D On Wednesday, June 24, 2015 at 7:28:21 PM UTC+2, goome wrote: Hello i have a table with integer field. i populated thhe db from a csv (created from other then me). it sometimes has empty value for the integers fields. So

[web2py] Re: Expressions error in DAL query

2015-06-23 Thread Niphlod
although not in the book, epoch() is a method of a datetime field. http://pydal.readthedocs.org/en/latest/_modules/pydal/objects.html#Expression.epoch That being said, if I got the requirements properly, which is to craft a select on a datetime field for anything comprised from 5 minutes ago and

[web2py] Re: how to use onupdate with grid

2015-06-23 Thread Niphlod
No, it's not a redirect, even if it could be crafted as one. and yep, you are using it wrong. everything on* is a callback, not a string... so it needs to be a function. It takes form as the input. Strictly speaking, onupdate translates to the same thing of the onsuccess callback passed to the

Re: [web2py] Upgrading to the latest version

2015-06-23 Thread Niphlod
too many scaring advices here... first and foremost, if you have two web2py roots in any given (and separate) folders, they'll work without hiccup. second: if you copy your entire application (the folder applications/appname) from old web2py to new web2py you can test the functionality on the

[web2py] Re: does every controller function require a view?

2015-06-23 Thread Niphlod
if you plan to use functions in controllers that MAY NOT be seen by users, just define them with a parameter (a dummy one works fine) def this_function_is_accessible(): pass def this_is_not_accessible(dummy=None): pass On Tuesday, June 23, 2015 at 7:27:42 PM UTC+2, Alex Glaros wrote:

[web2py] Re: FYI - MSSQL, Executesql and data columns retrieved as strings

2015-06-18 Thread Niphlod
what is the recommended adapter for news versions? I saw that there are like 4 different mssql adapters in the dal source but it wasn't really clear which one to use when. On Wednesday, June 17, 2015 at 1:42:02 AM UTC-5, Niphlod wrote: 10.0 for 2008, 11.0 for 2012, (or 12.0, if sql server

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-18 Thread Niphlod
) for deploying multiple web2py apps? El miércoles, 17 de junio de 2015, 18:23:59 (UTC-3), Niphlod escribió: there's a distinct lack of singular/plurals in your statements that may pinpoint the problem. multiple apps -- multiple uwsgi processes either you hg update all the apps, and restart ALL

[web2py] Re: are auth tables different than any other non-auth table?

2015-06-17 Thread Niphlod
auth_group is for groups. auth_permissions is for permissions. as any other table in your db, the problem is not the # of records, rather than what query you need to do on those. On Wednesday, June 17, 2015 at 10:42:57 PM UTC+2, Alex Glaros wrote: db.auth_group is doing double duty in my app

[web2py] Re: are auth tables different than any other non-auth table?

2015-06-17 Thread Niphlod
BTW: a million users doesn't really qualify for a single postgres database, no matter what. On Wednesday, June 17, 2015 at 11:17:39 PM UTC+2, Niphlod wrote: auth_group is for groups. auth_permissions is for permissions. as any other table in your db, the problem is not the # of records

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Niphlod
there's a distinct lack of singular/plurals in your statements that may pinpoint the problem. multiple apps -- multiple uwsgi processes either you hg update all the apps, and restart ALL uwsgi processes (more a reload than a restart, hopefully, touching EACH and EVERYONE of the files uwsgi

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Niphlod
beside from the fact that is hardly a web2py problem, what the heck ? you udpate the app and you don't want to reload the process that runs it ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: FYI - MSSQL, Executesql and data columns retrieved as strings

2015-06-17 Thread Niphlod
10.0 for 2008, 11.0 for 2012, (or 12.0, if sql server 2016 will show up). BTW: for anything else than MSSQL2000, mssql:// is NOT the recommended adapter. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-17 Thread Niphlod
nope. On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, pysab wrote: Hi there :) I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project and I have a question about sorting. In PostgreSQL, when I execute a SELECT, I can specify 'ORDER BY x ASC NULLS FIRST', which is not

[web2py] Re: .json return in nginx/uwsgi

2015-06-17 Thread Niphlod
there's a handy directive for it. https://github.com/web2py/web2py/blob/master/applications/welcome/models/db.py#L33 On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, K.J. Pamio wrote: Hello, In my app on the local server enough to use the termination .json in function call that web2py

[web2py] Re: response.menu will not display an image

2015-06-17 Thread Niphlod
a image=whatever/a is hardly the way to display an image . On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, jackso...@quantachrome.com wrote: This does not work. No image is displayed. The layout seems to lose it too, the response menu now has 2 rows this causes things to be obscured

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Niphlod
), Niphlod escribió: beside from the fact that is hardly a web2py problem, what the heck ? you udpate the app and you don't want to reload the process that runs it ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

[web2py] Re: Cannot create records in grid

2015-06-16 Thread Niphlod
no prob. happens all time :D On Tuesday, June 16, 2015 at 9:28:52 AM UTC+2, Mirek Zvolský wrote: ..that was really stupid from me. I'm sorry. Thank you. Dne úterý 16. června 2015 8:33:33 UTC+2 Mirek Zvolský napsal(a): Web2py 2.11.2 Chrome Firefox cache cleared I don't see Add

[web2py] Re: Cannot create records in grid

2015-06-16 Thread Niphlod
are you authenticated ? if you don't pass user_signature=False by default grids are read only (and for a good reason) On Tuesday, June 16, 2015 at 8:33:33 AM UTC+2, Mirek Zvolský wrote: Web2py 2.11.2 Chrome Firefox cache cleared I don't see Add button in the web2py grid. Explicit setting

[web2py] Re: Expose public ip address with SOAP

2015-06-15 Thread Niphlod
ok, rephrasing Then, I deploy the app on internet -- how is it deployed ? On Monday, June 15, 2015 at 10:19:11 AM UTC+2, DucVa wrote: I don't config. I am using default mode. How must I config it? Vào 15:51:28 UTC+7 Thứ Năm, ngày 11 tháng 6 năm 2015, Niphlod đã viết: it seems

[web2py] Re: Scheduler Question

2015-06-15 Thread Niphlod
uhm. sqlite lockings then ? On Monday, June 15, 2015 at 6:13:04 PM UTC+2, Michael Gheith wrote: I am querying a remote PostgreSQL database, and then inserting certain values into my local SQLite database, that's all... -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Desempeño en W7 64 bits

2015-06-15 Thread Niphlod
go all the way for iis and fastcgi. the first slice is outdated and frankly counter-productive with wfastcgi lying around. On Monday, June 15, 2015 at 7:42:28 PM UTC+2, Leonel Câmara wrote: Hey, I've never tried it in production, because frankly there's just much better choices of servers in

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-14 Thread Niphlod
sorry what ? On Friday, June 12, 2015 at 11:35:49 PM UTC+2, Alex Glaros wrote: are there file size limitations when moving to dict that are not an issue if python loop? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: blob type crop data

2015-06-14 Thread Niphlod
you're correct. web2py handles blob types and 'upload' Fields in its own way. You'd have to resort to either a full migration to another table or to access the data using raw sql statements. On Saturday, June 13, 2015 at 5:20:06 AM UTC+2, Viktor Boiarchuk wrote: Hello everybody! Nice to meet

[web2py] Re: Scheduler Question

2015-06-14 Thread Niphlod
) ├─python(29459) ├─python(30343) ├─python(32193) └─{python}(10993) On Friday, June 12, 2015 at 3:49:12 PM UTC-5, Niphlod wrote: inspect the log to see why another worker gets started. Each worker started can result AT MOST as two

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-14 Thread Niphlod
On Sunday, June 14, 2015 at 11:56:34 PM UTC+2, Alex Glaros wrote: is there a size limitation to a dictionary? (want to know in general for future purposes) generally, your OS free memory. is there consequential extra overhead if using the dictionary method? of course, its an

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread Niphlod
do option 1) , then option 2), then profile, then choose. Anything else is rubbish. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this

[web2py] Re: nginx, uwsgi, profiler

2015-06-12 Thread Niphlod
trouble. Any hints how to find the malefactor? 2015-06-12 6:57 GMT+02:00 Martin Weissenboeck mwei...@gmail.com javascript:: Thank you very much for your fast response. 2015-06-11 21:15 GMT+02:00 Niphlod nip...@gmail.com javascript:: runsnakerun is the best tool for the job. for running

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread Niphlod
but the result i got in the profiler folder is *.prof file, when i open it, it seems to semi human readable file. don't know how to do with those files. how can i do a benchmark of web2py app? thanks and best regards, stifan On Friday, June 12, 2015 at 1:31:23 PM UTC+7, Niphlod wrote: do option 1

[web2py] Re: Scheduler Question

2015-06-12 Thread Niphlod
inspect the log to see why another worker gets started. Each worker started can result AT MOST as two processes, the worker itself and the process that actually executes the task. On Friday, June 12, 2015 at 10:36:35 PM UTC+2, Michael Gheith wrote: I have an application that uses the

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Niphlod
it's just a matter of ordering by the parent and then the child. Once you get a resultset similar to parent.id | parent.style | child.id | child.name 1 yellow 4 foo1 1 yellow 5 bar1 1 yellow 6 baz1 2

[web2py] Re: web2py permissions

2015-06-12 Thread Niphlod
summarizing, web2py is just an executable. It protects you by default from directory traversal attacks. Everything but static folder is dinamically created by the executable. You may want to serve static with your webserver of choice to relieve the burden off of web2py shoulders, but ultimately

[web2py] Re: language detecting

2015-06-12 Thread Niphlod
weirdest requirement ever but not hard if T.accepted_language in ('ru-RU', ): raise HTTP(404) On Friday, June 12, 2015 at 7:31:41 PM UTC+2, lucas wrote: hey everyone, via google analytics, i am getting an inordinate amount of traffic from russia. my site would not be of

[web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Niphlod
is it better to issue two separate queries returning a set with 2 records and 10 respectively or to fetch a joined set (and massage it later on) that extracts 20 records ? There's no answer to that except that the two possibilities are entirely doable. Cardinality of the sets comes into play,

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Niphlod
so you have a problem with python, not the database! if you're not loop-proficient, massage it first to a dictionary, then loop over it from collections import defaultdict resultset = defaultdict(list) for row in parents_and_childs: resultset[row.parent_record.id].append(row) then you can

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-11 Thread Niphlod
use the links argument links = [ ... dict(header='additional buttons', body=lambda row: BUTTON(.) if row.needs_button == 0 else '' ) ] On Thursday, June 11, 2015 at 12:45:29 AM UTC+2, LoveWeb2py wrote: I should have been more specific. I meant I

[web2py] Re: Expose public ip address with SOAP

2015-06-11 Thread Niphlod
it seems that web2py uses request.env.wsgi_url_scheme, request.env.http_host to build the url. How is your server configured ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Basic usage statistics

2015-06-11 Thread Niphlod
you could use a redis queue to push events into, and then a scheduler tasks that consolidates the data in a table once in a while. On Thursday, June 11, 2015 at 6:55:18 PM UTC+2, Leonel Câmara wrote: Minor implementation details aside, has anyone came up with a better way to do this?

[web2py] Re: nginx, uwsgi, profiler

2015-06-11 Thread Niphlod
runsnakerun is the best tool for the job. for running with profiler and another webserver, you need to tweak wsgihandler.py pass a directory to profiler_dir On Thursday, June 11, 2015 at 8:39:45 PM UTC+2, mweissen wrote: ​I have tried the option -F with a simple web2py start: python

[web2py] Re: change soap wsdl targetnamespace

2015-06-11 Thread Niphlod
isn't a simple def what_you_serve(): ..foo bar response.namespace = 'http://tempuri.org/' return dict(a=1) working ? On Thursday, June 11, 2015 at 6:36:31 PM UTC+2, Pengfei Yu wrote: Hi, I want to change the target namespace to http://tempuri.org/; in the SOAP WSDL

[web2py] Re: change soap wsdl targetnamespace

2015-06-11 Thread Niphlod
() This is enough in call() function. Thanks! On Thursday, June 11, 2015 at 3:18:13 PM UTC-4, Niphlod wrote: isn't a simple def what_you_serve(): ..foo bar response.namespace = 'http://tempuri.org/' return dict(a=1) working ? On Thursday, June 11, 2015 at 6:36:31 PM UTC+2

[web2py] Re: caching model data

2015-06-11 Thread Niphlod
time something that isn't in cache): use with_lock=True and it'll be fetched one time only, while other wait in line the result calculated by the first client requesting the data. On Thursday, June 11, 2015 at 2:58:47 PM UTC+2, Fabiano Faver wrote: Niphlod, I have a small app the DB is getting

Re: [web2py] All messed up

2015-06-09 Thread Niphlod
actively refused it means that the socket you're pointing to is not open(able) . Review the listening ports and/or the firewall. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: object 'DAL' has no attribute 'Field' - After update 2.11.2

2015-06-09 Thread Niphlod
if you'r ecoming from an older version, the structure of packages changed a bit and so the usual unzip over it doesn't work . Try to start with a unzip in a fresh folder and then copy over your applications only. it should work fine. On Tuesday, June 9, 2015 at 10:47:54 AM UTC+2, Tomeu Roig

[web2py] Re: Sharing source code of my application developed in web2py

2015-06-08 Thread Niphlod
if you just pack you'll send the source code. alternatively, just zip the applications/yourapp directory On Monday, June 8, 2015 at 8:45:24 PM UTC+2, Meenoo wrote: I am new to web2py and am creating an application for my school project using web2py. I need to submit the source code of the

Re: [web2py] Re: Python framework benchmarks

2015-06-08 Thread Niphlod
there's the usual ton on optimizations to be made. BTW: if sessions aren't needed at all, the statement to use is session.forget(response) On Tuesday, June 9, 2015 at 12:55:52 AM UTC+2, Derek wrote: I created two pull requests, so it should be a bit faster now. I see it's also storing

[web2py] Re: Python framework benchmarks

2015-06-08 Thread Niphlod
it's the usual weirdo-test. I bet all has been done with web2py defaults, which means migrations, sessions on disk, etc etc etc ?! BTW there's no news in knowing that a minimal-something performs better than a batteries-included one, let alone the I was built specifically towards something.

[web2py] Re: Want to access multiple sqlite3 databases in the same app

2015-06-08 Thread Niphlod
db1 = DAL('sqlite://number_one.db') db2 = DAL('sqlite://number_two.db') db3 = DAL('sqlite://number_three.db') all done! On Tuesday, June 9, 2015 at 12:31:22 AM UTC+2, jackso...@quantachrome.com wrote: I am a newbie. I want to have multiple sqlite3 databases accessible in my application.

[web2py] Re: Connecting to postgresql - where do I put schema name in the connection?

2015-06-08 Thread Niphlod
except from the obvious seems that there is no default schema for your dabatase this error popped up in the past with really old versions of postgresql ... may I ask what version are you running ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Import an entire file into another file.

2015-06-06 Thread Niphlod
different controllers aren't really meant to share. if you want something available to both controllers, put the code in models and be happy. Or you can go the pythonic way and put under modules (helpers.py), and then at the top of file_whatever.py you can use from helpers import whatever On

<    4   5   6   7   8   9   10   11   12   13   >