[web2py] Re: Queries with AND in GAE

2013-04-17 Thread Niphlod
db((condition) & (condition)).select() is the way to do it: you're doing db(condition and condition).select() On Wednesday, April 17, 2013 8:52:09 AM UTC+2, José Manuel López wrote: > > I'm trying to make a very simple query: > > offersInRange= db(db.Offer.hotel == request.vars.hotel > anddb.Off

[web2py] Re: "MySQL server has gone away" errors happening more and more with db-based sessions?

2013-04-17 Thread Niphlod
user > connecting from a single device have so many session records?? > > > > > > > On Tuesday, April 16, 2013 6:21:56 PM UTC-4, Yarin wrote: >> >> Largest session_data fields were 12 KiB >> >> On Tuesday, April 16, 2013 5:49:45 PM UTC-4, Niphlod wrote:

Re: [web2py] Re: Return value from javascript to controller

2013-04-17 Thread Niphlod
that's exactly what I tested yesterday evening... can you please try to strip out the next=URL('index') part ? It's the only thing that is different. On Wednesday, April 17, 2013 4:14:58 AM UTC+2, fun man wrote: > > Hi Niphlod, > > I downloaded the new one, and c

[web2py] Re: list:string type field output format

2013-04-17 Thread Niphlod
then you want to have 2 separate A, one for each email! On Wednesday, April 17, 2013 9:41:02 AM UTC+2, 黄祥 wrote: > > it seems can not make it work for the link, i've tried both, but same > result > {{=SPAN(T('Email : '), A(', '.join(row.email), _title=T('Send Email'), > _target='_blank', _href='

[web2py] Re: REF: Component + Javascript

2013-04-17 Thread Niphlod
you're attaching a jquery event to an element that when the script is executed is not yet present (it's loading...) try to rewrite your jQuery('#mp_257').click(function(){ jQuery('#test').html('Test') //alert("Test") }) to jQuery(document).on('click', '#mp_257', function(){

[web2py] Re: REF: Component + Javascript

2013-04-17 Thread Niphlod
are you sure that the button has not yet an event attached that prevents your "custom" one ? On Wednesday, April 17, 2013 12:15:03 PM UTC+2, software.ted wrote: > > I have a component am loading in a > > {{=A('Link to comp', component=URL('research', 'mycomponent.load'), > target='setting-cont

[web2py] Re: Using SQLFORM.grid with large datasets

2013-04-17 Thread Niphlod
currently not but it is planned to be configurable (at the very minimum, cacheable). Your method BTW works only if all the table is shown, doesn't take into account a possible condition passed to the grid (such as db.table.user_id == auth.user_id) or keyword queries. I'll start working on tha

[web2py] Re: how to insert default value into controller

2013-04-17 Thread Niphlod
wouldn't a simple db.Party.partyTypeID.default = 1 resolve all your problems ? I didn't understand if you want that one or the one in the auth_user table, but the gist should be clear enough. On Wednesday, April 17, 2013 4:58:01 PM UTC+2, Alex Glaros wrote: > > Tried 4 different places and m

Re: [web2py] Re: Return value from javascript to controller

2013-04-17 Thread Niphlod
(db.sometable).process() > if form.process().accepted: > response.flash = 'form accepted' > elif form.errors: > response.flash = 'form has errors' > else: > response.flash = 'please fill out the form' > return dict(form=form,

[web2py] Re: SQLFORM.factory

2013-04-17 Thread Niphlod
prepare a list of "name"s and return that to make it usable in the view then {{for nm in name:}} {{=form.custom.label['nm']}} {{=form.custom.widget['nm']}} {{pass}} On Wednesday, April 17, 2013 5:01:08 PM UTC+2, Domagoj Kovač wrote: > > Hi, > > i am trying to make a form with dinamic f

Re: [web2py] Re: Python Redis Queue

2013-04-17 Thread Niphlod
does this work when queueing, e.g. a function defined in models ? Last time I checked all my "jobs" needed to be in a separate modulemaybe the method used to implement the same thing with celery can be used for that. On Wednesday, April 17, 2013 6:03:40 PM UTC+2, Ricardo Pedroso wrote: > >

Re: [web2py] Re: Return value from javascript to controller

2013-04-17 Thread Niphlod
ok. There was an error in your code, a double call to process() . But there was also on my end: when you do in the same function that shows the form a fast_tz_detector(), basically you trigger a POST request that "updates" the formkey associated with the form. Blame on me that use LOAD() al

[web2py] Re: Alternative to SQLFORM for Angular

2013-04-17 Thread Niphlod
on the widgets part, nobody did anything (or, in other words, even if it did, he/she didn't share with us). On the "serialize values as json" shouldn't be hard, but you must hook up your angular model with the data. Same thing goes for errors. On the "receive a json string and use those values to

[web2py] Re: Using SQLFORM.grid with large datasets

2013-04-17 Thread Niphlod
check trunk as soon as the Pull Request gets merged def test3(dbset, request_vars): ##you can retrieve the current query with ##dbset._select(), i.e. dbset is a "db(query)" object ##request_vars are the current request.vars ###so you can check for keywods etc etc etc ###c

[web2py] Re: list:string type field output format

2013-04-17 Thread Niphlod
yep, html helpers aren't properly "strings", so they can't be joined with a simple ','.join() However, you can do it with the CAT (from conCAT) try SPAN(T('Email'), CAT([A(email) for a in emails])) On Wednesday, April 17, 2013 11:12:26 PM UTC+2, 黄祥 wrote: > > thank you so much for your hin

[web2py] Re: Can somebody hack a user tracker and download counter for us ?

2013-04-17 Thread Niphlod
/me shows Anthony some love... On Wednesday, April 17, 2013 11:29:00 PM UTC+2, Anthony wrote: > > So, the latter, then? > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it,

Re: [web2py] Re: REF: Component + Javascript

2013-04-18 Thread Niphlod
user clicks on > the button i want to change the contents of the div using > jQuery('#id_xx').html("{{=LOAD('c','a', args=var)}}"). Maybe there is > another way of doing this??? Please advise. > > > On Wed, Apr 17, 2013 at 2:18 PM, Nip

[web2py] Re: list:string type field output format

2013-04-18 Thread Niphlod
check again: there's no way mine and Anthony's last snippets generates a single A holding two addresses On Thursday, April 18, 2013 4:04:26 AM UTC+2, 黄祥 wrote: > > thank you so much for your hints niphlod and anthony, i've tried both of > your hints, but the result

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Niphlod
here ... https://groups.google.com/d/msg/web2py/js0VAKK6Dlw/CJ46I-0wT0wJ That is what you more or less described. if this works out in rq "linearly" I'll cross out "port web2py's scheduler to redis" from the todo list (it will be a nice project though) :P rq has the "react fast" juice but doesn

[web2py] Re: display logo pic in header top

2013-04-18 Thread Niphlod
if you're using the scaffolding app then set response.logo accordingly by default is response.logo = A(B('web',SPAN(2),'py'),XML('™ '), _class="brand",_href="http://www.web2py.com/";) replace, e.g., the B() element with an IMG() one and you're good to go. On Thursday, Apr

Re: [web2py] Re: Return value from javascript to controller

2013-04-18 Thread Niphlod
that seems more a problem with the format of the date than the fact that it has to be "timezone-normalized"what language translation are you using ? PS: what I meant with "landing page" is that you're sure that the user will hit that page before arriving to the form. If you are sure, there's

Re: [web2py] Re: Using SQLFORM.grid with large datasets

2013-04-18 Thread Niphlod
ffset 10' and there was no problem. Only last 5 records were shown. > > Regards > Johann > > > On 17 April 2013 23:28, Niphlod > wrote: > >> check trunk as soon as the Pull Request gets merged >> >> >> def test3(dbset, request_vars): >> #

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

2013-04-18 Thread Niphlod
ular) if you want some pre-made solutions so >> that web2py can be as interoperable on the client side as it is on the >> backend (where you can choose from many different servers and databases). >> >> On Tuesday, 16 April 2013 17:12:48 UTC-4, Niphlod wrote: >>> &

Re: [web2py] Re: Return value from javascript to controller

2013-04-18 Thread Niphlod
normalization. The model i use is Field('modified_on', 'datetime'), > I see that there is no timezone attached at the end. > > > On Thu, Apr 18, 2013 at 7:11 PM, Niphlod >wrote: > >> that seems more a problem with the format of the date than th

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

2013-04-18 Thread Niphlod
idgets" is simply to provide some >>>> protocol (currently via ajax) that the client-side expects from the server >>>> to update itself. Maybe also javascript files for different frameworks >>>> (vanilla jQuery, Ember, Angular) if you want some p

[web2py] Re: @cache decorator

2013-04-18 Thread Niphlod
for starters check the "cache" page in appadmin (go to "database administration", then click "cache" at the top) to see hot many hits/misses you find. In a "perfect world" ( i.e. your cache works as expected) you'd have 1 miss and n-1 hits with n being the number of times your page is accessed.

[web2py] Re: One form in multiple tabs

2013-04-18 Thread Niphlod
e repliers" (pun intended :-P) : give us a little space if sometimes an answer that all previous web2py newbies tackled and resolved by trial and error has no replies from "the repliers": they are drinking beer. On Thursday, April 18, 2013 10:08:38 PM UTC+2, Pystar wrote: > >

[web2py] Re: Will web2py support database view? When?

2013-04-18 Thread Niphlod
defining a "fake table" that points to the view and set migrate=False is definitely the best (and recommended) way to do it. On Thursday, April 18, 2013 10:19:05 PM UTC+2, David Ripplinger wrote: > > I'm not familiar with the Django way. Web2py is my first serious attempt > at web programming. W

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Niphlod
to run functions defined in > models. > But now instead of runnig the worker in app_folder, the worker must be > run from web2py_folder > > $ python applications//rq_worker.py > > > Ricardo > > > > > > > > > > > > > On Thu, Apr 18,

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Niphlod
PS: on the web2py process side, it seems that at most 10 connections are istantiated with Redis: is there a connection pool? On the worker side, instead, I noticed that each job generates a new fresh connection to Redis: is this expected ? e.g. [7445] 18 Apr 22:57:48.072 - Client closed connecti

[web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-18 Thread Niphlod
guppy has not been updated in a while, there are some known bugs with the "stable release" and there seems to be already a bug listed on web2py's "official issues". I tried to install it from sources, but didn't had luck with that either. Seems also that the debian package is somewhat oldie..

[web2py] Re: Problem with the search when using two SQLFORM.grid on the same web page

2013-04-19 Thread Niphlod
this is an excerpt from the book Because of the way grid works one can only have one grid per controller function, unless they are embedded as components via LOAD. To make the default search grid work in more than one LOADed grid, please use a different formname for each one. So, 2 steps requi

Re: [web2py] Re: Return value from javascript to controller

2013-04-19 Thread Niphlod
ssion.plugin_timezone_tz, user_id=auth.user_id) some_message = "here timezone is detected" tz = fast_tz_detector() return . On Friday, April 19, 2013 3:58:09 AM UTC+2, fun man wrote: > > hi Niphlod, > > I've tried your example in the attachment. The go

[web2py] Re: RESTful api and JSON POST data with curl

2013-04-19 Thread Niphlod
uhm... I may be wrong but request.restful accepts the args as a normal page, that is a application/x-www-form-urlencoded or a multipart/form-data . with curl would be something like curl -d name=blablabla -d otherparameter=blablabla http://theurl On Friday, April 19, 2013 1:24:03 AM UTC+2,

[web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Niphlod
the cache page still wont load without that > error. > > > On Thursday, April 18, 2013 11:08:14 PM UTC+2, Niphlod wrote: >> >> guppy has not been updated in a while, there are some known bugs with the >> "stable release" and there seems to be already a bu

[web2py] Re: populate upload field type and store it in blob type field

2013-04-19 Thread Niphlod
it's a matter of "precedence". there's a clean section on the book on how to do it http://web2py.com/books/default/chapter/29/06?search=More+on+uploads PS: you're importing populate from gluon.contrib but not using it: are you sure you need it ? On Friday, April 19, 2013 9:44:25 AM UTC+2,

[web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Niphlod
this is what appadmin does from guppy import hpy hp = hpy() On Friday, April 19, 2013 11:01:56 AM UTC+2, BlueShadow wrote: > > I did now and I can't import it in python: > ImportError: No module named gubby > > > On Friday, April 19, 2013 9:54:08 AM UTC+2, Niphlod w

[web2py] Re: Custom IS IN DB

2013-04-19 Thread Niphlod
look at http://web2py.com/books/default/chapter/29/07#Database-validators ... there are snippets that show you how you can "tune" the set of allowed parameters. On Friday, April 19, 2013 11:47:25 AM UTC+2, Domagoj Kovač wrote: > > Hi, > > i have a table of attributes like this: > > ID field_name

[web2py] Re: regular expressions in DAL?

2013-04-19 Thread Niphlod
only with databases that support it and with the db.table.field.regex() syntax. Don't know how much is tested, but if doesn't work wouldn't take that much to fix it. PS: you'd have to use whatever regex syntax is supported on the backend: don't expect the same flexibility of python's regex engi

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Niphlod
each time once or twice a weeks)? > > Thanks > > Richard > > > On Fri, Apr 19, 2013 at 6:23 AM, Ricardo Pedroso > > > wrote: > >> On Thu, Apr 18, 2013 at 10:02 PM, Niphlod > >> wrote: >> > PS: on the web2py process side, it seems that

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Niphlod
they both process tasks. the "line" is what I described in the previous post: if you need rapidly firing jobs, better stick with rq, if you need periodic jobs, rq setup needs a new component. The only other "cons" on the rq list (but is negligible) is that it works only with redis and on unix.

[web2py] Re: jquery 2.0

2013-04-19 Thread Niphlod
+1 too. For myself, I'd wait *at least* that all my "custom jquery plugins" are compatible with 2.0 . To be fair, that's the most pressing issue that's bothering me, and the reason behind pushing for live tests on web2py apps... ^_^ On Friday, April 19, 2013 4:47:46 PM UTC+2, LightDot wrote: > >

[web2py] Re: web2py and paradox databases

2013-04-19 Thread Niphlod
lol. Nice solution, +1 for discarding unsupported dynosaur-ages lib. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. F

[web2py] Re: "access denied" not available in translate page

2013-04-19 Thread Niphlod
with my Jedi powers I see through the fog .. I think he means this https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2937 On Friday, April 19, 2013 6:13:41 PM UTC+2, Massimo Di Pierro wrote: > > Some context would be helpful. > > On Friday, 19 April 2013 09:52:13 UTC-5, Ramos wrote

[web2py] Re: How to count views of a record in forms

2013-04-19 Thread Niphlod
grid: if request.args(-3) == 'view': add +1 factory: you know that already, you have to pass it crud: same as factory sqlform : same as factory What's the issue ? On Friday, April 19, 2013 7:19:19 PM UTC+2, Alex Glaros wrote: > > I want to count how many web users have looked at a record.

Re: [web2py] Re: "access denied" not available in translate page

2013-04-19 Thread Niphlod
y big role in every application, if you want to make it user-friendly. On Friday, April 19, 2013 6:38:34 PM UTC+2, Ramos wrote: > > Your are "dead" right! > :) > > > 2013/4/19 Niphlod > > >> with my Jedi powers I see through the fog .. I think

[web2py] Re: costum error log

2013-04-19 Thread Niphlod
uhm you can't (even in a normal request) have the value that is assigned with an #anchor (call it anchor, fragment, whatever) ... that doesn't get passed to the webserverso you can't have a page that fails because of that #part On Friday, April 19, 2013 8:22:21 PM UTC+2, BlueShadow wrot

[web2py] Re: How to count views of a record in forms

2013-04-19 Thread Niphlod
rvice.shortSharedServiceDescription':140}) > return dict(grid=grid) > > > On Friday, April 19, 2013 11:29:40 AM UTC-7, Niphlod wrote: >> >> grid: >> >> if request.args(-3) == 'view': >> add +1 >> >> factory: you know that

Re: [web2py] Re: costum error log

2013-04-19 Thread Niphlod
hor thats the first random character i found. Try it it fails. > Code 400 > Am 19.04.2013 20:50 schrieb "Niphlod" >: > >> uhm you can't (even in a normal request) have the value that is >> assigned with an #anchor (call it anchor, fragment, whatever) ... th

[web2py] Re: No `Field`s generated by 'extract_sqlite_models.py'

2013-04-19 Thread Niphlod
it should be a problem related to regexes finding the right things in your database. the script starts issuing the query select name,sql from sqlite_master where type='table' and not name like '\_%' and not lower(name) like 'sqlite_%' you can start from there and see where it breaks. PS

Re: [web2py] Re: costum error log

2013-04-20 Thread Niphlod
y I asked. > other things which cause 400 errors are .../function(testerror) > pretty much every non letter other than ? and / > > On Friday, April 19, 2013 9:06:43 PM UTC+2, Niphlod wrote: >> >> given that you want a ready-to-use solution, can you give an example ? >>

[web2py] Re: select orderby string to int

2013-04-20 Thread Niphlod
you can't order on a "part" of a value either you do it leveraging your backend functions and pass the query as a string, or you store somewhere the "int" part (e.g. with a computed field) and use that one. Or, if you're fine with ordering done using python, you can use the sort function...

[web2py] Re: web2py wizard error

2013-04-20 Thread Niphlod
seems that plugin_attachment is using a reserved keyword, which is not a "smart" thing to do. either you patch the plugin or in your db = DAL() line you remove the "check_reserved=['all']" parameter. On Saturday, April 20, 2013 12:27:16 PM UTC+2, Julian wrote: > > Hi. > Can someone advise me o

Re: [web2py] Re: Return value from javascript to controller

2013-04-20 Thread Niphlod
for future watchers of this thread: if you test this "changing your timezone", remember to clear the session in a normal world a user doesn't switch timezones within the same session ^_^ -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group

[web2py] Re: stop form from reposting with refresh

2013-04-20 Thread Niphlod
you can't forge the browser standard behaviour. if the page is the result of a POST, hitting "refresh" will always re-issue a POST. On Saturday, April 20, 2013 2:50:30 PM UTC+2, David Ripplinger wrote: > > How do I make it so that the form does not resubmit upon clicking the > browser reloa

[web2py] Re: gluon.main not part of Windows installation

2013-04-21 Thread Niphlod
did you download the source code version, right ? the archive at http://www.web2py.com/examples/static/web2py_src.zip has gluon/main.py On Sunday, April 21, 2013 8:12:43 AM UTC+2, mke...@halstead.com wrote: > > I'm trying to run my web2py app behind Apache on Windows, however, when > Apache lo

[web2py] Re: How to write a full query for IS_IN_DB validator?

2013-04-21 Thread Niphlod
look here http://web2py.com/books/default/chapter/29/07#Database-validators there are snippets that shows you how you can pass a query to the IS_IN_DB validator On Sunday, April 21, 2013 7:19:53 AM UTC+2, Alex Glaros wrote: > > What is the syntax for a full query for IS_IN_DB? > > In the example

Re: [web2py] Interesting points...

2013-04-22 Thread Niphlod
In my pov: 1. the applications/myapp/ dir is less complicated than a django project 2. you have the internal scheduler, python-rq and celery to choose from 3. up to you, web2py is ready to use many webservers through anyserver.py 7. I prefer something else but supervisord is useful in any case 8. v

[web2py] Re: Natural or default surrogate key; what is the speed difference?

2013-04-22 Thread Niphlod
test it. There's no way anyone can reply to your question without a db backend, a data model, the cardinality of your tables and the queries you'll most likely do. In any case, a unique-integer-serial is most of the times the "less expensive" way to hook up tables by references (indexes and "poi

Re: [web2py] web2py chat example

2013-04-22 Thread Niphlod
if you're on windows use the .exe installers On Monday, April 22, 2013 3:08:52 PM UTC+2, Ovidio Marinho wrote: > > Error install pip gevent > > c:\Python27\Scripts>pip install gevent > Downloading/unpacking gevent > Running setup.py egg_info for package gevent > Please provide path to l

[web2py] Re: response.files strange behaviour?

2013-04-22 Thread Niphlod
you most certainly have somewhere response.optimize_js = 'inline' response.optimize_css = 'inline' in your models http://web2py.com/books/default/chapter/29/04?search=minify On Monday, April 22, 2013 4:34:46 PM UTC+2, Loïc wrote: > > Hello All, > > *Welcome *app, in "*layout.html*" line 41

[web2py] Re: Form for a db-table, that belongs to currently logged in user

2013-04-22 Thread Niphlod
if the owner can have 0>n pets, you need to show him a list of his pets, optionally letting him adding a pet to his list. The "form" in this context is a rather limited representation: usually you'd want to display a form for insert/edit/delete for each pet but you can't use a form for "listing"

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Niphlod
completely "out-of-side" observation (I'll make sure I get this tested once I get home to report the behaviour on my pc) are you sure that your "incognito-mode" browser accepts cookies ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gro

[web2py] Re: auth.settings.extra_fields - do not show on registration?

2013-04-22 Thread Niphlod
you have to do it checking request.args(0) in the function that provides auth() usually it's the def user() inside default.py something like def user(): if request.args(0) == 'register': db.table.field.writable = db.table.field.readable = False . return dict

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Niphlod
s in >>> incognito after the first submit, and I can reproduce in regular mode. >>> >>> For some reason, on initial page load it is not saving both formkeys. Is >>> it possible that there is a conflict when saving the the sessions file? >>> i.e.

[web2py] Re: jquery 2.0

2013-04-22 Thread Niphlod
and ship 2 jquery.js AND require.js, and require that every plugin is made requirejs compatible (and that every jquery plugin needs to be 2.0 compatible if IE > 8) ??? waaay too bloated and restrictive. On Monday, April 22, 2013 9:19:53 PM UTC+2, Derek wrote: > > I'd like to see it as a co

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Niphlod
umpf I can't understand why this is not working "ok". The problem lies indeed in the fact that one ajax request overwrites the session, if the session file is not there yet. I can only guess that the logic is failing to acquire a lock before creating the (new) file If a request has

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-23 Thread Niphlod
On Tuesday, April 23, 2013 4:00:11 AM UTC+2, Anthony wrote: > > The problem is that we made a change so that no session file is created at > all if this is a new session and the session remains empty. So, when the > index page is requested, no session file is created. Next, the form1 Ajax > re

Re: [web2py] Log delete event?

2013-04-23 Thread Niphlod
there's no "ondelete" event to attach to when you do a delete it's treated as a "special" update http://web2py.com/books/default/chapter/29/07?search=deletable#SQLFORM-and-insert/update/delete On Monday, April 22, 2013 11:57:55 PM UTC+2, Richard wrote: > > Any idea? > > Richard > > > On Fri

[web2py] Re: placeholder

2013-04-23 Thread Niphlod
that in recent web2py's the widget password is a "CAT" of an INPUT and a STRING see https://groups.google.com/forum/?fromgroups=#!searchin/web2py/placeholder$20password/web2py/gryhO1DGfOQ/UQoBVu3rFKQJ for additional details On Tuesday, April 23, 2013 1:33:26 PM UTC+2, Domagoj Kovač wrote

[web2py] Re: web2py takes time to start

2013-04-23 Thread Niphlod
not at all 2-3 seconds at best is what it takes from web2py.py -a yourpassword to the "use kill SIGTERM blablabla" On Tuesday, April 23, 2013 1:08:51 PM UTC+2, Reza Shah wrote: > > Hi > > My notebook using SSD , 16GB RAM and IvyBridge. > > I have problem when running web2py at my system (arc

[web2py] Re: web2py takes time to start

2013-04-23 Thread Niphlod
g with --verbose but i didnot see any verbose message. > > On Tuesday, April 23, 2013 9:12:03 PM UTC+9, Niphlod wrote: >> >> not at all 2-3 seconds at best is what it takes from web2py.py -a >> yourpassword to the "use kill SIGTERM blablabla" >> >> &

[web2py] Re: web2py takes time to start

2013-04-23 Thread Niphlod
Tuesday, April 23, 2013 3:10:10 PM UTC+2, Reza Shah wrote: > > Yes, i started with -a and tried -i option too. > > On Tuesday, April 23, 2013 9:58:57 PM UTC+9, Niphlod wrote: >> >> are you starting it with web2py.py -a 'password' ? (if -a is passed no >> G

[web2py] Re: LOADed SQLFORM.factory in bootstrap modal form

2013-04-23 Thread Niphlod
redirect has "client_side" parameter that will trigger a reload of the entire page. On Tuesday, April 23, 2013 7:04:36 PM UTC+2, Jim S wrote: > > I'm having difficulty with my loaded component and bootstrap modal. I > have it working except that depending on how I code it I get 1 of 2 > undesi

[web2py] Re: LOADed SQLFORM.factory in bootstrap modal form

2013-04-23 Thread Niphlod
im S wrote: > > Thanks Niphlod, as usual, you came through for me again. Really > appreciate the help. > > -Jim > > > On Tuesday, April 23, 2013 1:52:30 PM UTC-5, Niphlod wrote: >> >> redirect has "client_side" parameter that will trigger a reload of the

[web2py] Re: controller function with paramerers -- invalid function ?

2013-04-23 Thread Niphlod
web2py renders only functions that are not take parameters (it's useful to have a set of "protected" functions). However, a "helper" is there for your situation def something(): id = request.args(0,default=0,cast=int,otherwise='http://error_url') otherwise by default raises a HTTP(404), if

[web2py] Re: upgrade to latest version and error

2013-04-24 Thread Niphlod
seems that you have a very old installation of psycopg2 . upgrade that and you should be fine (pip install --upgrade psycopg2) according to docs, server_version was added on psycopg2 2.0.12, and if I'm not mistaken that should be well before 2 years ago. On Wednesday, April 24, 2013 4:

[web2py] Re: concatenated fields in represent function

2013-04-24 Thread Niphlod
represent can be a lambda so you can do all sort of crazy things.where are you stuck ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr

[web2py] Re: newbee - How to do for loading a file in my site

2013-04-24 Thread Niphlod
the private dir is not "exposed" by default (the name "private" should have give you an hint :-P ).. if you need to do something like that (e.g. a fast way to give access to some static file) you'd better put them in the /static directory (in that case it will work with exactly the same cod

[web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-24 Thread Niphlod
you mean an edit form ? record = db.table(1) form = SQLFORM(db.table, record) On Wednesday, April 24, 2013 5:35:18 PM UTC+2, software.ted wrote: > > Is there a way to make the form generated by SQLFORM return the current > fields saved in the DB instead of making the fields blank? What i want i

[web2py] Re: Check it out: PURE AJAX file uploads :D

2013-04-24 Thread Niphlod
why the base64 ? I want my files submitted as binaries, if possibile. On Wednesday, April 24, 2013 5:31:48 PM UTC+2, select wrote: > > in your client side js code use the js file api (this is for one file, but > multi file upload can be done too) > > $('#datafile-uploadfield').change(function

[web2py] Re: Check it out: PURE AJAX file uploads :D

2013-04-24 Thread Niphlod
it's not that I don't like the use of native js api, but if the tradeoff is transmitting as base64 that's not an implementation I want to use (given that there are plenty of "drop-loaders" out there). Base64 the contents means wasting a net 33% of bandwith. -- --- You received this message b

Re: [web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-24 Thread Niphlod
en i click on a button with an id > with an existing record in the db it shows without any problem...when i > make changes the record remains in the fields. > > > On Wed, Apr 24, 2013 at 5:51 PM, Niphlod >wrote: > >> you mean an edit form ? >> record = db.tab

[web2py] Re: using scheduler: entry in scheduler_run "disappears"

2013-04-24 Thread Niphlod
it's by design if the function doesn't return a value, then you don't need a record to store the result ^_^ try returning something from your function and you'll see that the record will remain. e.g. you have def mytask(): # do something switch it to def mytask(): #-

[web2py] Re: using scheduler: entry in scheduler_run "disappears"

2013-04-24 Thread Niphlod
an > > > On Wednesday, April 24, 2013 2:37:26 PM UTC-4, Niphlod wrote: >> >> it's by design if the function doesn't return a value, then you don't >> need a record to store the result ^_^ >> try returning something from your function and you

[web2py] Re: again: sqlite "database locked"

2013-04-24 Thread Niphlod
outrageous execution times, transaction isolation problems, unsupported "rather standard queries", etc, and no-one will be able to explain the reasons behind those issues, you'll remember "Niphlod said that" :-P . I saw too many people jumping off cliffs for choosin

[web2py] Re: using scheduler, submitting task from a running task doesn't show up in scheduler_task

2013-04-24 Thread Niphlod
you're probably missing the part where a task gets executed in a "shell-like" environment, whose most-notable difference is that inside a task you have to manually db.commit(). While a db.commit() is ensured "automatically" at the end of every request in the normal web environment by web2py, in

[web2py] Re: Connecting to remote database - ERROR', '42P07', 'relation "mytable" already exists

2013-04-25 Thread Niphlod
you may have the mytable file but the connection string when it was generated was different (there's a hash in front of all .table files just for this). Anyway, if you're sure that you don't need to trigger any migration, just set fake_migrate_all=True for one request and all .table files will

[web2py] Re: Count and distinct

2013-04-25 Thread Niphlod
what's the purpose of limiting the number of rows you have to count ? On Thursday, April 25, 2013 11:39:50 AM UTC+2, Domagoj Kovač wrote: > > In documentation i see: > > >>> count = db.person.id.count() > >>> for row in db(db.person.id==db.thing.owner_id).select( > db.person.name, count,

[web2py] Re: REF: File Upload does not work on a component loaded using ajax....

2013-04-25 Thread Niphlod
http://web2py.com/books/default/chapter/29/12?search=uploads *Because Ajax post does not support multipart forms, i.e. file uploads, upload fields will not work with the LOAD component. You could be fooled into thinking it would work because upload fields will function normally if POST is done

[web2py] Re: Connecting to remote database - ERROR', '42P07', 'relation "mytable" already exists

2013-04-25 Thread Niphlod
It worked. > > After regeneration of .table files, fake_migrate_all flag should be set to > False again, right? > > Regards > > On Thursday, 25 April 2013 17:04:15 UTC+5, Niphlod wrote: >> >> you may have the mytable file but the connection string when it was >>

[web2py] Re: seems to be a bug in dal v 2.4.2

2013-04-25 Thread Niphlod
prepare a table model and a select() to reproduce the issue please... PS: I'm not sure that &= is recommended/supported. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, sen

[web2py] Re: Query doesn't select the proper range

2013-04-25 Thread Niphlod
As long as web2py "goes", it issues a select to your database engine and that one is responsible for picking up the records you want. Is the select generated by web2py correct ? If yes, then it's a problem either with your backend or your data. If not, then pack an app to reproduce the issue. PS

[web2py] Re: compute field insert/update

2013-04-25 Thread Niphlod
a computed field gets calculated on update by design. it's something "dependant" on all other rows values, so if they change, the computed value needs to change also. If you want to calculate it only on insert, why don't you just set a default value ? If the case is more complicated, I urge

[web2py] Re: Count and distinct

2013-04-25 Thread Niphlod
that's more or less exactly what I don't understand. you usually count() something without any limits because you don't know the cardinality of your wanted resultset. If you limit your resultset to n rows, what's the purpose of counting ? That's why there's no db(query).count(limitby=(0,n))

[web2py] Re: seems to be a bug in dal v 2.4.2

2013-04-26 Thread Niphlod
bummer, my fault. with trunk shell >>> q = db.auth_event.id > 0 >>> q &= db.auth_event.time_stamp < request.now >>> db(q)._select() "SELECT auth_event.id, auth_event.time_stamp, auth_event.client_ip, auth_event.user_id, auth_event.origin, auth_event.description FROM auth_event WHERE ((auth_even

[web2py] Re: Performance css and js files

2013-04-26 Thread Niphlod
you can have the layout.html including whatever order you need. The latest scaffolding app has web2py_ajax.hml that inserts jquery.js and web2py.js at the start of the response.files list https://github.com/web2py/web2py/blob/master/applications/welcome/views/web2py_ajax.html#L9 that's why they

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Niphlod
Whoa, that's definitely a lot to digest, but frankly. again with no practical usecases to digest too ^_^... >From the "technical" standpoint I love (being more a sql guy than a python one) to avoid defining a class when what I know that what I want is a table. That's more or less the (well s

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Niphlod
I'll not argue that some really extended project got eventually messy (they all do): my point is that even with an ORM your code wouldn't be as neat as you might think. Without you providing an api that you may expect web2py can't figure out your business requirements, and surely you can't expec

[web2py] Re: Schedule task with variable as argument

2013-04-28 Thread Niphlod
args and vars accept strings that are json representation of a list (args) or a dictionary (vars). You can pass whatever you need under the condition that is json-encoded. If you're trying to pass a variable, then you must evaluate it before queueing the task, or your task must "extract" the vari

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