[web2py] Re: scheduler sincronization

2013-03-25 Thread Niphlod
The scheduler is not as "precise" as you would because there are some design considerations to think of The "uber-costraint" is that a worker can execute only one task at a time --> if the scheduler is busy with something else, queued tasks can be "delayed" down the line If the worker is f

[web2py] Re: Table scrollbar problem in IE

2013-03-25 Thread Niphlod
file a bug for it, so it gets tracked. ... On Monday, March 25, 2013 8:01:18 PM UTC+1, Mark wrote: > > Derek, > > It is a great solution. Thank you so much! I hope this "-ms-overflow-x: > scroll;" should be included in SQLFORM.grid by default. > > Mark > > On Monday, March 25, 2013 1:49:03 PM UTC

Re: [web2py] Re: Help on a web2py query

2013-03-25 Thread Niphlod
your original query retrieves only 3 rows, not the last 3 rows for each capitulo On Saturday, March 23, 2013 7:14:01 PM UTC+1, Tito Garrido wrote: > > Yes, you got it... > > > On Sat, Mar 23, 2013 at 9:33 AM, Niphlod >wrote: > >> so, you want the last 3 capitulo

[web2py] Re: web2py and timezones

2013-03-25 Thread Niphlod
beware that the offset is NOT the same thing as the timezone (DST adds another layer of complexity) On Monday, March 25, 2013 6:40:26 PM UTC+1, Derek wrote: > > I'd rather store the dates in the database in local time with the offset > stored (ie take out the [:19]). > > On Sunday, March 17, 201

Re: [web2py] Re: scheduler sincronization

2013-03-25 Thread Niphlod
+14s = 314seconds ) > > Given these starting values, it seems that only the last one is under 315. > I think we should investigate more how scheduler runs repetitive tasks. > > > > Paolo > > > 2013/3/25 Niphlod > > >> The scheduler is not as "precis

Re: [web2py] Re: scheduler sincronization

2013-03-25 Thread Niphlod
io) On Monday, March 25, 2013 10:07:45 PM UTC+1, Paolo valleri wrote: > > My task is available here: > https://github.com/ilvalle/scapp/blob/master/models/scheduler.py > As you can see the difference is related to the external request. Asap I > will try your app too. > > P

Re: [web2py] Re: scheduler sincronization

2013-03-25 Thread Niphlod
On Monday, March 25, 2013 10:46:12 PM UTC+1, Paolo valleri wrote: > > I didn't get your point, with one repetitive task, should I start the > scheduler with two or more workers? If so, I will try it. > The point is that the thread that manages some logic every heartbeat seconds is the one in c

