Hi everyone.
I want to show the number of logins for every user in the last 7 days in a
view. I'm using this query:
log_count=db.auth_event.id.count()
usrs =
db((db.auth_event.user_id==db.auth_user.id)&(db.auth_event.time_stampdatetime_end)&(db.auth_event.description.contains('Logged-in'))).sel
Hello All
I try to implement User Management via privileged users (
http://web2py.com/books/default/chapter/29/09?search=User+Management+via+privileged+users#User-Management-via-privileged-users-%28Experimental%29
)
In my db.py, I added the following line after creating my auth object
auth.setti
I have an issue, but my question is really a "meta issue" about the issue...
I'm developing a large database application which uses a postgres server
which is separate from the web2py installation (on nginx). When geting
pages currently the time to fetch a page is 2-10 seconds! I have profiled
The site is showing error ticket links regardless of the site section (home
page, book, etc) ...:(
-Jim
--
---
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 w
wow!! many many thanks.. :)
On Tue, Jul 2, 2013 at 10:15 AM, Anthony wrote:
> You left out some critical code from the original question -- your
> Javascript sends each post request twice:
>
> function send_data(id){
> $.post("{{=URL('contest','flip_contest_status')}}", {id: id} );
>
Your problem is about SQL.
You need to use LEFT JOIN. This will help you:
http://web2py.com/books/default/chapter/29/06#Left-outer-join
On Mon, Jul 1, 2013 at 9:49 PM, Francisco Betancourt
wrote:
> Hi everyone.
>
> I want to show the number of logins for every user in the last 7 days in a
> view
Hello all
I a controller, I define a contact form like this :
form=SQLFORM.factory(
Field('your_name',requires=IS_NOT_EMPTY(), label=T('Your name')),
Field('your_email',requires=IS_EMAIL(), label=T('Your email')),
Field('subject',requires=IS_NOT_EMPTY(), label=T('Subject'
Did you try the {{=response.toolbar()}} ?
On Tuesday, 2 July 2013 05:18:27 UTC-5, Joe Barnhart wrote:
>
> I have an issue, but my question is really a "meta issue" about the
> issue...
>
> I'm developing a large database application which uses a postgres server
> which is separate from the web2p
I restarted the server. Not sure what the problem was.
On Tuesday, 2 July 2013 06:20:13 UTC-5, Jim Gregory wrote:
>
> The site is showing error ticket links regardless of the site section
> (home page, book, etc) ...:(
>
> -Jim
--
---
You received this message because you are subscribed to th
For visualizing network latency etc, Firebug is great (available for
Firefox).
I think all major browsers have a similar development tool.
On Tuesday, 2 July 2013 11:18:27 UTC+1, Joe Barnhart wrote:
>
> I have an issue, but my question is really a "meta issue" about the
> issue...
>
> I'm de
Chrome error log says:
WebSocket connection to 'ws://127.0.0.1:/realtime/mygroup' failed:
Unexpected response code: 426
the mesagges from serverside (python) reach tornado (I see in console)
I run w2p locally.
Tested with FF (21.0) and Chrome (26.0.1410.63 ), which work OK with
http://ww
For the moment i will leave this upload with DAL, in the future i will make
upload class. I still have a problem with this:
def nt_download():
return response.stream(open(os.path.join(request.folder, 'uploads',
request.args(0))), attachment=True)
This code doesn't work properly for files like
You mention ajax but then discuss time to load a whole page. Are there
multiple ajax requests coming from the page? If so, does each ajax request
require the session (locking of the session file will force the ajax
requests to be handled serially instead of in parallel)? If not, you can do
sess
> First of all i would like to avoid using DAL when saving images.
> image = db.entry.entry_label.store(file, filename)
> Does web2py have any mechanism for uploading? I would be great to have a
> class that handles uploads For my point of view framework needs to be set
> of tools for the deve
This might be sort of an easy question so I apologize. I am making
an application where the user selects from a drop down list of template
messages and then the program sends a text where the message body depends
on what item was selected from the drop down. I.e If I selected 6 from the
On Sun, Jun 30, 2013 at 2:07 AM, Alan Etkin wrote:
> I can confirm it is down. Not sure why. I tried restart it but did not
>> restart. I have emailed the pythonanywhere support.
>
>
> It works!
>
>
It seems it's still down. Any ideas?
> Thanks
>
> --
>
> ---
> You received this message because
Hi Folks,
I am making an app that does some text processing.
I want to process the text and write the output to a file. While I can
write the output to the directories and even make them available for
download that will not allow me to maintain the file WELL in the
database(of course i can just
Looks like a bug in IS_EMPTY_OR -- it ignores the zero argument to IS_IN_DB
and instead forces the zero choice to be ''. Please file a Google Code
issue.
For now, here's a workaround:
form.element('option[value=]').append(T(''))
Anthony
On Tuesday, July 2, 2013 7:22:50 AM UTC-4, Loïc wrote:
>
Hi
Anyone using a date widget in a twitter bootstrap modal window? I just
tried it and the calendar popup pops up behind the modal window.
web2py version 2.5.1-stable+timestamp.2013.06.21.06.43.49
-Jim
--
---
You received this message because you are subscribed to the Google Groups
"web
Not down for me.
On Tuesday, 2 July 2013 06:00:39 UTC-5, Gökçen Eraslan wrote:
>
>
> On Sun, Jun 30, 2013 at 2:07 AM, Alan Etkin
> > wrote:
>
>> I can confirm it is down. Not sure why. I tried restart it but did not
>>> restart. I have emailed the pythonanywhere support.
>>
>>
>> It works!
>>
>>
Hi all,
Is there a proper way to send multiple emails in the background of your
application?
I would not want the user to wait while the emails are being sent.
I am considering using a threads, but I would like to hear from the
community if this is the best approach.
Thanks.
--
Kevin Miller
According to the FDB documentation, an insert or update has to pass
parameters using an file-like object, like this:
cur.execute("insert into blob_test values (?)", (StringIO('abcdef'),))
It appears that currently the DAL passes the parameter as a very long
string, and Firebird has a 64k limit
See
http://web2py.com/books/default/chapter/29/08#Sending-messages-using-a-background-task.
You can use the built-in scheduler rather than a homemade task queue if you
prefer. You might also consider doing some ajax polling from the browser to
check the status of the mail send in order to noti
I ended up doing two querys. Never got the left (with the count working) If
some one has a better alternative I would like to know it. Thanks guys.
log_count=db.auth_event.id.count()
usrs =
db((db.auth_event.user_id==db.auth_user.id)&(db.auth_event.time_stampdatetime_end)&(db.auth_event.descrip
I think it's because you are using lazy tables. This has been fixed in
trunk, and in fact, the whole thing as changed -- for details, see
https://groups.google.com/forum/?fromgroups=#!topic/web2py/HdvSyZCJad4.
Anthony
On Tuesday, July 2, 2013 4:07:53 AM UTC-4, Loïc wrote:
>
> Hello All
>
> I tr
Hi Massimo --
Yes, I added the response.toolbar() to my ajax response and placed it at
the bottom of the served page. It basically confirmed the Postgres tools
-- my page is served in around 30ms for a typical request (actually faster
than "explain analyze" predicted). But the wall clock says
Hi villas --
Yes, I've used both Firefox and Chrome to try and understand what's going
on. Both tools show the actual time for the AJAX response -- seconds
insted of milliseconds. But they can't give me any detail of what's going
on during the request. They only show the time waiting for the
I basically have tried two AJAX requests and one request. Both have
resulted in the same outcome. I also tried the session._unlock(response)
suggestion but without any measurable result.
Clearly something in my setup is snarled but finding it is proving
difficult.
-- Joe
On Tuesday, July 2,
I just implemented record representation such as the table below. My
question is, is record representation supposed to save the value in the
database? I am trying to create a price override field in my product table
because the price can be changed within the series of a product (on the
series
I am getting the error " invalid literal for long() with base 10: 'test'".
When testing to find the problem it is interesting that I get this error
with a simple print statement. I have searched the group and found several
issues with this same error but none that seem to provide the answer. her
Resolution found. I looked for an answer all morning before finally posting
the question and 10 min after posting I figured it out. I'm still not sure
why it gave me an error on a print command, but the problem was because I
was searching the wrong table. Once I corrected it that fixed the probl
Use the 'network' tab on chrome... button... right click, save as HAR,
attach it here.
On Tuesday, July 2, 2013 11:02:37 AM UTC-7, Joe Barnhart wrote:
>
> I basically have tried two AJAX requests and one request. Both have
> resulted in the same outcome. I also tried the session._unlock(resp
The represent attribute does not affect the value stored in the database --
it just affects the display of the value in the grid, SQLTABLE, and
read-only forms. If you want to set the value in the database, use a
compute field.
Anthony
On Tuesday, July 2, 2013 3:06:06 PM UTC-4, greenpoise wrot
I should also add that if I add this line-
auth.add_permission(1, 'read', r.id)
so that it reads-
if db(db.man.id > 0).isempty():
for line in open('database.txt', 'rU'):
fieldname1,fieldname2,id1,id2 = line.strip().split('\t')
r = db.man.insert(fieldname1=
Try edit the calendar.css and increase the value of z-index.
On Tuesday, 2 July 2013 10:25:22 UTC-5, Jim S wrote:
>
> Hi
>
> Anyone using a date widget in a twitter bootstrap modal window? I just
> tried it and the calendar popup pops up behind the modal window.
>
> web2py version 2.5.1-stable+
please open a ticket.
On Tuesday, 2 July 2013 10:43:07 UTC-5, Raul Monares wrote:
>
> According to the FDB documentation, an insert or update has to pass
> parameters using an file-like object, like this:
>
> cur.execute("insert into blob_test values (?)", (StringIO('abcdef'),))
>
> It appears th
Thanks Massimo, I raised it to 9 and it now works.
-Jim
On Tuesday, July 2, 2013 10:25:22 AM UTC-5, Jim S wrote:
>
> Hi
>
> Anyone using a date widget in a twitter bootstrap modal window? I just
> tried it and the calendar popup pops up behind the modal window.
>
> web2py version 2.5.1-sta
FYI - the modal window had a z-index of 1050.
-Jim
On Tuesday, July 2, 2013 5:01:20 PM UTC-5, Jim S wrote:
>
> Thanks Massimo, I raised it to 9 and it now works.
>
> -Jim
>
> On Tuesday, July 2, 2013 10:25:22 AM UTC-5, Jim S wrote:
>>
>> Hi
>>
>> Anyone using a date widget in a twitter bootst
>
> I should also add that if I add this line-
>
> auth.add_permission(1, 'read', r.id)
>
Perhaps this is obvious, but, have you enabled the Auth tables (they are by
default in the scaffolding app)?.
In order to use rbac, you should have something like this in your model
auth = Aut
I'm sure this is old hat to the grizzled veterans on here but for a newbie
like me this was an interesting write-up:
http://www.hanselman.com/blog/OneOfMicrosoftsBestKeptSecretsPythonToolsForVisualStudioPTVS.aspx
--
---
You received this message because you are subscribed to the Google Grou
>
> This might be sort of an easy question so I apologize. I am making
> an application where the user selects from a drop down list of template
> messages and then the program sends a text where the message body depends
> on what item was selected from the drop down. I.e If I selected
>
> Resolution found. I looked for an answer all morning before finally
> posting the question and 10 min after posting I figured it out. I'm still
> not sure why it gave me an error on a print command, but the problem was
> because I was searching the wrong table. Once I corrected it that fixe
Good. I am raising it in trunk to 2000.
On Tuesday, 2 July 2013 17:06:45 UTC-5, Jim S wrote:
>
> FYI - the modal window had a z-index of 1050.
>
> -Jim
>
> On Tuesday, July 2, 2013 5:01:20 PM UTC-5, Jim S wrote:
>>
>> Thanks Massimo, I raised it to 9 and it now works.
>>
>> -Jim
>>
>> On Tuesd
43 matches
Mail list logo