[web2py] Re: Debugging Web2py applications.

2015-06-06 Thread Niphlod
I'd go with "print vars" simply. You'0ll be able to see in the console where web2py was started. in production however the safest thing to do for those kind of things is to use the logging module... but that's another story: to quickly develop I find myself quite pleased with the console opened

[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

[web2py] Re: Upgrade to Web2py 2.10.4 breaks date field search in sqlform.grid

2015-06-06 Thread Niphlod
ilter on the values from the SET, instead of getting a > drop down, you only get an empty text box. This also worked fine before the > upgrade. > > On Fri, Jun 5, 2015 at 2:11 PM, Niphlod > > wrote: > >> once again surrounded by a brilliant white light of not supporting &g

Re: [web2py] All messed up

2015-06-05 Thread Niphlod
did you by any chance update web2py using the "update" button on admin ? if so, and if you were running a rather old web2py instance, the updater probably left some files behind that shouldn't be there (mainly DAL structure with the new subpackage). See what the standard folder structure in gluo

[web2py] Re: Resource webservice built on web2py for web2py comunity [BETA]

2015-06-05 Thread Niphlod
On Friday, June 5, 2015 at 10:17:36 PM UTC+2, Rufus wrote: > > On Friday, June 5, 2015 at 3:35:08 PM UTC-4, Niphlod wrote: > >> BTW: until all snippets are continously tested, this is going to become >> the 4th incarnation of a "web2py snippet blog/container/etc&qu

[web2py] Re: OperationalError: (1045, "Access denied for user 'root;malher'@'localhost' (using password: NO)")

2015-06-05 Thread Niphlod
uhm. note that the uri is mysql://username:password@hostname/databasename it seems that you put a ; instead of a : between user and password. On Friday, June 5, 2015 at 6:26:00 AM UTC+2, Jose Galvan wrote: > > > Hi all.. > > Iam starting to learn web2py. I have been playing with DAL and was able

[web2py] Re: DatabaseError: SSL SYSCALL error: EOF detected (Intermitten

2015-06-05 Thread Niphlod
On Friday, June 5, 2015 at 6:26:00 AM UTC+2, Dan Hett wrote: > > I read through a few of these threads. If it is indeed a connection issue, > how do I test that within Web2Py? > I switched the DB to MySQL to see if that would make a difference and > received the same error. > It seems to create

Re: [web2py] Re: Recaptcha on pythonanywhere.com https error

2015-06-05 Thread Niphlod
book is for near-stable things. new can be only find in docstring. Fortunately we host API docs on readthedocs with full-text search go to http://web2py.rtfd.org/, insert "recaptcha2" inside the box, see the magic happening! (this

[web2py] Re: Upgrade to Web2py 2.10.4 breaks date field search in sqlform.grid

2015-06-05 Thread Niphlod
once again surrounded by a brilliant white light of not supporting different sets of specific css-widgets... issue https://github.com/web2py/web2py/issues/994 PR that fixes https://github.com/web2py/web2py/pull/995 On Friday, June 5, 2015 at 2:52:18 PM UTC+2, Massimo Di Pierro wrote: > > Please

[web2py] Re: Resource webservice built on web2py for web2py comunity [BETA]

2015-06-05 Thread Niphlod
not to be the buzzkiller but I won't post any example there that exists on web2pyslices.com that ATM has at least 2 killer features: social login and packages uploads. BTW: until all snippets are continously tested, this is going to become the 4th incarnation of a "web2py snippet blog/containe

[web2py] Re: Database migration problem

2015-06-05 Thread Niphlod
it seems that you updated also the databases folder of your production app or ... dunno. I don't see why so many peoples are running into this kind of errors (there are others intricacies but adding column ISN'T one of them). What DAL does with migration is pretty documented and understandable.

Re: [web2py] Re: Crud is deprecated?

2015-06-04 Thread Niphlod
> > > And remember that deprecated is meant to give you time to change over to > newer stuff, but the deprecated stuff could be removed completely at some > point. Your '54 Coupe could be banned from freeways or even public roads > except under special conditions of historic display. > > /dps

[web2py] Re: using anyserver.py in production

2015-06-04 Thread Niphlod
On Thursday, June 4, 2015 at 5:57:36 PM UTC+2, Lewis wrote: > > What about gunicorn as a wsgi server to simply stand between nginx and > web2py? > gunicorn behind nginx is a popular config, but usually is to have several gevented processes to bind on a single socket. There are several "workers

[web2py] Re: DatabaseError: SSL SYSCALL error: EOF detected (Intermitten

2015-06-04 Thread Niphlod
one is coming from pyscopg2, the other from pg8000 . By the looks of it, the last is trying to read 5 bytes that aren't there, so it's consistent with the previous analysis of a "flaky" connection to the database -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: using anyserver.py in production

2015-06-04 Thread Niphlod
cherrypy or rocket may sustain an average of 50 concurrent users (again, on an average linode server, etc etc etc). no multiprocess usage. no defense against common attacks like slowloris. I'm not advocating at all twisted, tornado or gevent 'cause your app needs to be rewritten to use what th

[web2py] Re: using anyserver.py in production

2015-06-03 Thread Niphlod
anyone is free to do whatever he/she wants. Few things to consider: uwsgi is by far the most complete piece of production-ready "thingy" to run your app into. Given that a frontend IMHO is required, when you set a reverse proxy to anyserver.py (vs setting uwsgi) if you don't have specific requi

[web2py] Re: using anyserver.py in production

2015-06-02 Thread Niphlod
use -i 0.0.0.0 to listen on all available interfaces. BTW#1: the default webserver (rocket) and cherrypy (what you seem to want using) have nearly the same performances BTW#2: unless you have some specific requirements, for an internet-facing server is ALWAYS recommended to use a real webserve

[web2py] Re: DatabaseError: SSL SYSCALL error: EOF detected (Intermitten

2015-06-02 Thread Niphlod
seems rather "famous". see https://github.com/psycopg/psycopg2/issues/263, https://devcenter.heroku.com/articles/postgres-logs-errors#pgerror-ssl-syscall-error-eof-detected, https://bitbucket.org/zzzeek/sqlalchemy/issue/3021/ssl-eof-not-detected-as-disconnect-in . I think (from a fast-read

[web2py] Re: MARKMIN problem with email addresses

2015-06-02 Thread Niphlod
I'm quite +1 . techinicality that just works for domain may not for everything else passed to regex_auto, and since eveybody is still typing *www.google.com* rather than *www.google.com.* I'd go with "mainstream" treatment. On Monday, June 1, 2015 at 5:32:44 PM UTC+2, David Manns wrote: > > Wel

[web2py] Re: Recaptcha on pythonanywhere.com https error

2015-06-02 Thread Niphlod
are you using use_ssl=True to initialize the widget ? BTW: recent web2py releases have recaptcha2 that doesn't suffer from this particular issue (i.e. it works with any scheme without explicitely specifying) On Monday, June 1, 2015 at 8:04:24 PM UTC+2, icodk wrote: > > My recaptcha works fine o

[web2py] Re: RuntimeError: no driver available Sybase

2015-06-02 Thread Niphlod
you need to use the python-sybase package . as any other (famous) package, it's available on pypi https://pypi.python.org/pypi/python-sybase On Tuesday, June 2, 2015 at 12:12:38 AM UTC+2, EF wrote: > > Hi, > I'm new to web2py and trying to test the connectivity to Sybase. > I tried testing this o

[web2py] Re: Silly out of band question about deploying web2py

2015-06-02 Thread Niphlod
use some platform that manages the "sys" part for you (e.g. pythonanywhere, heroku, etc,). You pay for it but if you don't want to have anything to do with "sys" because your business is not being a sysadmin. I really don't see the point of being forced to manage a system. On Tuesday, June

Re: [web2py] Re: Web2py adding additional and not wanted orderby

2015-06-01 Thread Niphlod
just to clarify: the fact that a query in pgadmin returns a somewhat ordered resultset "that you're good with", that you "test queries in raw postgresql before you implement" and that web2py shows the same result with auto_pagination=False is not in ANY scenario an assurance of the fact that yo

[web2py] Re: my site is broken

2015-05-31 Thread Niphlod
this can be a good poster for "why upgrade in the first place, why doing it on production without trying first on a VM, etc etc etc". Bashing "whatever" without knowing how to resolve issues afterwards hitting "next,next,next" seems a taddle bit counterproductive, if you want to learn to manage

[web2py] Re: What is Hooks in Database Administration in appadmin ?

2015-05-31 Thread Niphlod
if I'm not wrong it shows database callbacks (if any are defined.) On Sunday, May 31, 2015 at 11:11:20 PM UTC+2, Πέτρος Χατζηλάμπρος wrote: > > When I go to http://localhost:8000/[myapplication]/appadmin I see a tab > which is named Hooks. > > When I click on it it shows nothing. > > What is this

[web2py] Re: Strip Spaces

2015-05-29 Thread Niphlod
there are no functions in T-SQL accross backends that do what you ask, so you'll need to do it in python for rec in db(db.table.id >0).select(): rec.update_record(field=rec.field.strip()) On Friday, May 29, 2015 at 6:33:28 AM UTC+2, Jerry Liu wrote: > > Hello, all > > I want to update all of

[web2py] Re: _before_insert / update question

2015-05-28 Thread Niphlod
the book shows how to print every argument passed to those functions I dunno how to make the book clearer :°°°D before_insert def this_is_before_insert(some_dict): if 'last_name' in some_dict: some_dict['last_name'] = 'altering' + some_dict['last_name'] db.auth_user._bef

[web2py] Re: Web2py adding additional and not wanted orderby

2015-05-28 Thread Niphlod
auto_pagination = False. That being said, mind that without ordering, pagination is inherently incorrect On Thursday, May 28, 2015 at 12:33:25 PM UTC+2, Johann Spies wrote: > > Apologies for the unfinished message. The Gmail interface in the browser > and I am not really friends. > > The prob

[web2py] Re: _before_insert / update question

2015-05-28 Thread Niphlod
"modify data on a record before it's inserted/updated" _before_insert and _before_update take your "near to be committed record" and alter it in memory, then it inserts/update it. Don't know what are you asking for that is different from what web2py does. -- Resources: - http://web2py.com -

[web2py] Re: admin static files fail to load after web2py upgrade

2015-05-28 Thread Niphlod
nearly 2 years later, you should update your webserver config. check http://web2py.com/books/default/chapter/29/04/the-core#Static-asset-management On Thursday, May 28, 2015 at 7:16:55 AM UTC+2, Juozas Masiulis wrote: > > I've upgraded web2py to version 2.9.12-stable+timestamp.2015.01.17.06.11.0

[web2py] Re: Datetime fields in 2.11.0 Alpha

2015-05-28 Thread Niphlod
can you check your translation of the string %Y-%m-%d %H:%M:%S ? On Thursday, May 28, 2015 at 7:16:53 AM UTC+2, Donald McClymont wrote: > > I am getting an error on form validation of a datetime field with latest > version. Error is must be -MM-DD HH:MM::SS! Note there are two > colons betw

[web2py] Re: mail.send() feature in web2py for bounced email/ email address that doesnt exist

2015-05-28 Thread Niphlod
if the smtp from gmail shows that the email has been sent, there's nothing web2py can do. you can specify a bounce address and check it at a later time to see if the mail has been correctly delivered, but there's no way around it . On Thursday, May 28, 2015 at 7:16:55 AM UTC+2, Lasya Venneti wro

[web2py] Re: Bug in scheduler.py ?

2015-05-28 Thread Niphlod
nope, it's the same as default=datetime.datetime() . if default is callable, each time the function gets called, hence a new uuid is created. If instead is the result of a function, it's the same result of the same initiated instance. On Thursday, May 28, 2015 at 7:16:59 AM UTC+2, Christophe Me

[web2py] Re: how to put a controller name in a var if later want to execute the the controller name

2015-05-27 Thread Niphlod
a simple example can be better than a thousand words >>> a = 'hello' >>> b = 'world' >>> example = dict(a=a, b=b) >>> print example {'a': 'hello', 'b': 'world'} >>> example2 = {a : a, b : b} >>> print example2 {'world': 'world', 'hello': 'hello'} >>> -- Resources: - http://web2py.com - http:

Re: [web2py] wsgi / apache error

2015-05-27 Thread Niphlod
I suspect instead it's due to https://code.google.com/p/modwsgi/issues/detail?id=29&can=1 for reference (i.e. even if I don't think it's the issue at hand) web2py just needs to write: - to the cache/ folder (if you're using cache.disk) - the session/ folder (if you're using the default file-sto

[web2py] Re: ProgrammingError: column "worker_stats__tmp" is of type json but expression is of type text

2015-05-27 Thread Niphlod
Please drop the scheduler_worker table from the database and remove the file *_scheduler_worker.table from the databases/ folder of your application, then set migrate to True (a single request with migrate=True will suffice). The table will be recreated properly and the error will go away. The

Re: [web2py] Re: Is there a working bootstrap3 formstyle for auth?

2015-05-26 Thread Niphlod
May 23, 2015 at 2:58 AM, Niphlod > > wrote: > > uhm. could you point out what are the pages of the scaffolding app > you're > > referring to ? they don't seem that bad to me. > > > > On Friday, May 22, 2015 at 4:11:32 PM UTC+2, Richard Penman wrote: &

[web2py] Re: Strange behaviour of Web2py Component with Bootstrap3 Modal

2015-05-25 Thread Niphlod
you can't mix and match ALWAYS web2py's facilities and bootstrap ones. Specifically, an A(..., callback=something) builds and intercepts any click link on it, as it's supposed to be. If you want bootstrap to work, use other (their?!) methods, not web2py's one expecting that they work without iss

Re: [web2py] modifing model has no effect

2015-05-25 Thread Niphlod
If you changed the model, forms should reflect the changes istantly can you post your before and after model ? PS: beware of sqlite gotchas http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#SQLite -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[web2py] Re: Insert record in foreign DB

2015-05-25 Thread Niphlod
just define it with migrate=False and web2py won't issue any ddl statement. On Monday, May 25, 2015 at 2:21:21 PM UTC+2, Gael Princivalle wrote: > > Hello all. > > I use a PHP opensource application called PHPList for newsletter > management. > It use a Mysql db that we can call 'phplistdb'. > Us

[web2py] Re: update_record not working but not failing.

2015-05-22 Thread Niphlod
update_record is just an handy shortcut, so it shouldn't (under the hood it just calls update() on the right table with the right values), and I never heard of. On Friday, May 22, 2015 at 11:51:00 AM UTC+2, peter wrote: > > I am using sqlite 3. > > I have a ticket booking system. Transaction.sta

Re: [web2py] Re: Is there a working bootstrap3 formstyle for auth?

2015-05-22 Thread Niphlod
uhm. could you point out what are the pages of the scaffolding app you're referring to ? they don't seem that bad to me. On Friday, May 22, 2015 at 4:11:32 PM UTC+2, Richard Penman wrote: > > I tried those bootstrap styles from latest source and they seem to > work well for SQLFORM, however face

[web2py] Re: return locals()

2015-05-22 Thread Niphlod
you're the only one knowing what the view uses. using locals() is good for development, then you'll need to return a dict holding just what's needed but there's no facility to do it. On Friday, May 22, 2015 at 7:11:24 PM UTC+2, Annet wrote: > > I have functions that return locals(), I wonder

[web2py] Re: initilize GPIO in web2py-Scheduler

2015-05-22 Thread Niphlod
every scheduler task is executed within an isolated process. I don't know the internals of GPIO but I guess you'd need either: - istantiate gpio, retrieve the value, act upon it (e.g. setting a new value) - set two tasks: one (the 1st) that either is repetitive but stores somewhere if it ran cor

[web2py] Re: Possible bug in redis_cache.py with multiple apps served by different domains

2015-05-21 Thread Niphlod
no worries, PR sent out https://github.com/web2py/web2py/pull/974 On Thursday, May 21, 2015 at 9:25:12 PM UTC+2, Lisandro wrote: > > Awesome! The fix worked like a charm ;) > > Thank you very much Niphlod, I really appreciate your help, you're > definitely a wise "w

[web2py] Re: Possible bug in redis_cache.py with multiple apps served by different domains

2015-05-21 Thread Niphlod
On Thursday, May 21, 2015 at 7:13:10 PM UTC+2, Lisandro wrote: > > Let me post a more detailed example. > > This is a test with three applications. > > Two of them ("demo" and "fundapres") use redis to cache the html for > default/index, with this decorator (notice empty prefix): > @cache.action

[web2py] Re: scheduler trouble

2015-05-21 Thread Niphlod
On Thursday, May 21, 2015 at 6:13:56 PM UTC+2, Manuele wrote: > > Hi, > I need a task that runs every 20" but ti seams that sometimes it gets > more than the 19" I setup for the timeout. > set 18'' . it's a "python issue" that the timeout is not that precise-thing to rely on. In their defens

[web2py] Re: Possible bug in redis_cache.py with multiple apps served by different domains

2015-05-21 Thread Niphlod
the prefix is dependant from request.application, so as long as that one changes, I don't see how it'll be merged with another application. The keys you have seems to point out that "demo" is the application name -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - h

Re: [web2py] Re: @cache.action not working properly with nginx, is any additional configuration required?

2015-05-20 Thread Niphlod
halt!. Either you use web2py (and we can help with that) OR nginx (and you'll need to cfr THEIR support for a proper config). There's no facility whatsoever for web2py to cache the object and for nginx to fetch it from the same memcached instance. That being said, using cache.ram in multipr

[web2py] Re: PostgreSQL connection hangs on insert

2015-05-20 Thread Niphlod
okay, okay, psycopg2 is slightly less buggy than pg8000 but "attempted to connect" is not something driver related. Your instance is completely going offline for a long period of time. On Wednesday, May 20, 2015 at 8:04:10 AM UTC+2, Auden RovelleQuartz wrote: > > have you tried using the p

[web2py] Re: Text that follows a double-quote inside of current.T() is chopped when used as textarea placeholder

2015-05-17 Thread Niphlod
why are you escaping the double quotes ? On Sunday, May 17, 2015 at 6:29:00 PM UTC+2, Spokes wrote: > > I'm attempting to include a relatively lengthy passage of text in a > textarea placeholder; the text contains some terms within double-quotes, > and the text string is passed to current.T(). T

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-13 Thread Niphlod
there's a problem, I think. max_empty_runs=5 means "do 5 loops, if you didn't pick or assign any tasks, die". you said your workers are started by a cron job every 2 minutes (god knows why, but that's your choice). your instantiation doesn't touch the heartbeat parameter, which is by default 3

[web2py] Re: best practice for internal function

2015-05-13 Thread Niphlod
> > that this function is also available from outside (ajax) and not just > within my controllers def testfunction(dummy=None): return dict() in a controller can't be called as a function from a web request. tl;dr: a function defined with any number of arguments isn't callable in a web

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-13 Thread Niphlod
the scheduler doesn't depend on nginx, uwsgi and such. it's an external process that communicates with the app with the database as the only mean of communication. If you queue something and you verify that is in the scheduler_task table, and the scheduler doesn't see it, it's because it's poin

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-12 Thread Niphlod
2.10.3 and 2.10.4 didn't change a single bit about the scheduler. Check again. There MUST be some hiccup in your deployment code. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/l

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-12 Thread Niphlod
not really. exceptions are not shown and "nothing to do" kinda leaves up nothing to imagination you can inspect the worker_stats column on the worker that is also a ticker but I assume you won't find anything. you can run this query to check for available tasks sw, st, sd = db.scheduler_w

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-12 Thread Niphlod
something is not adding up. if your app is called medios...and the log shows DEBUG:web2py.scheduler.medios ... why are you trying to start it with "webmedios" ?!?!?! On Tuesday, May 12, 2015 at 10:05:35 PM UTC+2, Lisandro wrote: > > Thanks Niphlod. I double checked, and the

[web2py] Re: How to move a set of view,edit,delete buttons from last column to first column on SQLgrid?

2015-05-12 Thread Niphlod
takend straight from the book at http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid-and-SQLFORM-smartgrid *buttons_placement and links_placement both take a parameter ('right', 'left', 'both') that will affect where on the row the buttons (or the links) will be pla

[web2py] Re: Export to csv is not taking label from model file where as Grid does.

2015-05-12 Thread Niphlod
double. replied in the other thread. On Tuesday, May 12, 2015 at 7:07:17 PM UTC+2, Sujata Aghor wrote: > > ​ > ​​ > Hi, > In my model file I have defined table and Label for the fields like this - > db.define_table('mytable', > Field('fname', 'string', length=12, writable=Fals

[web2py] Re: Export to csv which is not taking label from model file, where Grid takes.

2015-05-12 Thread Niphlod
the export are for raw processing, so they get the same result as you would get - for practical purposes - from db(query).select().as_csv() On Tuesday, May 12, 2015 at 7:07:40 PM UTC+2, Sujata Aghor wrote: > > > Hi, > In my model file I have defined table and Label for the fields like this - > d

[web2py] Re: What's the proper way of using scheduler for multiple apps with one only db?

2015-05-12 Thread Niphlod
seems that there aren't any tasks in the database the scheduler is looking in. Sure that there are no misconfigurations ? BTW: there's nothing wrong with your approach. A worker needs a "-K" argument only to inherit initialization options from that app: it's perfectly capable of processing tas

[web2py] Re: MSSQL and auth.signature

2015-05-10 Thread Niphlod
this is a well-known "bug" . MSSQL doesn't support creating references with cascades that reference something else that cascades (i.e. only one is allowed). There's a workaround : it's all documented here : http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#MSSQL--Micr

Re: [web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Niphlod
that was exactly what I was thinking about: same order for both, and alphabetical is kinda universal. Won't be a long-standing issue but right now I need to go to bed. Can you please raise an issue on github ? Just to keep it tracked. -- Resources: - http://web2py.com - http://web2py.com/boo

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Niphlod
for both functions and views or only for views ? On Friday, May 8, 2015 at 5:28:55 PM UTC+2, Gael Princivalle wrote: > > Is it possible in new web2py versions to change it to alphabetical? > > Il giorno venerdì 8 maggio 2015 17:07:10 UTC+2, Niphlod ha scritto: >> >> the or

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Niphlod
the order comes from glob.glob() . from what I recalled, it returned alphabetically sorted results. Seems instead - checking the docs - that "The list is in arbitrary order" . sorry for the misdirection. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github

Re: [web2py] Re: MSSQLAdapter missing?

2015-05-08 Thread Niphlod
again, not a web2py issue per se. what does happen when you do this ? import pyodbc connStr = 'DRIVER={ODBC Driver 11 for SQL Server};SERVER=server;DATABASE=database;port=port;domain=WSPG;UID=user;PWD=passwd' conn = pyodbc.connect(connStr) cur = conn.cursor() cur.execute('select 1') print cur.fe

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Niphlod
views are alphabetical. On Friday, May 8, 2015 at 2:49:47 PM UTC+2, Gael Princivalle wrote: > > Ok for 'exposes' they are in the order they are define. > And for 'edit views' ? > > Il giorno venerdì 8 maggio 2015 13:24:14 UTC+2, Niphlod ha scritto: >> >

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Niphlod
hopefully they either are alphabetical or in the same order they're defined :D ... some logic should be there :P On Friday, May 8, 2015 at 10:07:50 AM UTC+2, Gael Princivalle wrote: > > Hello. > > When I open in the editor a controller, at the top controller functions > are listed in 'exposes' a

Re: [web2py] Pydal issues

2015-05-08 Thread Niphlod
fixed, btw. On Thursday, May 7, 2015 at 9:49:40 PM UTC+2, José Borba wrote: > > Thank you, Niphlod and Richard, to take care about. > > Cheers, > > 2015-05-07 16:18 GMT-03:00 Niphlod >: > >> unfortunately, bad commit happens. we know already. >> htt

[web2py] Re: MSSQLAdapter missing?

2015-05-07 Thread Niphlod
On Thursday, May 7, 2015 at 6:01:17 PM UTC+2, Ron Chatterjee wrote: > > May be now people will start using mongodb and I will get all my question > answered! lol > > it doesn't have nothing to do with it. @carl: looks like you screwed something up... latest web2py version should use pydal "emb

Re: [web2py] Pydal issues

2015-05-07 Thread Niphlod
unfortunately, bad commit happens. we know already. https://github.com/web2py/web2py/commit/6f91fdd8332beb5e6a17a1444655e9b9f22e2f4c#commitcomment-11073544 On Thursday, May 7, 2015 at 9:06:51 PM UTC+2, Richard wrote: > > I had the same issue last night trying to clone web2py... pydal never > sho

Re: [web2py] deploment on an obsolete Debian 5 server

2015-05-07 Thread Niphlod
rather recently https://github.com/web2py/pydal/issues/60 (20 march) On Thursday, May 7, 2015 at 3:39:05 PM UTC+2, Alan Etkin wrote: > > @Michelle > > Looks like the backports does not include python 2.7 (at least with the > sources I searched so far). > > @Simone > >> we don't support python 2.5

[web2py] Re: MSSQLAdapter missing?

2015-05-07 Thread Niphlod
still there. https://github.com/web2py/pydal/blob/master/pydal/adapters/mssql.py . noone removed anything. On Thursday, May 7, 2015 at 3:41:28 PM UTC+2, Carl Petersen wrote: > > Hello All, > > Working with the latest versions of web2py and it seems that my sql server > connections are breaking.

[web2py] Re: Postgresql problems with 2 tabs

2015-05-07 Thread Niphlod
try to use different formname= argument for each page. On Thursday, May 7, 2015 at 12:14:38 PM UTC+2, Gael Princivalle wrote: > > Hello all. > > I've moved a db from sqlite to postgresql, but I've got a strange problem. > With only one tab, ok. > If I have two tabs with the same application, it se

Re: [web2py] downloading old web2py version from github

2015-05-07 Thread Niphlod
*unable to open database file* doesn't mean that web2py isn't running. Probably the earlier version doesn't contain appconfig, which your app seems to rely on for configuration... On Thursday, May 7, 2015 at 1:12:25 AM UTC+2, Richard wrote: > > Hello, > > I was wanting to get an old version

[web2py] Re: After changing db adapter "relation 'auth_user' already exists"

2015-05-06 Thread Niphlod
the whole uri is inspected to determine the prefix of .table files, so when you change the adapter, a migration is triggered. that being said, it's pretty easy to regenerate .table files ... - set fake_migrate_all=True - hit appadmin one time - remove fake_migrate_all=True voilà. Optionally you c

[web2py] Re: cache.redis server unavailable = traceback. Bug?

2015-05-06 Thread Niphlod
I was thinking about a major overhaul of the connection algorithm. Redis is improving quickly and more and more connection options are made available at each release. Both redis_cache and redis_sessions should be able to work on a "redis-like" connection object. In that rewrite I'd add this "fla

Re: [web2py] deploment on an obsolete Debian 5 server

2015-05-06 Thread Niphlod
we don't support python 2.5 from some time.. it's possible that "I can't import" is a result of "tried and failed" rather than "didn't find it". On Wednesday, May 6, 2015 at 7:50:18 PM UTC+2, Alan Etkin wrote: > > > Alan, if you need to update the interpreter you can look at backports:

[web2py] Re: cache.redis server unavailable = traceback. Bug?

2015-05-06 Thread Niphlod
up until now, cache behaviours in web2py are a taddle bit different than the rest of the world. cache(s) in web2py usually mean "I'd like to compute something huge one time only" and so the general idea is that if you need to compute it, you should be damn sure to do so. You may also be relying

Re: [web2py] Re: grid and field_id

2015-05-05 Thread Niphlod
On Tuesday, May 5, 2015 at 9:47:10 PM UTC+2, Massimiliano wrote: > > > I understand but get things screwed as you as saying is a programming > error. > There are things that are not "foreseen" by developers and web2py generally doesn't do lots of typechecking (under the consensum that who appr

[web2py] Re: Using Travis CI to test a web2py app on Github

2015-05-05 Thread Niphlod
THAT hard. On Tuesday, May 5, 2015 at 10:43:19 PM UTC+2, Ian W. Scott wrote: > > I was distracted from this thread, but a belated thanks for your response, > Niphlod. To clarify, the error I posted was from Travis CI's remote > process. I have no problem running my tests lo

Re: [web2py] how to run tests over pydal locally?

2015-05-05 Thread Niphlod
w lines of the scope (let say the > function call) that failed... That why I ask the question... If this is not > possible for now, too bad. > > Richard > > On Mon, May 4, 2015 at 3:20 PM, Niphlod > > wrote: > >> ok, rephrasing: *in order to gain any advanta

[web2py] Re: Is it possible to create a webservice funcion for login (instead of basic authentication)?

2015-05-05 Thread Niphlod
usually services do not make use of session cookies, that are the ones web2py checks. A service should use something like basic authentication... On Tuesday, May 5, 2015 at 6:57:23 PM UTC+2, Lisandro wrote: > > I'm creating a XMLRPC webservice with web2py, everything works perfect. > In order to

Re: [web2py] Re: grid and field_id

2015-05-05 Thread Niphlod
as you're explaining it, you were using it wrongly. field_id needs to be a field that comes from either the table you're passing OR a field from a table that gets included when you pass a set, or everything gets screwed: details, selectable, view, edit, etc use the field_id to identify the reco

Re: [web2py] how to run tests over pydal locally?

2015-05-04 Thread Niphlod
r as the py.test docs says, you shouldn’t need to rewrite them. > > py.test understands unittest tests. > > > On 3 May 2015, at 09:17, Niphlod > wrote: > > you need to rewrite the entire test-suite. > > On Thursday, April 30, 2015 at 8:46:38 PM UTC+2, Richard wrote: &

[web2py] Re: json-encoded requests in web2py

2015-05-04 Thread Niphlod
web2py understands POST requests that are either - multipart/something - application/json that is coming from the content-type specified in the request itself. web2py behaves accordingly to the content-type...json strings are unicode by default, so I really don't see the issue on having fir

[web2py] Re:

2015-05-04 Thread Niphlod
.backgroud is set on web2py-bootstrap3.css . container-fluid is a basic class from boostrap3 On Monday, May 4, 2015 at 5:56:36 PM UTC+2, Александр Остыловский wrote: > > hello! > File index.html contains next string: > > But I have not found where this class defined. > May be I have to define

[web2py] Re: scheduler_run table remains empty

2015-05-04 Thread Niphlod
is your task returning something ? if it's not returning anything, by default the corresponding scheduler_run record is deleted. On Monday, May 4, 2015 at 5:56:36 PM UTC+2, Christophe Meessen wrote: > > I'm using queue_task to execute a task once at a predefined time. The task > itself calls que

[web2py] Re: recaptcha is not work in web2py latest version

2015-05-04 Thread Niphlod
is there at least something or it just renders as a void ? On Monday, May 4, 2015 at 6:46:56 PM UTC+2, 黄祥 wrote: > > yes you right, it related with the form.elements > e.g. > form.element('#submit_record__row').insert(-1,TR('', > Recaptcha(current.request, >

[web2py] Re: recaptcha is not work in web2py latest version

2015-05-03 Thread Niphlod
seems not an issue on recaptcha but on form being None. read the exception ! On Thursday, April 30, 2015 at 4:05:57 PM UTC+2, 黄祥 wrote: > > hi, > > i realized that recaptcha is not work in web2py latest version. > e.g. > def contact_us(): > email = 'a...@a.com ' > from gluon.tools import R

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-05-03 Thread Niphlod
seems that the same thing that happened a long time ago on travis-ci: glad you worked it out, but I'm really unsure why different regions should carry different versions of the same operating system. On Thursday, April 30, 2015 at 6:57:08 PM UTC+2, Pengfei Yu wrote: > > Hi Niphlod,

Re: [web2py] how to run tests over pydal locally?

2015-05-03 Thread Niphlod
pydal.helpers.methods import smart_query >>> >>> the above returns "invalid syntax" >>> >>> Richard >>> >>> On Wed, Apr 29, 2015 at 4:28 PM, Niphlod >>> > wrote: >>> >>>> oh my. Add to __init__ ^_^

[web2py] Re: A text field in PostgreSQL is mixing unicode and str types

2015-05-03 Thread Niphlod
can you post an example app to reproduce the issue ? On Thursday, April 30, 2015 at 9:18:13 PM UTC+2, Chris wrote: > > I'm using web2py with PostgreSQL and it's working pretty well, however, > there's a weird problem. When I load a row with a text column in it, that > column isn't one consistent

[web2py] Re: Optimize js, css seems to compute minify over and over

2015-05-03 Thread Niphlod
On Friday, May 1, 2015 at 8:53:05 AM UTC+2, Joe Barnhart wrote: > > I haven't used response.optimize_js and css very much, but I just enabled > them on my test site. As I expected, it took a long time to load my page > the first time (around 15 seconds) as web2py concatenated and minimized the

[web2py] Re: websocket_send() on db insert

2015-05-03 Thread Niphlod
use an _after_insert callback. On Friday, May 1, 2015 at 11:44:12 AM UTC+2, sasogeek wrote: > > is there a way to execute some script anytime there's a db insert (either > from a form or by manual insert query, or any db query for that matter)? > and by script, i'd want to use websocket_send to

[web2py] Re: Possible scheduler problem with precent_drift, next_run_date after tasks not run

2015-05-03 Thread Niphlod
a task doesn't have an API to be "restarted"... I think the real issue is how did you "restart" it, not web2py code. A recurring task that fails stops its lifecycle there. On Sunday, May 3, 2015 at 8:33:06 AM UTC+2, pbreit wrote: > > I think I'm running into a scheduler problem where I have 25 j

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-30 Thread Niphlod
On Wednesday, April 29, 2015 at 11:53:56 PM UTC+2, Pengfei Yu wrote: > > Hi Niphlod and Dave, > > I think the worker is deleted because the the last heartbeat doesn't > change for a while. When I comment out the line "#dead_workers.delete()" in > gluon/schdeule

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Niphlod
Richard > > On Wed, Apr 29, 2015 at 4:13 PM, Richard Vézina > wrote: > >> :) >> >> I don't test enough!! >> >> Richard >> >> On Wed, Apr 29, 2015 at 4:08 PM, Niphlod > >> wrote: >> >>> some time I just d

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Niphlod
some time I just don't know what's going on with my writing. Am I really that obscure ? can you spot the difference from mine *python -m unittest -v tests* and yours *python -m unittest -v validation.py* ? To be more precise (and abnoxious, maybe). Place yourself in the root dir of pydal. t

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-29 Thread Niphlod
whoa. Thank god I put some statistics in to help with debugging.. It seems that the worker processes are handling one task and dieing in the middle of the process. Also, it seems that your task is never-ending. workers that haven't a task to be processed are running fine (empty_runs on

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