[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Niphlod
the form has normally the label of that field . headers are for the table representation only On Tuesday, March 26, 2013 11:01:03 AM UTC+1, Andrii Pitukh wrote: > > I created the following form: > > SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1')) > > The names of colu

[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Niphlod
Pitukh wrote: > > Can you write a code example? SQLFORM constructor has 'labels' parameter, > but SQLFORM.grid doesn't have it. > > On Tuesday, March 26, 2013 12:20:10 PM UTC+2, Niphlod wrote: >> >> the form has normally the label of that field . header

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Niphlod
duler debug log. > > > Paolo > > > 2013/3/25 Niphlod > > >> >> >> On Monday, March 25, 2013 10:46:12 PM UTC+1, Paolo valleri wrote: >>> >>> I didn't get your point, with one repetitive task, should I start the >>> scheduler wi

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Niphlod
er different names are for an internal problem or > something different. > Do you think that should be fixed by using a different db engine? > > Paolo > > On Tuesday, March 26, 2013 12:42:14 PM UTC+1, Niphlod wrote: >> >> with the default logging.conf the timesta

[web2py] Re: web2py, mod_proxy and redirection

2013-03-26 Thread Niphlod
well, the underlying problem with this architecture is that on / apache rewrites internally from /whatever/whatever2 to /whatever/whatever2 on the default instance. From this standpoint, the default behaviour of web2py is tuned "accordingly" to what apache is doing. On /dev/ apache rewrites int

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Niphlod
though the current "recommended" way is to code such "views" on a different controller and embed those "views" as components http://web2py.com/books/default/chapter/29/03?search=wiki#Components On Tuesday, March 26, 2013 4:40:17 PM UTC+1, Alan Etkin wrote: > > I've going through the web2py group

[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-26 Thread Niphlod
we should add some features to the standard flash message there are some messages that are good to behave as "sticky" (click ensures the message is read by the user) and some that are "niceties" that can fade out . We should only agree on which features use and what variables use as a stan

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Niphlod
gt; >>> >>> import sqlite3 >>> >>> print sqlite3.version >>> 2.6.0 >>> >>> print sqlite3.sqlite_version >>> 3.7.9 >>> But, if the db lock is not the problem, the test application is very >>> easy, where is it s

Re: [web2py] Re: scheduler sincronization

2013-03-27 Thread Niphlod
INFO - TICKER: tasks are 0" > even the log: "DEBUG - Assigning tasks..." is missing. > could this mean that the function wrapped_assign_tasks is not called at > all? > > > > > Paolo > > > 2013/3/26 Niphlod > > >> here's the patch. I pur

[web2py] Re: signed url

2013-03-27 Thread Niphlod
by default requires_signature checks for all vars and args ... you're generating the signature without taking into consideration the & data part. On Wednesday, March 27, 2013 11:55:21 AM UTC+1, yashar wrote: > > > here is the link : > > window.location.href = > '{{=URL('CS','close_inquer

Re: [web2py] Re: scheduler sincronization

2013-03-27 Thread Niphlod
yeps. this is expected, but every ~15 seconds that turns to "True" (meaning more or less "I'm the Ticker, I'm free, I was free in the last 15 seconds, let's see if there are any submitted (or repeating) tasks to assign"). I don't have a python interpreter ATM but let's break up the logic, so ev

Re: [web2py] Re: scheduler sincronization

2013-03-27 Thread Niphlod
e: 'DEBUG - Assigning > tasks..' but I didn't see it because I have 'INFO - pop task True False', > the last False, means that self.do_assign_tasks was False. Later, the > worker_status[0] > is ACTIVE so it would set do_assign_tasks to True but it is too late. > Gi

[web2py] Re: Parsing smartgrid request.args - is there a better way?

2013-03-27 Thread Niphlod
depends on what you ask for the kind of functionality you need. Generally smartgrid is smart, but can't figure out all the business logic required by your (and everyones) app. are you in the need of a wrapper to see what table/form is shown ? Just write a general one and apply it instead of repe

[web2py] Re: signed url

2013-03-27 Thread Niphlod
this is a duplicate of https://groups.google.com/forum/?fromgroups=#!topic/web2py/c4uZ36Gw7WY ... taken care of already by Anthony ^_^ On Wednesday, March 27, 2013 4:36:25 PM UTC+1, Massimo Di Pierro wrote: > > user_signature requires that you are logged in. Are you logged in when you > generat

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Niphlod
boys . how can the id be present if what you're trying to insert is not yet a row in a table On Wednesday, March 27, 2013 8:18:38 PM UTC+1, Roberto Perdomo wrote: > > Ummm, the id is readable? > > db.table.id.readable = True > El mar 27, 2013 12:55 PM, "Tito Garrido" > > escribió: > >>

[web2py] Re: using a representation of an absolute URL to update a db?

2013-03-27 Thread Niphlod
so, you have an url (i.e. a string) that needs to return an image. you should have a controller that, when that URI is matched, returns the image after increasing its number_visited value seems pretty standard to me On Wednesday, March 27, 2013 7:15:12 PM UTC+1, Lamps902 wrote: > > Let's

Re: [web2py] Re: scheduler sincronization

2013-03-27 Thread Niphlod
it was just a trial. Explaining it further, let's see if someone spots the **supposed** implementation error In order to separate transactions and avoid "task contention" among several workers, we need the **master** steps to both assign tasks and process tasks. The **thread** steps insert

[web2py] Re: using a representation of an absolute URL to update a db?

2013-03-27 Thread Niphlod
uhm... I didn't quite understand, but it seems that you want different things to happen when "printing" the url and when "accessing" the url. Why is hard separating "printing a link" logic from the "accessing the link" one ? It's a common "construct", i.e. on one page click here to "like" the i

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Niphlod
st() >> last_id = int(last_row[`table.id`]) >> return last_id + 1 >> >> This was written from my cel phone and dont test it but hope that helps >> ;-) >> El mar 27, 2013 3:25 PM, "Roberto Perdomo" >> > >> escribió: >> >

Re: [web2py] using the IS_URL validator with complex URLs

2013-03-28 Thread Niphlod
send a patch with tests and you'll have it :P On Wednesday, March 27, 2013 11:12:02 PM UTC+1, Derek wrote: > > Also looks like the TLDs don't include the internationalized country code > top level domains, only the test ones. > > On Wednesday, March 27, 2013 2:57:00 PM UTC-7, Derek wrote: >> >> I

[web2py] Re: pySerial - how to open port

2013-03-28 Thread Niphlod
there's no way that a module running on cherrypy doesn't work under web2py. Seems a permission problem, so you need to start web2py with the same user you're using for making that work with cherrypy. -- --- You received this message because you are subscribed to the Google Groups "web2py-use

[web2py] Re: Issues running auth.wiki() based app in GAE launcher

2013-03-28 Thread Niphlod
GAE doesn't work with sqlite, but with its own storage.. every data you stored in sqlite is not available. If you want to migrate tables you can export them using appadmin while working on sqlite and then start the app in the GAE launcher and import the previously saved data into it. On Thu

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-28 Thread Niphlod
they were edited at least one time for each line, so the diff kinda reports all the removed and all the added lines alltogether. That's one of the reasons I made diffbook "hunks" commit by commit. On Thursday, March 28, 2013 12:51:54 PM UTC+1, Alan Etkin wrote: > > I can make this. Translators ne

[web2py] Re: Issues running auth.wiki() based app in GAE launcher

2013-03-28 Thread Niphlod
you can import and export data from appadmin. On Thursday, March 28, 2013 1:17:04 PM UTC+1, Spring wrote: > > Hi Niphlod, > > Thank you for the replay. It explains clearly. However, I understand how > to export database from appadmin, but for importing do I have to write the

[web2py] Re: web2py, mod_proxy and redirection

2013-03-28 Thread Niphlod
> > w2p does not know this - I was using proxypassreverse to make > modifications to the > link on the way back. > Watch out ... proxypassreverse rewrites eventually only headers (i.e. redirects), not the urls embedded in your returned webpage. > > >> Unless you play a lot with rewritecon

[web2py] Re: Can file/upload field value be retained when form has errors/is not accepted?

2013-03-28 Thread Niphlod
It's a bad design choice using a single table with lots of fields plus an attachment (if the attachment is large). I always store attachments in a separate table. That being said, I don't think that keepvalues will do the trick, cause basically keepvalues sends back to the client the contents an

[web2py] Re: JSON and COUNT: avoid _extra field?

2013-03-28 Thread Niphlod
I don't think there's a way unless you rewrite your "dati" before returning it, or supply your own processor() to the select(). all "derived" fields of a select are stored into the _extra argument of the resulting Rows object with the defaults... On Thursday, March 28, 2013 5:11:59 PM UTC+1, R

[web2py] Re: Can file/upload field value be retained when form has errors/is not accepted?

2013-03-28 Thread Niphlod
erns" in the first place, so your app would be less lenient to, e.g. retrieve the file contents and discard it without using it. On Thursday, March 28, 2013 5:48:35 PM UTC+1, Lamps902 wrote: > > Thanks, niphlod and Anthony - some good suggestions and considerations > mentioned t

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-28 Thread Niphlod
made it better just now ignoring EOL diffs.thanks for the hint. If you want to reproduce the behaviour, git diff --ignore-space-at-eol .. On Thursday, March 28, 2013 1:36:10 PM UTC+1, Alan Etkin wrote: > > they were edited at least one time for each line, so the diff kinda >> reports all

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-28 Thread Niphlod
you mean both on the original and on the new "stacks" ? On Thursday, March 28, 2013 11:00:31 PM UTC+1, Alan Etkin wrote: > > made it better just now ignoring EOL diffs >> > > Niphlod, the diffbook now looks really cool! > > An enhancement request: could

[web2py] Re: Are there any future plans for native social login in auth?

2013-03-28 Thread Niphlod
there's an open feature-request on google code to include sanction in web2py. On Friday, March 29, 2013 12:56:53 AM UTC+1, HittingSmoke wrote: > > I know web2py supports Janrain but they charge for what's basically an > inert layer of code between your app and the login system. It seems silly >

[web2py] StopForumSpam: new plugin available

2013-03-28 Thread Niphlod
Here https://github.com/niphlod/w2p_SFS_plugin Ultra-alpha-Release ... expect bugs, api changes and some other intricacies PS: if someone wants to chime in to figure out an algorithm to calculate confidence (0-100) based on frequency and last_seen I'm happy to hear its thoughs

[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-29 Thread Niphlod
fits better in a plugin. On Friday, March 29, 2013 8:49:57 AM UTC+1, Craig Matthews wrote: > > How about including jQuery jNotify? http://www.myjqueryplugins.com/ > > > On Tuesday, March 26, 2013 12:55:12 PM UTC-4, LightDot wrote: >> >> I prefer to keep web2py.js stock, to ease updates, so I add

[web2py] Re: Using an external lib - Twython

2013-03-29 Thread Niphlod
@annet: you can import with a simple "from relativedelta import *" @nate: according to the module documentation, you need to do from twython import Twython On Friday, March 29, 2013 7:21:15 AM UTC+1, Annet wrote: > > Hi Nate, > > I am using a module relativedelta and have the following import

[web2py] Re: DAL is not joining tables if I have multiple clauses?

2013-03-29 Thread Niphlod
Annet got it right. On Friday, March 29, 2013 1:16:34 PM UTC+1, Cliff Kachinske wrote: > > For starters, look closely. > > db(db.family_members.user_id == auth.user_id and > db.family_members.connected_to==db.auth_user.id).select(db.family_members.connected_to, > > db.auth_user.last_name, db.au

[web2py] Re: nginx + uwsgi + web2py + PAM

2013-03-29 Thread Niphlod
uhm. Before smashing heads against the wall, there are 3 different "available methods" here. 1) rely on nginx to authenticate users through pam (kinda of a basic auth, but checked against PAM) 2) rely on uwsgi to authenticate users through pam (kinda of a basic auth, but checked against PAM

[web2py] Re: not getting what this says

2013-03-29 Thread Niphlod
depends on what line is raising it. On Friday, March 29, 2013 6:15:57 PM UTC+1, manee...@gmail.com wrote: > > (need more than 1 value to unpack) > > I got this weird kind of error and not able to figure out what this means. > -- --- You received this message because you are subscribed to

[web2py] Re: not getting what this says

2013-03-29 Thread Niphlod
those are many exceptions, but all of them raise ValueError: too many values to unpack he's getting "the opposite" ValueError: need more than 1 value to unpack On Friday, March 29, 2013 9:19:47 PM UTC+1, Cliff Kachinske wrote: > > I get those sometimes when I'm sloppy about refactoring. > > Look

[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-29 Thread Niphlod
not to question your method, I'd just like to know better the requirements.. line numbers change (a lot) between commits. They'll be valid only in the context of the commit, i.e. they will be exact pointers only referring to the "past" status of the source file. What will happen is head^2

[web2py] Re: Social media icons.

2013-03-29 Thread Niphlod
70x more weight but nice, nonetheless ! TY Bruno. On Friday, March 29, 2013 11:17:47 PM UTC+1, rochacbruno wrote: > > > pure css icons http://zocial.smcllns.com/ > > > On Friday, March 29, 2013 3:49:21 AM UTC-3, Annet wrote: >> >> I like the social media icons that come with web2py, are they par

Re: [web2py] Re: pySerial - how to open port

2013-04-01 Thread Niphlod
you need to take into consideration what changes between the web2py environment and the cherrypy one. assuming that you start cherrypy with something like this in a mywebserver.py import cherrypyclass HelloWorld(object): def index(self): return "Hello World!" index.exposed = True

[web2py] Re: hook to add record in referenced table from current record edit?

2013-04-01 Thread Niphlod
did you check out http://www.web2pyslices.com/slice/show/1446/widget-select-or-add-option On Monday, April 1, 2013 11:28:46 AM UTC+2, Jurgis Pralgauskis wrote: > > > Hi, Django has it this way ( via "+" ) > https://docs.djangoproject.com/en/dev/_images/admin10.png > it opens in popup windown an

Re: [web2py] Re: pySerial - how to open port

2013-04-01 Thread Niphlod
atience and help. :) It seems to work > suddenly which i still could not figure out why! :/ > just that i'm still stuck at mapping URL, writing arguments and things > like that. Is there any site with good complete examples? i couldn't digest > the web2py manual witho

[web2py] Re: 'list:reference', contains, Mysql, instr

2013-04-01 Thread Niphlod
@ricardo: this is done under the assumption that contains() takes a field it's nowhere documented in the book that this should work. contains() (just a few moments before the latest commit by Massimo) was supposed to take a "fixed" value, not a column. On Monday, April 1, 2013 4:31

[web2py] Re: File uploads from different tables wih SQLFORM.factory - table name issue

2013-04-01 Thread Niphlod
there's no feature to leverage in the current code. After all, a "factory" is something "ethereal" where your code needs to manage db interactions (and whatever needs to be done). SQLFORM.factory is just a shortcut: - to "play" with your current models - to save you defining a table just to g

[web2py] Re: SQLForm grid vertical pagination issue

2013-04-02 Thread Niphlod
at 99% you don't need to change any of the sqlhtml.py code, just the css classes assigned to the "paginator". Probably the default "jquery-ui" was meant to work with an older version of the css -- --- You received this message because you are subscribed to the Google Groups "web2py-users" g

Re: [web2py] Re: pySerial - how to open port

2013-04-02 Thread Niphlod
server by typing python web2py.py in > the terminal? > > thanks a lot! :D > > > On Mon, Apr 1, 2013 at 6:48 PM, Niphlod >wrote: > >> clearly it was due to a permission problem btw, if you don't need >> apache for anything else, given that the raspberry has

Re: [web2py] Re: nginx + uwsgi + web2py + PAM

2013-04-02 Thread Niphlod
nice. The script shipped with web2py installs uwsgi from pip, so we're covered! On Monday, April 1, 2013 4:48:59 PM UTC+2, Matt wrote: > > On Fri, Mar 29, 2013 at 12:15 PM, Matt Broadstone > > > wrote: > > On Fri, Mar 29, 2013 at 12:05 PM, Niphlod > > wrote:

[web2py] Re: What, when , where and how to use ARGS and VARS

2013-04-02 Thread Niphlod
/app/default/test points to executing your test() inside the controller named default.py args and vars are, in respect - args : /app/default/test/*1/2/3* - vars : /app/default/test?*foo=bar&foo=bar2&hello=world* To sum up, args are fine if you want cleaner urls, but you can't put whatever you wa

[web2py] Re: What, when , where and how to use ARGS and VARS

2013-04-02 Thread Niphlod
view already, include at the top {{=response.toolbar()}} to show it. > And all the above are in the same function 'test', so can i omit 'test' in > the URL? > See the book on how to use the URL() function. http://web2py.com/books/default/chapter/29/04#URL URL() w

[web2py] Re: help running workers on multiple machines

2013-04-02 Thread Niphlod
are you sure your settings don't prevent a concurrent run ? As soon as one of the worker sees 2 worker and 2 tasks it should assign one task to each one of them. Try to run the workers with python web2py.py -K appname -D 0 to see the "debug" logging, one worker should print something like TICKER:

[web2py] Re: help running workers on multiple machines

2013-04-02 Thread Niphlod
issues with getting MySQL to 'refresh' when accessing from > different AMIs. Is there something I can do to force workers get an updated > database connection? > > > On Tuesday, April 2, 2013 1:48:41 PM UTC-7, Niphlod wrote: >> >> are you sure your settings don't p

[web2py] New Plugin: timezone helper

2013-04-02 Thread Niphlod
Here https://github.com/niphlod/w2p_timezone_plugin As always, you're welcome to submit patches, tests, bugs and whatnot. API may change a little bit as soon as someone comes up with a better implementation :P Jokes aside, a few variations can still happen in the next 1 or 2 w

Re: [web2py] Re: scheduler sincronization

2013-04-02 Thread Niphlod
I can't tell what logs line have been added (I see new lines but I don't know what is the line following "if counter " and what is the one following "if self.worker_status[0] ") On Tuesday, April 2, 2013 11:05:11 AM UTC+2, Paolo valleri wrote: > > H

[web2py] Re: New Plugin: timezone helper

2013-04-02 Thread Niphlod
(and all other plugins available for web2py...) On Wednesday, April 3, 2013 12:08:11 AM UTC+2, Massimo Di Pierro wrote: > > fanstastic! Thank you. We need a place to link this. > > On Tuesday, 2 April 2013 16:54:10 UTC-5, Niphlod wrote: >> >> Here https://github.com/nip

Re: [web2py] Re: scheduler sincronization

2013-04-03 Thread Niphlod
ask True False > 2013-04-03 08:50:00,717 - web2py.scheduler.mapserver#5108 - INFO - nothing > to do > 2013-04-03 08:50:00,717 - web2py.scheduler.mapserver#5108 - DEBUG - > sleeping... > 2013-04-03 08:50:03,711 - web2py.scheduler.mapserver#5108 - DEBUG - > recording heartb

[web2py] Re: Access data in PUT request for @request.restful()

2013-04-03 Thread Niphlod
the restful part parses the data as web2py does, so accepts form/* encoded parameters... it doesn't parse json in the body. On Wednesday, April 3, 2013 8:19:04 AM UTC+2, Daniel Gonzalez wrote: > > Sorry to come back to this after two weeks (was busy with other stuff). I > am trying to access the

[web2py] Re: help running workers on multiple machines

2013-04-03 Thread Niphlod
; = > T) is processing most jobs. The workers are both instances of the same AMI. > > > > On Tuesday, April 2, 2013 2:12:51 PM UTC-7, Niphlod wrote: >> >> if you're on 2.4.5 there shouldn't be problems with mysql (it has a >> transaction isolation "p

Re: [web2py] Re: scheduler sincronization

2013-04-03 Thread Niphlod
ok, at least it seems consistent: there's: - no send_heartbeat(), do_assign_tasks=True line - no Inside If, do_assign_tasks=True line in all the log. PS: I still can't reproduce the "erratic" behaviour, but a baseline question rises: do you get this also using another db engine ? -- --- You

[web2py] Re: REF: Database Migration

2013-04-03 Thread Niphlod
mind that auth.define_tables() takes "migrate" parameter(s) on its own, not "respecting" some of the DAL(...) ones. On Wednesday, April 3, 2013 2:53:02 PM UTC+2, software.ted wrote: > > I have this error: > > Database db select Traceback > > Traceba

[web2py] Re: One form in multiple tabs

2013-04-03 Thread Niphlod
the main issue here is : are you missing HTML/js skills to code a "tabbed" form or is something on web2py's side that is not working as you expect ? On Wednesday, April 3, 2013 1:11:21 PM UTC+2, Annet wrote: > > I defined the following table: > > db.define_table('scrptNxt', > Field('nodeID','

[web2py] Re: Truncated Data on Migration

2013-04-03 Thread Niphlod
that's more a place for unittesting the app itself than having web2py to check for it for every db (and every version of engine) at all times. It's true that DAL absracts away the 90% of incompatibilities, but still you *need* to evaluate your choices when it comes to a production app, being awa

[web2py] Re: EmberJS is the web2py of the client! :)

2013-04-03 Thread Niphlod
yep. when all the logic is pushed client-side, you need just a backend to (eventually) store data, a full-blown MVC server-side framework is not needed anymore. Anyway, when you start to blob out large chunks of javascript client-side just to do, e.g., an email address validation, you need to c

Re: [web2py] Re: Scheluder for long tasks

2013-04-03 Thread Niphlod
it will be stopped as soon as possible. There's no way to make by default a scheduler "timeout-less" just cause it's a very bad idea (a job-processor with no timeouts "impersonate" the "bad-design" it tries to defeat in the first place) If you need to run processes that may never stop, rely on y

[web2py] Re: spoiler (show hidden content without reloading the page)

2013-04-03 Thread Niphlod
in your css span.spoiler { display: none } in your html if you want to see it click here the spoiler is here in your js $('a.spoiler_toggler').on('click', function(e) { e.preventDefault(); var spoiler_to_reveal = $(this).data('show'); $(spoiler_to_reveal).show(); })

[web2py] Re: .sum() and .count() in grid?

2013-04-04 Thread Niphlod
I'm guessing it will be hard. You'll better code a view and access it as a "fake table". PS: you show it in a grid then what record do you want to add/edit/delete ? I'm guessing that this time you want to use the grid just to search, orderby and paginate, but there's a LOT of logic inside i

[web2py] Re: SmartGrid Add Mode to Call a Function

2013-04-04 Thread Niphlod
the grid exposes several callbacks that you can use to "attach" your own counters .oncreate, onupdate and ondelete On Thursday, April 4, 2013 4:55:49 AM UTC+2, Dan Kozlowski wrote: > > I have a smartgird that is being used for adds, updates, and deletes and > wondering how I can call a funct

Re: [web2py] StopForumSpam: new plugin available

2013-04-04 Thread Niphlod
ugin :P On Thursday, April 4, 2013 12:39:19 AM UTC+2, Ricardo Pedroso wrote: > > On Fri, Mar 29, 2013 at 1:41 AM, Niphlod >wrote: > >> Here https://github.com/niphlod/w2p_SFS_plugin >> >> Ultra-alpha-Release ... expect bugs, api changes and some other >> intricac

[web2py] Re: running a web2py application on different os

2013-04-04 Thread Niphlod
I doubt it's a web2py problem ... you should check for users hitting the same behaviour using openlayers on different OSes ... probably it's a matter of css . On Thursday, April 4, 2013 5:03:37 PM UTC+2, Luis wrote: > > >- Hello web2py users, > > > Out of convenience, I was copying a web2py

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-04 Thread Niphlod
just to clarify on the > Not a bad argument Arnon, but you shouldn't discount search scrapers so > easily. > > I think Google's Search Bot has support AJAX for a good 5 years now. > > part . have you actually tried it ?? search bots (google included) have "some" ajax support in the s

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-04 Thread Niphlod
PS: ajax is not quite the same as javascript, but the underlying "core concept" of the previous post is valid for both. On Thursday, April 4, 2013 11:27:02 PM UTC+2, Niphlod wrote: > > just to clarify on the > > >> Not a bad argument Arnon, but you shouldn&#

[web2py] Re: nssm & scheduler seems to be a nobrainer...

2013-04-05 Thread Niphlod
As soon as I get home I'll make screenshot of the configs I hadn't any problems a few months back, but I'll recheck for sure and post here or on web2pyslices.com the steps involved. On Friday, April 5, 2013 11:34:30 AM UTC+2, Marian wrote: > > I dug around in the event log and found: > > St

[web2py] Re: another scheduler Q

2013-04-05 Thread Niphlod
what db are you using ? On Friday, April 5, 2013 6:24:13 AM UTC+2, Yoel Benitez Fonseca wrote: > > i have this setup: > > 2 severs with the same web2py & app installed, each of then run a > scheluder worker > > the problem is that only one of then get jobs, and in > db.scheluder_worker the one

[web2py] Re: scheduler init script

2013-04-05 Thread Niphlod
that's the one in the header comments on the scheduler.py itself. Given that upstart is present in your ubuntu version it's definitely the shortest way (and simple, also) to run a service. On Thursday, April 4, 2013 11:57:01 PM UTC+2, Yoel Benitez Fonseca wrote: > > i have found this script in th

[web2py] Re: auth.settings.extra_fields

2013-04-05 Thread Niphlod
the point is having that "db.companies.id" evaluated later . you can pass a string to the is_in_db validator, it shouldn't raise the error IS_IN_DB(db, 'companies.id', '%(name)s') *should* work giving you a nice dropdown too. On Friday, April 5, 2013 4:48:33 PM UTC+2, ctrlSoft wrote: > > models

[web2py] Re: auth.settings.extra_fields

2013-04-05 Thread Niphlod
Nope. when "auth" definition is encountered, if you want to use db.companies.id written as it is, db.define_table('companies') should have been executead already. You need to change your IS_IN_DB call to (db, 'companies.id', '%(name)s') ... notice the ticks around companies.id, it's a string

[web2py] Re: RadioWidget ignoring formstyle?

2013-04-05 Thread Niphlod
Hum. from the book ...http://web2py.com/books/default/chapter/29/07#Widgets Sometimes widgets take additional arguments and one needs to specify their values. In this case one can use lambda db.mytable.myfield.widget = lambda field,value: SQLFORM.widgets.string.widget(field,value,_styl

[web2py] Re: .select(db.table.ALL)

2013-04-05 Thread Niphlod
recap: - db.table1.ALL is just a shortcut to db.table1.field1, db.table1.field2, db.table1.field3, etc etc etc - select() without arguments selects all fields for all tables involved. - if you pass something explicit to select() , you get just what you asked for tl;dr : exactly what you observed

Re: [web2py] Re: another scheduler Q

2013-04-05 Thread Niphlod
is concerned, as long as there are two scheduler_workers rows, nothing should change. Just as a proof, can you confirm that when you start two schedulers on the same server you observe the same behaviour ? On Friday, April 5, 2013 8:47:58 PM UTC+2, Yoel Benitez Fonseca wrote: > > El 5.4

[web2py] Re: nssm & scheduler seems to be a nobrainer...

2013-04-05 Thread Niphlod
1). > > When I try to restart the service, I don't get new failed tasks, so I > cannot say where this specific one came from. > > > > > On Friday, April 5, 2013 1:36:37 PM UTC+2, Marian wrote: >> >> That would be awesome. Thanks for the great work! :) >

Re: [web2py] Re: another scheduler Q

2013-04-05 Thread Niphlod
5.4.2013 2:57 pm, Niphlod escribió: > > this is the second time the issue is posted and yet I can't find a way > > to > > reproduce it It's true that I'm running two scheduler processes on > > the > > same machine vs one scheduler on on machine and the

Re: [web2py] Re: another scheduler Q

2013-04-05 Thread Niphlod
#4772";"COMPLETED";285 "monster#4751";"COMPLETED";315 allright, they are not 300 and 300, but the more tasks they process the more the "percentage gap" will reduce, eventually being a close 50%-50% On Friday, April 5, 2013 9:58:50 PM UTC+2, Niphlod wrote: &

[web2py] Re: another oracle question :(

2013-04-05 Thread Niphlod
I really don't understand. The query "shipped" to your oracle instance will be exactly the same using DAL as the one using "bind variables". The DAL just does binding for you (in the 90% of the cases, better) If you want to retrieve from a table all records in one query, and you have a "large"

[web2py] Re: grid with left join example causes err "keyword can't be an expression"

2013-04-05 Thread Niphlod
I'd say it's an error on the docs *SQLFORM.grid(db.parent,left=db.child.on(db.child.parent=db.parent.id)) * should be *SQLFORM.grid(db.parent,left=db.child.on(db.child.parent==db.parent.id )) * i.e. the condition must have two "equal signs" instead of one. -- ---

[web2py] Re: Windows Service fails with 2 ports on rocket server

2013-04-05 Thread Niphlod
I's say using nssm.exe will spare you some headaches. It seems that there are a few errors in winservice.py You can try to patch it. self.server = main.HttpServer( ip=options.ip, port=options.port, password=options.password, pid_filename=options

[web2py] Re: Windows Service fails with 2 ports on rocket server

2013-04-05 Thread Niphlod
gluon/winservice.py However, there's a problem. when you pass --interfaces to rocket, it overrides whatever ip,port you pass (reading the docs) normally gluon.widget just discards -i and -p in favour of --interfaces options_std.py reports interfaces AND ip AND port ... it should be cleared

[web2py] Re: .sum() and .count() in grid?

2013-04-05 Thread Niphlod
often referred as "materialized views" for the ones who can spare me a lecture about what are exactly those :P, let's say you have an iper-complicated query that "reconstructs" to a "table" that you want to show in a grid just for searching purposes (other purposes not listed, sorry, they make

Re: [web2py] Re: another oracle question :(

2013-04-05 Thread Niphlod
On Friday, April 5, 2013 11:58:37 PM UTC+2, Martin Barnard wrote: > > Thanks for the info, Niphlod. > > I will look into the efficiency of the IN clause for my needs, as it > appears to offer a solution which may mollify the IT DBA, and his demands > for bind vars (they ar

[web2py] Re: Help on fake_migration

2013-04-05 Thread Niphlod
pass the same migrate argument of you DAL call to auth.define_tables() too (e.g., auth.define_tables(fake_migrate=True)) On Saturday, April 6, 2013 1:24:33 AM UTC+2, Tito Garrido wrote: > > Hi Folks! > > I am trying to migrate my web2py application from one server to another. > > I have pack my a

[web2py] Re: Is there a way to cache images from "download" function?

2013-04-06 Thread Niphlod
there's a new @cache.client decorator to set expire headers in an easy way as soon as the book gets updated the docs will be here http://web2py.com/books/default/chapter/29/04#cache On Saturday, April 6, 2013 11:58:17 AM UTC+2, BlueShadow wrote: > > There supposedly is a way the fast downlo

Re: [web2py] Re: another oracle question :(

2013-04-06 Thread Niphlod
w.membership) > > * > *rows=odb(odb.other_table.membership.belongs(ml)).select()* > > Of course, I have to worry about the length of the list that I'm passing, > as I read that it cannot exceed 1000 items, but this shouldn't be an issue > in normal use, and I'll wr

[web2py] Re: How to benchmark my web2py website? I have got scary results :-/

2013-04-06 Thread Niphlod
wait a sec. you're launching ab from your "home line" to a server hosted somewhere ? Launch it from the server itself, or another server in the same facility ! You're reading back results that are dependant on all the loops of the net wired from your "home" to the server :D These is my benchmar

[web2py] Re: database is locked

2013-04-06 Thread Niphlod
noo for every request you are issuing that query once WAL is active, there's no further need to issue that statement, unless you revert to the default journal mode or delete phisically the file. remove also the part of "if request.env.web2py_runtime_gae" if you're not using it.

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