[web2py] Re: Set Scheduler Run Timeout on Try Except

2016-05-26 Thread Niphlod
Frankly it's not clear what you want to achieve. That being said you have a timeout on the task itself and an api to stop a running task. Not sure what you need in addition to those... On Thursday, May 26, 2016 at 4:28:40 AM UTC+2, Andrew Evans wrote: > > Hello, I am running a scheduler that I

[web2py] Re: web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-26 Thread Niphlod
better than http, for sure. Better than self-signed, an order of magnitude. But still I'd go for 60$ for basic cert for a production site rather than using letsentcypt. On Thursday, May 26, 2016 at 12:11:29 AM UTC+2, Mark Graves wrote: > > Has anyone used LetsEncrypt certificates or followed

[web2py] Re: web2py in virtualenv

2016-05-25 Thread Niphlod
pythonically speaking, web2py is not a package, gluon is. you just have to have gluon in sys.path. On Wednesday, May 25, 2016 at 12:22:20 PM UTC+2, Remco Boerma wrote: > > Hey folks. > > I want to use pydal and the validators of web2py in a virtualenv. I am > working on a seperate script and

[web2py] Re: "requires distutils, but not installed" error Web2Py_Win 64bit

2016-05-24 Thread Niphlod
deployment on openshit needs the source version PLUS gitpython installed and available. You can't use the binary. On Tuesday, May 24, 2016 at 10:42:34 PM UTC+2, Vignesh M wrote: > > Hi Team, > > I am using Python2.7 and Web2Py_Win.exe. I am getting "requires distutils, > but not installed"

[web2py] Re: how to set fast ordering datetime field [now without typos and subject]

2016-05-24 Thread Niphlod
duplicate, answered on https://groups.google.com/d/msg/web2py/aIg2t3ZlyKY/dnU5YYOPAAAJ On Tuesday, May 24, 2016 at 10:42:34 PM UTC+2, Matt Bee wrote: > > I have a table with a huge amount of records. There are aprox 3*10^6 > registers and counting. > > I need via scheduler delete the older

[web2py] Re:

2016-05-24 Thread Niphlod
index support is on the way but for the time being just stick an index manually. a CREATE INDEX ix_foo_foo_date on foo (foo_date) should suffice. on further iterations, you should consider how much you'd like to be exact showing the last 10 registers: you can't really expect to scale (index

[web2py] Re: web2py and Spatial / GIS support

2016-05-24 Thread Niphlod
nobody pushed GIS and frankly the support for it is scattered. There hasn't been an holistic approach in the implementation. IMHO you should not rely on anyone but yourself to add support on pydal. On Tuesday, May 24, 2016 at 9:57:52 AM UTC+2, Pierre wrote: > > nobody knows or nobody wants to

[web2py] Re: Efficiency in compiled appliance

2016-05-18 Thread Niphlod
what would be the counter-arg here ? On Wednesday, May 18, 2016 at 9:42:50 PM UTC+2, Scott Hunter wrote: > > The web2py book, under Efficiency Tricks, says: > > >- Do not put many functions in the same controller but use many >controllers with few functions. > > When an appliance is

[web2py] Re: Dropdown doesn't show on response.menu

2016-05-17 Thread Niphlod
it isn't showing submenus beyond the 2nd level. And face it, mobiles suck at nested menus. -- 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

[web2py] Re: change dropdown menu login

2016-05-12 Thread Niphlod
gluon.tools is the place where Auth lives. On Thursday, May 12, 2016 at 3:39:30 PM UTC+2, Alessio Varalta wrote: > > Hi, I want to change the dropdown menu in the rigth corner of the web2py > application. I don't want the text Login but a icon..I see that the code is > imported with > > >

[web2py] Re: Scheduler - limit on how large the result can be?

2016-05-12 Thread Niphlod
this has been solved recently (the result couldn't be larger than 64k on most platforms). Right now it has no limitations, although its surely finite. Please do keep in mind that (on top of your task being forced to pass around big chunks of data) result is always json string. Whenever you

[web2py] Re: web2py scheduler with huge output or return values always timeout (even if the task finishes)

2016-05-12 Thread Niphlod
results get stored to a tempfile. it has been recently fixed. Huge "prints" are still a problem and are discouraged, but now you can have a result as big as you wish. On Thursday, May 12, 2016 at 5:19:04 AM UTC+2, Andre Kozaczka wrote: > > I'm curious what workarounds folks have come up with

[web2py] Re: What's wrong with this script?

2016-05-11 Thread Niphlod
aside from considering a browser "as the best" being a rather subjective matter, when you google around you find out that it could be a security threat to have geolocation turned on when the user isn't watching at the tab (also, chrome received a lot of efforts in merging code-paths with the

[web2py] Re: How do I update only the last row of a db query?

2016-05-11 Thread Niphlod
at out Niphlod. So how should I correct it? > > On Wednesday, May 11, 2016 at 5:37:43 PM UTC+5:30, Niphlod wrote: >> >> yep. you need to FILTER before APPLYing the update. it's rather easy to >> spot the error because last() comes AFTER update(). >> >> On Wednesday, M

[web2py] Re: 2.14.6: Mobile plugin and shell do not work?

2016-05-11 Thread Niphlod
me too and since we're at topic, an issue to track "please throw away them" should be created. I'm always happy to remove non-working features right away. On Wednesday, May 11, 2016 at 2:37:18 PM UTC+2, Anthony wrote: > > Agreed. > > On Wednesday, May 11, 2016 at 1:02:00 AM UTC-4, mweissen

[web2py] Re: It seems that this ajax request is made only when we are seeing it on present tab? How to avoid this

2016-05-11 Thread Niphlod
as who makes the browser, don't blame web2py :-P On Wednesday, May 11, 2016 at 10:40:46 AM UTC+2, Emmanuel Dsouza wrote: > > no Niphlod, > > there is a difference between the two: > > *window.setInterval(function() {* > *//some code for html5 geolocation* > *ajax('{{=U

[web2py] Re: How do I update only the last row of a db query?

2016-05-11 Thread Niphlod
yep. you need to FILTER before APPLYing the update. it's rather easy to spot the error because last() comes AFTER update(). On Wednesday, May 11, 2016 at 1:15:45 PM UTC+2, Steve Joe wrote: > > db(db.loc_data.school_id == > auth.user_id).update(end_time=request.utcnow+datetime.timedelta(0,19800)

[web2py] Re: It seems that this ajax request is made only when we are seeing it on present tab? How to avoid this

2016-05-11 Thread Niphlod
this is quite a default behaviour in all modern browsers: the inactive tab is --- inactive. On Wednesday, May 11, 2016 at 9:09:10 AM UTC+2, Emmanuel Dsouza wrote: > > I double checked that this ajax request from my view works only when I am > looking at the tab on which the view is displayed.

[web2py] Re: How To Select Only The Latest Rows from a Table

2016-05-10 Thread Niphlod
_Value_3 > For the latest Times corresponding to each of the FieldName2 values. > > > How to write DAL Query to fetch these? > > > > Thank you, very much! > > > > > *— PRACHI —* > > On Monday, 9 May 2016 05:28:53 UTC-4, Niphlod wrote: >> >> in addition to g

[web2py] Re: display only year on a form

2016-05-09 Thread Niphlod
wouldn't it just better to propose an integer field or a selectbox (or an autocomplete) with the next 10 years ?!?!?! On Monday, May 9, 2016 at 10:33:06 PM UTC+2, Winter Kryz wrote: > > Hello, > > I have created a form where I need to insert the enrolling year of a > student that is about to

[web2py] Re: Computed DAL Values On Insert

2016-05-09 Thread Niphlod
and content_string isn't explicitely passed, and storage_string() returns a non-null value ? On Monday, May 9, 2016 at 6:36:19 PM UTC+2, Mark Billion wrote: > > Yep > > On Monday, May 9, 2016 at 12:19:13 PM UTC-4, Niphlod wrote: >> >> are all of the required fields of &qu

[web2py] Re: Computed DAL Values On Insert

2016-05-09 Thread Niphlod
are all of the required fields of "storage_string()" supplied ? On Monday, May 9, 2016 at 5:25:21 PM UTC+2, Mark Billion wrote: > > When I do an insert the computed values dont updatethoughts? > > def storage_form_controller(): > x = request.vars.client > sl_dict = {

[web2py] Re: non W2p form insert

2016-05-09 Thread Niphlod
try to prefix yourself with the following situation db.define_table('sometable', Field('somefield1'), Field('somefield2')) and then request.vars as {'somefield1' : 'abcd', 'somefield2' : 'cdef', '*contents*': 'wxyz'} trying to do db.sometable.validate_and_insert(**request.vars) will give you

[web2py] Re: How To Select Only The Latest Rows from a Table

2016-05-09 Thread Niphlod
in addition to groupby you need to select the aggregate you want. "the latest row for fieldname2" is really the max(some_other_column) for each group. That being said, please show your data and your desired resultset: I'm guessing it'll be a little harder to retrieve what you want. --

[web2py] Re: Enabling Unicode characters in URL

2016-05-06 Thread Niphlod
you need to think it through. web2py's defaults to have /a/c/f with a being your app, c the name of a controller file and f a valid python function identifier. if you want to support /whatever you NEED to use routes.py a simple routes_in = ( ('/welcome/static/$anything',

[web2py] Re: matplotlib passing parameters from the view

2016-05-06 Thread Niphlod
brary that better integrate in web2py framework? > > Il giorno giovedì 5 maggio 2016 10:11:45 UTC+2, Niphlod ha scritto: >> >> there's a problem in your syntax. >> >> it's usually URL('blabla', args=[], vars=dict()) >> >> while your code reports >> >&

[web2py] Re: matplotlib passing parameters from the view

2016-05-05 Thread Niphlod
there's a problem in your syntax. it's usually URL('blabla', args=[], vars=dict()) while your code reports args=[..., dict=()] On Thursday, May 5, 2016 at 9:53:44 AM UTC+2, Paolo Amboni wrote: > > I stored the id in a session variable and it works fine!! > But why the URL helper didn't send

[web2py] Re: User group names based on username instead of id

2016-05-04 Thread Niphlod
roup :/ > > P.S. for completeness. > > In db.py I changed this: > auth.settings.create_user_groups = None > > to this > auth.settings.create_user_groups = 'user_%(username)s' > > > > > On Wednesday, May 4, 2016 at 2:01:16 PM UTC-5, Niphlod wrote: >> >>

[web2py] Re: View SQL generated by SQLFORM.grid

2016-05-04 Thread Niphlod
response.toolbar() shows db statistics, I guess is the fastest method out there. On Wednesday, May 4, 2016 at 9:32:10 PM UTC+2, Jim S wrote: > > I pass a query to SQLFORM.grid. Is there a way to see the SQL that last > executed on behalf of the grid? I'm trying to tune my db for the SQL >

[web2py] Re: User group names based on username instead of id

2016-05-04 Thread Niphlod
from the source it seems that the setting create_user_groups which has a default of "user_%(id)s" can be used. in your case it seems that setting it to user_%(username)s should do the trick. On Wednesday, May 4, 2016 at 8:48:49 PM UTC+2, Antonio Salazar wrote: > > I've disabled user group

[web2py] Re: Enabling Unicode characters in URL

2016-05-04 Thread Niphlod
BTW: you NEED to get your hands dirty with routes.py because a percent-encoded fragment won't ever be mapped to a function or a controller. On Wednesday, May 4, 2016 at 1:55:53 PM UTC+2, Leonel Câmara wrote: > > I don't think that's possible, they need to come pre-encoded, don't worry > the

[web2py] Re: How to add response headers to cache file?

2016-05-03 Thread Niphlod
how are you serving the "cachefiles" ? web2py caches - at most - the rendered view, not the headers On Tuesday, May 3, 2016 at 4:30:46 PM UTC+2, Antonio wrote: > > Hello again, > I'm not really sure that I fomulated correctly the question, so sorry for > that. > I'm using web2py to get

[web2py] Re: Again unsure about current.xx / singletons - from web app and from script

2016-05-03 Thread Niphlod
once you start a shell with python web2py.py -M -S . you have started another completely separated process: no worries about thread-safe(ing) anything. On Monday, May 2, 2016 at 11:16:28 PM UTC+2, Mirek Zvolský wrote: > > In modules instead of > def modulemethod(db): > I use > def

[web2py] Re: cache.ram doesnt return a result until a certain request finishes

2016-05-03 Thread Niphlod
I smashed my head around it too and if the "animation" doesn't take a huge variation (i.e. one second OR 60 seconds) I usually get away with animating it with javascript until finished. On Tuesday, May 3, 2016 at 4:50:19 AM UTC+2, Alfonso Serra wrote: > > Thanks Niphlod. > &g

[web2py] Re: A basic problem about threading and time consuming function...

2016-05-03 Thread Niphlod
: > > Hi, Niphlod. > > After I have read something about scheduler, > I am definitively sorry for my previous notes > and I choose web2py scheduler of course. > > It will be my first use of it (with much older ~3 years web2py app I have > used cron only), > so i

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-05-02 Thread Niphlod
u making the feature request? lol > > On Sunday, May 1, 2016 at 12:01:31 PM UTC-4, Niphlod wrote: >> >> the answer is pretty easythere is no list:datetime Field type. >> >> On Friday, April 29, 2016 at 3:58:48 PM UTC+2, billmac...@gmail.com >> wrote: >>

[web2py] Re: Send email daily depend on SQLFORM date

2016-05-02 Thread Niphlod
mail.send() is pretty easy. what's the structure of your "mail" table ? assuming you have a query for mails ready to be sent, e.g. db((db.mails.send_after > request.now) & (db.mails.sent == False)).select() , all that it takes is all_mails = db((db.mails.send_after > request.now) &

[web2py] Re: cache.ram doesnt return a result until a certain request finishes

2016-05-02 Thread Niphlod
two possible issues: a) you're not using session.forget(response). To avoid concurrent modification of the same value in session, by default requests insisting on the same session will be serialized. Whenever you use ajax and you don't use session, use session.forget(response) b) cache.ram

[web2py] Re: Can't access scheduler_task table ['DAL' object has no attribute 'scheduler_task']

2016-05-02 Thread Niphlod
how did you "import" the database ? referencing a "current"... same applies to the scheduler On Monday, May 2, 2016 at 4:54:00 AM UTC+2, Marty Jones wrote: > > how would I import the scheduler into a module to do that? > > On Sunday, May 1, 2016 at 12:00:44 PM

[web2py] Re: A basic problem about threading and time consuming function...

2016-05-01 Thread Niphlod
the statement "I don't need to use the scheduler, because I want to start it as soon as possible" is flaky at best. If your "fetching" varies from 2 to 20 seconds and COULD extend further to 60 seconds, waiting a few seconds for the scheduler to start the process is uhm... debatable. Of

Re: [web2py] Re: django type adding or append fields using plus sign to your table

2016-05-01 Thread Niphlod
the answer is pretty easythere is no list:datetime Field type. On Friday, April 29, 2016 at 3:58:48 PM UTC+2, billmac...@gmail.com wrote: > > works: > Field("something", 'list:string'), > Field("someting2", 'list:integer'), > > But no such thing as: > Field("something3", 'list:datetime') > >

[web2py] Re: Can't access scheduler_task table ['DAL' object has no attribute 'scheduler_task']

2016-05-01 Thread Niphlod
why don't you use queue_task() ? On Friday, April 29, 2016 at 9:17:37 PM UTC+2, Marty Jones wrote: > > I seem to have resolved it by switching "db = current.db" to "db = > current.globalenv['db']" > > On Friday, April 29, 2016 at 12:05:34 PM UTC-4, Marty Jones wrote: >> >> I'm defining some

[web2py] Re: Execution of import statements

2016-04-29 Thread Niphlod
TC+2, Mark Billion wrote: > > Right, but if the import is a conditional one -- ie, only import a if a > condition evals to true -- does it no op the import if the condition goes > to false or does it import all and then execute? > > On Friday, April 29, 2016 at 3:23:40 AM UTC-4, Ni

[web2py] Re: caching questions

2016-04-29 Thread Niphlod
pythonanywhere has a totally different set of limits but if you choose a PaaS, you don't get to worry about nitty gritty details . you're right, the book is an optimal candidate for caching and if you see its code it's actually cached everywhere although the book isn't a good example

[web2py] Re: caching questions

2016-04-29 Thread Niphlod
pythonanywhere is a PaaS, and one of the simpler... start worrying when your site isn't speedy enough. Fortunately you won't have to change a single thing in your app if no the cache initialization... On Friday, April 29, 2016 at 10:58:34 AM UTC+2, Pierre wrote: > > >> When you face the problem

[web2py] Re: Execution of import statements

2016-04-29 Thread Niphlod
in python if you have import a blablabla import b blablabla import a the second "import a" statement is executed, but is a no-op. On Friday, April 29, 2016 at 1:20:59 AM UTC+2, Mark Billion wrote: > > I understand that the whole default.py file is executed on each request to > a function

[web2py] Re: caching questions

2016-04-27 Thread Niphlod
on these "philosophical" notes, boring for someone, exciting for yours truly, the are a few other pointers (just to point out that the concept of "caching" isn't really something to discard beforehand)...be aware that on "caching" there are probably thousands of posts and pages of books written

[web2py] Re: After user login, I need to verify validity password.

2016-04-27 Thread Niphlod
I'd not go against password rotation that head-on. It's a quite regular process in enterprises and for some applications its even enforced by local laws. Not that I'm saying web2py should definitively have such a feature as a builtin, but still...don't shoot the messenger :P On Wednesday,

[web2py] Re: Running Web2py on Oracle VM Virtualbox on Win 10

2016-04-27 Thread Niphlod
sorry, didn't get that news update ;-) On Wednesday, April 27, 2016 at 3:24:54 PM UTC+2, Willoughby wrote: > > Side note: BeOS is now Haiku! > https://www.haiku-os.org/ > > > On Tuesday, April 26, 2016 at 5:21:41 PM UTC-4, Niphlod wrote: >> &g

[web2py] Re: running app from command line with no server startup window

2016-04-27 Thread Niphlod
the "thing" that opens the page is usually the server startup window: you can start web2py without the startup window (just pass web2py.exe -a yourpassword) but it's a bit of a chicken and egg problem how can you be sure that a port is free (by default 8000) without having the user choose

[web2py] Re: running app from command line with no server startup window

2016-04-27 Thread Niphlod
ok, found the culprit https://github.com/web2py/web2py/pull/1194 . will open a discussion among developers to see why it got included (it's clearly wrong) BTW: your start.bat isn't correct : -S takes app/controller/function only (no extensions). Also, -S just starts the shell, not the

[web2py] Re: running app from command line with no server startup window

2016-04-27 Thread Niphlod
, forget your bat. On Wednesday, April 27, 2016 at 12:37:08 AM UTC+2, Jacob Thoennes wrote: > > I'm using the binary version. > > On Tuesday, 26 April 2016 17:31:10 UTC-5, Niphlod wrote: >> >> are you using web2py_win.zip (the binary version) or the source one ? >> >>

[web2py] Re: appconfig, host.names

2016-04-27 Thread Niphlod
put there the host your app is on. it's mainly used to avoid sending emails with a wrong url, given that that is the only place you're going to need an absolute one ^_^ On Wednesday, April 27, 2016 at 7:58:47 AM UTC+2, Mirek Zvolský wrote: > > Please, an example for this. > (+ should be in the

[web2py] Re: running app from command line with no server startup window

2016-04-26 Thread Niphlod
m the name of the controller file I specified, but it is not > matching the file name that was produced when the app was compiled. > > On Tuesday, 26 April 2016 16:25:42 UTC-5, Niphlod wrote: >> >> nope, once again, it doesn't show ANY errors. Why are you stating that >> "it

[web2py] Re: Running Web2py on Oracle VM Virtualbox on Win 10

2016-04-26 Thread Niphlod
IMHO it'd be better to pinpoint the cause rather than installing a VM just to see why "it never takes" On Tuesday, April 26, 2016 at 11:54:18 PM UTC+2, Alex Glaros wrote: > > That's a good question Niphlod. Migrate = True (with Postgres) works for > an older win

[web2py] Re: running app from command line with no server startup window

2016-04-26 Thread Niphlod
nope, once again, it doesn't show ANY errors. Why are you stating that "it's expecting underscores for everything" ? views - underscore https://github.com/web2py/web2py/blob/master/gluon/compileapp.py#L483 models - dot https://github.com/web2py/web2py/blob/master/gluon/compileapp.py#L499

[web2py] Re: Running Web2py on Oracle VM Virtualbox on Win 10

2016-04-26 Thread Niphlod
given that web2py works fine with win, osx and linux I'd reaaally like to know how can it work "not okay" with any configuration you may throw at it (yep, it works on AIX too, but nobody really cares). The only valid reasons you may want to develop on a VM instead of on win are: - you're

[web2py] Re: Is it possible to chose the cache folder on disk?

2016-04-26 Thread Niphlod
be aware that there is/will be no support at all to specify your own cache dir, i.e. use at your own risk. it'll be 10 times better to pinpoint the unusual behaviour you're experiencing rather than use an hack On Tuesday, April 26, 2016 at 8:43:07 PM UTC+2, Anthony wrote: > > It should not be

[web2py] Re: running app from command line with no server startup window

2016-04-26 Thread Niphlod
a "dir" from compiled/ shows 26/04/2016 16:5822.911 controllers.appadmin.bg_graph_model.pyc 26/04/2016 16:5822.711 controllers.appadmin.ccache.pyc 26/04/2016 16:5822.636 controllers.appadmin.csv.pyc 26/04/2016 16:5822.761

[web2py] Re: running app from command line with no server startup window

2016-04-26 Thread Niphlod
when its loaded from the main web interface, broken > view. Same underscores vs periods error when I run start.bat. I compiled > and packed the welcome app from 2.14.5, loaded it into another web2py as > init, that's it. Same start.bat as above. > > On Tuesday, 26 April 2016 09:31

[web2py] Re: when trying to reset_password, I am getting the error server address not specified

2016-04-26 Thread Niphlod
that error is raised when an smtpserver is not configured (usually mail.settings.server) On Monday, April 25, 2016 at 10:57:50 PM UTC+2, Bhanu Teja P wrote: > > db.py > db = DAL('sqlite://storage.sqlite') > > from gluon.tools import Auth > auth = Auth(db) > > >

[web2py] Re: running app from command line with no server startup window

2016-04-26 Thread Niphlod
can you attach a minimal app that reproduces the error ? I can't replicate it. On Monday, April 25, 2016 at 9:26:55 PM UTC+2, Jacob Thoennes wrote: > > Yes, I packed it with the new version, same as the one I installed it in. > -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: running app from command line with no server startup window

2016-04-25 Thread Niphlod
you should pack the app in the same version it'll be executed ... did you copy the source and then packed on 2.14.5 and then executed on 2.14.5 or you kept the packed version of 2.13.x ? On Friday, April 22, 2016 at 9:29:05 PM UTC+2, Jacob Thoennes wrote: > > I was initially on 2.13, I just

[web2py] Re: Multi language database query

2016-04-25 Thread Niphlod
way: > languages = db((db.language_tr.id>0)).select() > for language in languages.exclude(lambda language: > language.translation_id.language_id!=system_language_id): > pass > > This looks somewhat ugly, I'm sure that there is a better way. > > perjantai 22. huhtikuuta 2016 22.02.40 UTC+3 Niphlod kir

[web2py] Re: Multi language database query

2016-04-22 Thread Niphlod
imho there's a reference not needed (the language_id in the language_tr table) that being said...let's build queries, step by step """ Basically I'm looking for a list of language_tr elements which has a translation_id which has a language_id which is same than users selected system language.

[web2py] Re: running app from command line with no server startup window

2016-04-22 Thread Niphlod
what version are you on? I think that problem got fixed not a long time ago. On Friday, April 22, 2016 at 6:36:10 PM UTC+2, Jacob Thoennes wrote: > > I'm trying to package my app like it says in the book: > > >

[web2py] Re: IS_IN_DB(set, ...) validator doesn't work with GAE

2016-04-22 Thread Niphlod
If I were you I'd log an issue over at pydal's repo. https://github.com/web2py/pydal/issues On Friday, April 22, 2016 at 7:11:36 PM UTC+2, David Manns wrote: > > I'm resubmitting as this has not been fixed. I understand the problem > better and have a workaround. > > My application runs on GAE

[web2py] Re: gluon/contrib/redis_utils

2016-04-22 Thread Niphlod
requests new page, > - with js setInterval() and ajax call > > > > > Dne pátek 22. dubna 2016 9:23:26 UTC+2 Niphlod napsal(a): >> >> doesn't seem at all something you absolutely NEED redis to do, but feel >> free to use it. >> You can use an RConn() instance

[web2py] Re: gluon/contrib/redis_utils

2016-04-22 Thread Niphlod
s + python module installed of course, that already works nice from > python. > > But in Web2py? Is it necessary to think about threads/queues ? > Or import the redis module and make one instance as bellow is enough: > >> import redis >> r = redis.StrictRedis() >&

[web2py] Re: gluon/contrib/redis_utils

2016-04-21 Thread Niphlod
that machinery is only needed for a module that needs to be used within web2py, as cache and session need (and should) use a single object per class with namespaced keys. Also, there's really no point or any performance benefit on using separate databases in redis, and they're unofficially

[web2py] Re: strange behaviour in after_insert callback

2016-04-21 Thread Niphlod
tried with f['amount']yet ? On Thursday, April 21, 2016 at 7:57:20 AM UTC+2, 黄祥 wrote: > > meet strange behaviour in after_insert callback, when using variable (e.g. > f.amount) is not work, but when using dict (e.g. f['amount'] ) work > models/db_wizard_4_subscription.py > # not work > def

Re: [web2py] Re: Nginx, uwsgi, on Windows

2016-04-21 Thread Niphlod
stack trace I pasted >> below. And like I mentioned, this connection was made without any evidence >> ... so yeah, I was writing this before I gave it too much thought or >> investigation. >> In any case, I'll do some more investigation and try to track down this >>

[web2py] Re: Nginx, uwsgi, on Windows

2016-04-20 Thread Niphlod
forget about uwsgi on windows. never really landed as production-ready. fortunately iis can run python without any hiccup and it's the current recommended way to deploy web2py in production on windows. that being said, I'm really eager to know how the hell you're getting gevent mixed up with

Re: [web2py] Re: ldap_auth, TLS implementation

2016-04-20 Thread Niphlod
th all the different > implementation of LDAP... Simone, do you know if we can at least test Open > LDAP easily? > > > > On Wed, Apr 20, 2016 at 10:29 AM, Richard Vézina <ml.richa...@gmail.com > > wrote: > >> :) >> >> On Wed, Apr 20, 2016 at 8:31 AM, Niphlod

[web2py] Re: ldap_auth, TLS implementation

2016-04-20 Thread Niphlod
no problem. it's better a false bug report than noone checking the code at all ^_^ On Wednesday, April 20, 2016 at 1:08:18 PM UTC+2, flando wrote: > > > right! my fault, didn't set "secure=True"... > > Thank you Niphlod! > -- Resources: - http://web2py.

[web2py] Re: ldap_auth, TLS implementation

2016-04-20 Thread Niphlod
https://github.com/web2py/web2py/blob/master/gluon/contrib/login_methods/ldap_auth.py#L608 On Wednesday, April 20, 2016 at 9:37:25 AM UTC+2, flando wrote: > > we are using 2.13.4, in this version it is missing. > sorry for my post if it meanwhile got integrated! :) > > -- Resources: -

[web2py] Re: ldap_auth, TLS implementation

2016-04-20 Thread Niphlod
ahem isn't this added yet when cacert is not None ? On Wednesday, April 20, 2016 at 9:14:32 AM UTC+2, flando wrote: > > Hi > > To have ldap over tls working I had to add the following lines > in gluon/contrib/login_methods/ldap_auth.py to regard the cert file: > > 567 def init_ldap( > >

[web2py] Re: How do I send same mail to a list of email ids?

2016-04-19 Thread Niphlod
mail.send has to,cc and ccn that take either a list or a string. to send to two email addresses in the "to", use mail.send(to=['ma...@example.com', 'ma...@example.com'], ) On Tuesday, April 19, 2016 at 10:24:34 PM UTC+2, Emmanuel Dsouza wrote: > > mail.send('ma...@some.com ' , #here i want

[web2py] Re: internal error:size does not fit in an int

2016-04-19 Thread Niphlod
awww... an application 2gb in size ? what's in there ? report it as a bug: dunno if it'll ever get fixed but seems that web2py is putting everything in memory before dumping to the tar. On Tuesday, April 19, 2016 at 1:05:12 PM UTC+2, Shaun Smith wrote: > > Hi > > I receive the following error

[web2py] Re: help setup nssm services in windows

2016-04-19 Thread Niphlod
path is still the path to the python executable. startup dir can be the dir of web2py, but is not essential arguments is the path to web2py.py plus options to the web2py commandline (e.g. c:\path\to\web2py.py -K appname) On Tuesday, April 19, 2016 at 2:47:23 PM UTC+2, Jason Solack wrote: > >

[web2py] Re: Problems setting up multiple domains

2016-04-19 Thread Niphlod
either that or set up apache to reverse proxy a web2py process (slow, but still better than facing that error). or check for the infinite issues people are having with apache here in this group and everywhere on google with mod_wsgi. On Monday, April 18, 2016 at 9:16:46 PM UTC+2, Marko

[web2py] Re: Problems setting up multiple domains

2016-04-18 Thread Niphlod
have you considered dropping apache in favour of nginx+usgi ? On Monday, April 18, 2016 at 6:45:23 PM UTC+2, Marko Poutiainen wrote: > > Hi everyone, > > I have tried to set up a web2py installation with two domains but I keep > getting the same internal error. I have checked previous

[web2py] Re: Web2py -> MYSQL issue when querying database in background applicaiton

2016-04-18 Thread Niphlod
isn't simply that you added test 7 with a NULL into the "updated" field instead of an empty value , i.e. '' ? On Monday, April 18, 2016 at 4:23:23 PM UTC+2, DenesL wrote: > > Your private test script works fine for me on web2py 2.14.05 with rocket > and ms sqlserver. > > In your post it says

[web2py] Re: web2py: Connection refused when Task Queue is running

2016-04-18 Thread Niphlod
when you do web2py.py -S . you're starting a process that presents a shell with the web2py environment: it doesn't serve any web pages in fact, "-S" stands for "shell". if you want the queue to be executed, it's correct to start it with -S but you must start ANOTHER process for serving

[web2py] Re: AppConfig and Storage

2016-04-15 Thread Niphlod
appconfig is the tool, you are the brain. Everyone has its own preferences. Personally I use a post-deployment step to fiddle with settings, as DEPLOYment is not DEVELOPment. You can use a SINGLE env variable to switch configs prod_conf = os.environ('isthisprod') if prod_conf:

[web2py] Re: AppConfig and Storage

2016-04-15 Thread Niphlod
or an env variable. On Friday, April 15, 2016 at 7:47:19 AM UTC+2, pbreit wrote: > > So what would be the strategy for having config settings for dev and > production? > > Would there be some way to branch on is_local? > > > On Sunday, July 19, 2015 at 12:06:42 PM UTC-7, Alex wrote: >> >> it's a

[web2py] Re: Scheduler not finding module

2016-04-14 Thread Niphlod
ok. more tests needed. a) start web2py shell executing the function with web2py.py -M -S app/default/foobar b) if a) works, queue the task, then start the scheduler manually with web2py.py -K app and see what happens a) is needed to see if the shell env is different from the web one b) is

[web2py] Re: Scheduler not finding module

2016-04-14 Thread Niphlod
what does it mean "from the url" ? On Thursday, April 14, 2016 at 9:31:20 PM UTC+2, peter wrote: > > It works fine if it is launched manually, ie I run the web2y function in >>> the scheduler from the url. >>> >> Peter > -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Using site packages with web2py

2016-04-14 Thread Niphlod
first of all, web2py is not python 3 compatible. On Thursday, April 14, 2016 at 6:02:20 PM UTC+2, Marko Seppälä wrote: > > Hi, > > I'm trying to import openpyxl to web2py without success. What is the right > way to do it? > > I have working openpyxl in my Windows environment and I'm able to use

[web2py] Re: Empty strings stored as null in database

2016-04-14 Thread Niphlod
I hear you and I'm happy (or not, not sure) to not being alone ranting about web2py's code quality and lack of tests. this was a serious bug that should have had the effect of retiring web2py's release until it was fixed (or at least loudly advertised). On Thursday, April 14, 2016 at 5:08:24

[web2py] Re: Scheduler not finding module

2016-04-14 Thread Niphlod
I was just asking because trying to identify any issues without any code is a pretty daunting task. Technically the scheduler uses only what python provides to spawn subprocesses, and they ususally are spawned on the same interpreter but I don't use 2.6 since ever so I really don't

[web2py] Re: Error: Permission denied to access property "document"

2016-04-13 Thread Niphlod
any "X-Frame-Options" header returned ? google around, there are tons of ready-baked solutions. On Tuesday, April 12, 2016 at 11:28:06 PM UTC+2, Nalab wrote: > > Hi > When trying to run pop-up window,I'm getting this error "Error: Permission > denied to access property "document"",, Anyone with

[web2py] Re: Scheduler not finding module

2016-04-13 Thread Niphlod
how many python(s) have you available ? it's possible that the inner process gets started with the default interpreter . BTW: those kind of issues are the reason behind virtual environments... On Wednesday, April 13, 2016 at 2:29:18 PM UTC+2, peter wrote: > > I have an issue with processes

[web2py] Re: Odd error

2016-04-13 Thread Niphlod
the permissions where changed, > what i'm more curious about is what the relationship between our admin app > and the other apps. Why would an error on our admin app cause instability > on all other apps. > > On Tuesday, April 12, 2016 at 3:33:51 PM UTC-4, Niphlod wrote: >&

[web2py] Re: Odd error

2016-04-12 Thread Niphlod
every process that is running the web2py app should have permissions to read and write into the web2py folder. if a sessions folder isn't found when the first request hits the app, web2py creates it, but it does so under the current security environment... Whoever is changing the permissions is

[web2py] Re: DatabaseError: database disk image is malformed

2016-04-12 Thread Niphlod
, 12 April 2016 09:39:04 UTC+2, Niphlod wrote: >> >> the system can be strained as long as it gets but a malformed database is >> an indicator that the VPS I/O subsystem is not responding correctly, or >> that the VPS gets brutally rebooted from time to time. The

[web2py] Re: DatabaseError: database disk image is malformed

2016-04-12 Thread Niphlod
d? I am constantly under that kind of attacks, not > worried that they will succeed though. > > On Monday, 11 April 2016 21:18:15 UTC+2, Niphlod wrote: >> >> seems that the i/o subsystem of your hosting is getting "tired". Google >> is full of information regarding

[web2py] Re: DatabaseError: database disk image is malformed

2016-04-11 Thread Niphlod
seems that the i/o subsystem of your hosting is getting "tired". Google is full of information regarding that particular error where are you hosting your app ? On Monday, April 11, 2016 at 9:02:09 PM UTC+2, Martin wrote: > > Hi, > > I am running a webshop built using web2py. Everything has

[web2py] Re: Slow TTFB debugging with Wing IDE

2016-04-08 Thread Niphlod
Thanks for the quick reply Niphlod. That was the first thing I tried but > it didn't help. Am I doing forget() correctly if I read a session attribute > and then call forget but never write to the session (until later of course)? > > Something I forgot to mention, some, but not all, the co

[web2py] Re: Slow TTFB debugging with Wing IDE

2016-04-07 Thread Niphlod
IMHO it's just sessions being locked to prevent concurrent modifications. if your ajax requests aren't using the session, put a session.forget(response) at the top of your function. http://web2py.com/books/default/chapter/29/04/the-core#session On Thursday, April 7, 2016 at 8:46:16 PM

<    1   2   3   4   5   6   7   8   9   10   >