Hi,
I want to use export feature in SQLFORM.grid, but it doesn't work when
query in self reference table.
db.py :
auth.settings.extra_fields['auth_user'] = [
Field('LineManager', 'reference auth_user'),
.
controller.py :
lineMng = db.auth_user.with_alias('lineMng')
I wanted to switch from pattern-based routing on a Windows IIS7 Server with
isapi_wsgi to a parameter-based routing to benefit from nicer urls but it
is not working.
It either says invalid request or the server stucks in an endless loop.
My functioning pattern based routing. As you can see I
Il giorno giovedì 23 maggio 2013 02:46:21 UTC+2, Simon Ashley ha scritto:
Thanks Simone,
A little more on this.
Seems to to be an issue with windows consuming memory and grinding the
system to semi halt.
The characteristic isn't there in Linux. (ubuntu under vmware hosted by
win7)
{{export_get_vars = request.get_vars}}
{{export_get_vars.export_format = csv}}
{{export_get_vars.export_format = xls}}
{{=request.get_vars}}
I have a code like this, i dont understand what is going on. I assign
request.get_vars to export_get_vars, when i add seomething to
I think that request.get_vars return the reference to Storage object not
its copy. So adding something to your variable de-facto adds items to
former Storage.
Dne čtvrtek, 23. května 2013 11:00:40 UTC+2 Domagoj Kovač napsal(a):
{{export_get_vars = request.get_vars}}
I've added the following RSS feed function to my default controller:
def updatefeed():
list_of_rss_entry_dicts = [ dict(title = data_set.f_headline,
link = 'http://' + settings.domain_name,
description =
This is how Python works. In Python, variable names act like labels that
are attached to objects in memory.
export_get_vars = request.get_vars
export_get_vars is request.get_vars
True
id(request.get_vars)
54474840L
id(export_get_vars)
54474840L
As you can see above, export_get_vars and
Hi Alan,
On a general note (for future consideration), it is useful to have some
records in markmin and others in html. To achieve this I think we really
need to add a 'render_type' field to accompany the raw data. Then we can
really mix it up.
In one implementation, I also added an
I've added the Twitter posting function to my app, in the form in which
it's presented in the book -
http://www.web2py.com/books/default/chapter/29/14?search=twitter#Twitter-API.
When calling this function with the username supplied in the Twitter
Account menu's username field, my twitter
I think Twitter no longer supports basic authentication (we should probably
update the book).
Anthony
On Thursday, May 23, 2013 9:03:54 AM UTC-4, Lamps902 wrote:
I've added the Twitter posting function to my app, in the form in which
it's presented in the book -
Hello!
I found this tricky way to have in evidence required fields in a grid
defined like the following:
code
def dressMandatory(grid, table):
Special representation for mandatory fields in grid
for fieldname in table.fields:
myid = '_'.join((table._tablename, fieldname, ))
No, but why?
On Wednesday, 22 May 2013 23:16:20 UTC-5, Abhishek Gupta wrote:
Hi,
Is there an easy way to disable the logs generated in databases/sql.log
other than editing gluon/dal.py?
Regards
Abhishek Gupta
Co-founder, Zumbl
--
---
You received this message because you are
Thank you Calvin and Alan. I'm not familiar with JSON and not much content
in the book at the moment. I will do my research based on your suggestions.
Regards,
Lio
On Wed, May 22, 2013 at 1:09 AM, Alan Etkin spame...@gmail.com wrote:
You could then write some javascript to populate block 2
I beg your pardon... here it is the corrispondent solution for the
form... but maybe you have better ideas
def dressMandatoryInForm(form, *tabs):
Special representation for mandatory fields in form
tabs_fields = [[t[f] for f in t.fields if f != t._id.name] for t in
tabs]
I believe sql.log only records the SQL for migrations (i.e., table
creation, altering tables, and truncating tables), so logging will be
disabled if you disable migrations.
Anthony
On Thursday, May 23, 2013 12:16:20 AM UTC-4, Abhishek Gupta wrote:
Hi,
Is there an easy way to disable the
The sql.log only said that the table was effectively created (it was), just
couldn't read or write to it after.
Are you using psycopg2? I was just using the pg8000 that comes with
web2py, however someone informed me that web2py is broken as shipped (!)
and sure enough, after installing
Thanks, Anthony. Are you aware of any viable web2py solutions to making
Twitter posts? Would it be a good idea just to use some python Twitter
module?
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and
Thank you, Massimo,
After reading a lot more about feedparser and xlml,
I began going through xlml examples but figured that feedparser was already
doing most of what I needed, so I found this on stackoverflow,
I don't think web2py has anything built in, so just check the Twitter API
docs and/or find an existing Python module to help.
Anthony
On Thursday, May 23, 2013 10:24:04 AM UTC-4, Lamps902 wrote:
Thanks, Anthony. Are you aware of any viable web2py solutions to making
Twitter posts? Would it
Trying to get it running with this one:
https://pypi.python.org/pypi/twitter. Thanks!
On Thursday, May 23, 2013 9:58:34 AM UTC-5, Anthony wrote:
I don't think web2py has anything built in, so just check the Twitter API
docs and/or find an existing Python module to help.
Anthony
On
Anthony, that souns good, thanks.
Massimo, our sql.log grows to almost 1GB each day. I used fake_migrate=True
for all the tables.
Regards
Abhishek Gupta
Co-founder, Zumbl
Zumbl http://zumbl.com |
Facebookhttp://facebook.com/abhishekgupta.iitd |
Twitter http://twitter.com/abhishekgupta92 |
On the contrary. I think information about testing using web2py, in conjuction
with various testing-frameworks/tools, is highly relevant in the book, along
with common testing-practices, and the way they apply when testing with web2py.
The book, in that case, would act as an
On the contrary. I think information about testing using web2py, in conjuction
with various testing-frameworks/tools, is highly relevant in the book, along
with common testing-practices, and the way they apply when testing with web2py.
The book, in that case, would act as an
Is there a way of using a pure Ajax request to web2py authentication and
create a session for a successfully logged in user?
--
...
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA
Cell: +260 97 7760473
On the contrary. I think information about testing using web2py, in conjuction
with various testing-frameworks/tools, is highly relevant in the book, along
with common testing-practices, and the way they apply when testing with web2py.
The book, in that case, would act as an
On the contrary. I think information about testing using web2py, in conjuction
with various testing-frameworks/tools, is highly relevant in the book, along
with common testing-practices, and the way they apply when testing with web2py.
The book, in that case, would act as an
On the contrary. I think information about testing using web2py, in conjuction
with various testing-frameworks/tools, is highly relevant in the book, along
with common testing-practices, and the way they apply when testing with web2py.
The book, in that case, would act as an
On the contrary. I think information about testing using web2py, in conjuction
with various testing-frameworks/tools, is highly relevant in the book, along
with common testing-practices, and the way they apply when testing with web2py.
The book, in that case, would act as an
I am running into issues installing pandas (or any third-party module).
Basically, my python on my windows machine sits on c:\python27\, and pandas
is installed in c:\python27\Lib\Site-Packages\pandas
Now, when I try to include pandas in my web2py app, however, I am getting
an error saying
Hello,
I am new on web2py. I am using it to develop a Programming Contest
Management system. Now on a ONSITE Programming Contest , we have to
distribute username and password printed on paper. So i have implemented a
function which will generate user accounts automatically then print the
How do install Pandas on web2py?
--
---
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.
For more options, visit
Hi,
I am currently hosting my site that I'm developing from my Windows 8
machine.
I have my python installed in my computer at c:\python27\ and all the
libraries get installed to c:\python27\site-packages I believe.
According to the web2py doc, it says in order to use third party modules, I
On a general note (for future consideration), it is useful to have some
records in markmin and others in html. To achieve this I think we really
need to add a 'render_type' field to accompany the raw data. Then we can
really mix it up.
I have suggested the same here (without mixing
You did read the book before you asked, yes?
http://www.web2py.com/book/default/chapter/09#Access-Control-and-Basic-Authentication
On Thursday, May 23, 2013 9:49:21 AM UTC-7, software.ted wrote:
Is there a way of using a pure Ajax request to web2py authentication and
create a session for a
Are you doing something that requires fake migrations every day (presumably
multiple times per day)? Are the *.table files getting deleted?
On Thursday, May 23, 2013 12:04:32 PM UTC-4, Abhishek Gupta wrote:
Anthony, that souns good, thanks.
Massimo, our sql.log grows to almost 1GB each day. I
No, we aren't doing anything that requires fake_migrations to be true. I
did it because of the peculiar needs that we had :
Live Server - One domain - One database
Dev Server - Multiple domains/web2py installations - Shared database
Generally, when we make any change in db, I set migrate=True
We can update the book as frequently as we like. I think this is the place
for announcements (there's also the Twitter feed). Aside from that, I
suppose we could maintain some kind of framework roadmap document, but we
don't really have a formal roadmap process, and I'm not sure there is a
If you have Python installed on your machine and want web2py to use that
version of Python, then simply download the source version of web2py and
run that instead of using the Windows or Mac binaries. The binaries include
their own standalone Python interpreter, so they won't see any modules
Basic authentication won't do anything with the session -- it requires
sending the credentials on every request -- probably not what's desired
here. Instead, the very next section in the book may help:
http://www.web2py.com/book/default/chapter/09#Manual-Authentication. You
can post the login
I was just wondering because I think writing to sql.log should only happen
when there are actual changes to the table definitions (or if the *.table
files are deleted or become corrupted). If you're not making any changes to
the schema or touching the *.table files, I wouldn't think the sql.log
No, .table files aren't deleted or corrupted. Most of the output are of the
type
timestamp: XXX
ALTER TABLE YYY DROP COLUMN ZZZ;
faked!
Regards
Abhishek Gupta
Co-founder, Zumbl
Zumbl http://zumbl.com |
Facebookhttp://facebook.com/abhishekgupta.iitd |
Twitter
I am trying to use library from http://grabz.it/api/python/
I put library in controller and module and import GrabzItClinet
I basically copy the whole directory(GrabzIt) into controller and module
The error says
Cannot import module 'GrabzItClient'
--
---
You received this message because
If you want to do:
import GrabzItClient
then it looks like you need to put these 4
fileshttps://code.google.com/p/grabzit/source/browse/#svn%2Ftrunk%2Fpython%2FGrabzItdirectly
in the /yourapp/modules folder (don't put another sub-folder in
that folder).
Anthony
On Thursday, May 23, 2013
In my views, I have:
{{=A('click for more information', _href=URL(myCallback, args=[1]))}}
When the anchor button is clicked, my callback will do some lookup and
processing in the db, and then will redirect to a new page populated with
the new information:
def search_results():
resultSet
Using stadard web2py registration and authentication, you cannot disable it.
You must write your own registration and authentication routines or
change your workflow to register and print your cards.
On Thu, May 23, 2013 at 5:44 AM, Ahmad Faiyaz faiya...@gmail.com wrote:
Hello,
I am new on
After auth.define_tables(), I think:
db.auth_user.password.requires = None # or some other validator, such as
IS_STRONG()
should do it. By default, the password field has a CRYPT() validator, which
does the hashing -- this would remove/replace that validator.
However, this is not a good
for web2py.
http://newrelic.com/lp/python-monitoring?utm_source=REMKutm_medium=remarketingutm_content=rpmutm_campaign=RPMutm_term=graph250mpc=TA-REMK-RPM-EN-0-NewLP-textadgclid=COWghpP7rLcCFYWf4AodWlQAAA
--
---
You received this message because you are subscribed to the Google Groups
Why do you need to redirect at all? You can just call the search_results()
function directly from the myButton() function:
def search_results(resultSet):
div = DIV(.)
return dict(div=div)
def myButton():
someId = request.args(0)
resultSet = db()
return
search_results() will have to be exposed since I want to display the
results on a different page (in search_results.html). I think returning the
div using your suggestion would still be on the same page?
On Thursday, May 23, 2013 3:38:17 PM UTC-4, Anthony wrote:
Why do you need to redirect
auth.signature appends a boolean field called is_active to a table. The
default is True.
Under the covers it's not really boolean, it's char(1). When you insert a
record, is_active is set to t. That's right, a lowercase t.
Today I had the kind of problem where queries were missing records.
Is there a way to append multiple components to an HTML helper in a single
append() call, or do we have to use a separate append() call for each
component?
I'm trying to append four components to a SPAN helper held in the variable
wrapper. I've tried it this way:
The .components attribute of the helper is a Python list, so you can use
all the standard list methods, such as .extend():
wrapper.components.extend([new_component_1, new_component_2, new_component_3
, new_component_4])
Perhaps we should add an .extend() method directly to the helpers, as we
hello
i have 4 functions to do the same query.
db(db.mytable1.id0).select()
db(db.mytable2.id0).select()
db(db.mytable3.id0).select()
db(db.mytable4.id0).select()
Maybe i can use only one like this
def f1(table_to_query):
row=db(db[table_to_query].id0).select()
it does not work
what is
But presumably the myButton() function does not have its own view given
that it was originally written to always redirect to another URL. In that
case, why not just make the myButton.html view render the search results as
desired? If you want a search_results.html view to be used from multiple
That should work if you are passing in the name of the table as a string.
If you're passing in the table object itself, then it should be:
row=db(table_to_query.id0).select()
As an aside, it helps if you report the error or traceback (or explain in
more detail than does not work).
Anthony
I figured out a solutiion. It may not be the most appropriate, though,
in the controller, here is what gets returned:
return(XML(t_conditions + t_summary))
and in the view,
{{ =(XML(LOAD('default','weatherfeed')))}}
This prints out the image and text with no extraneous characters.
On
Hi there,
I'm using Version 2.4.6-stable+timestamp.2013.05.17.14.52.19, Running on
mac, Python 2.7.2, no external JSON library installed.
Sending the following data via PUT, application/json; charset=UTF-8:
{id: 3}
results in a JSON parser error occurring at main.py:
if is_json:
On 23 May 2013, at 5:35 PM, Matt mjwat...@gmail.com wrote:
Hi there,
I'm using Version 2.4.6-stable+timestamp.2013.05.17.14.52.19, Running on mac,
Python 2.7.2, no external JSON library installed.
Sending the following data via PUT, application/json; charset=UTF-8:
{id: 3}
results
Anthony,
How do I set them to writable when I need them to be? I'm attempting to
update them in a controller and I'm not sure how to do it
Chris
On Monday, 20 May 2013 12:19:32 UTC-4, Anthony wrote:
Setting a field's writable attribute to False prevents users from
inputting values in
So I'm stuck again and once again -- appreciate any help. What I'm doing
it pretty simple, I think. The code runs fine -- no error messages, but
the field isn't updated as I expect. So something is borked. flag
contains an integer from 1-16. The field in the db is called f_chal1,
f_chal2,
Good point, Anthony.
I didn't remember the password was encrypted in a validator.
Shame on me, guys. ;-)
On Thu, May 23, 2013 at 4:29 PM, Anthony abasta...@gmail.com wrote:
After auth.define_tables(), I think:
db.auth_user.password.requires = None # or some other validator, such as
auth.user.challenge.writable=True
First, you're working with the wrong object there. auth.user is just a Row
object holding the db.auth_user record of the current logged in user. It's
keys/attributes hold values, not DAL Fields -- so it doesn't make sense to
set writable
Thanks for your response.
Unfortunately that example isn't quite the same as how json is processed
from the body in main.py. I.e. it's using cStringIO I think.
I can put together an example that highlights this I guess.
On Friday, May 24, 2013 12:53:14 PM UTC+12, Jonathan Lundell wrote:
On
On 23 May 2013, at 7:52 PM, Matt mjwat...@gmail.com wrote:
Thanks for your response.
Unfortunately that example isn't quite the same as how json is processed from
the body in main.py. I.e. it's using cStringIO I think.
Right. That's why I think it'd be useful to see what body.read()
This is fine. Just use the web2py source distribution, not the web2py
windows binary.
On Wednesday, 22 May 2013 22:31:37 UTC-5, gthwang5 wrote:
Hi,
I am currently hosting my site that I'm developing from my Windows 8
machine.
I have my python installed in my computer at c:\python27\
Install python source and install the pandas libraries as you normally
would (pip., easy_install)
On Wednesday, 22 May 2013 22:55:22 UTC-5, gthwang5 wrote:
How do install Pandas on web2py?
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
I think you submitted a patch one. Do you stil have it?
On Thursday, 23 May 2013 12:28:06 UTC-5, Alan Etkin wrote:
On a general note (for future consideration), it is useful to have some
records in markmin and others in html. To achieve this I think we really
need to add a 'render_type'
This is a backward compatibility issues. The fact that it inserts a 't'
instead of a 'T' is more of a concern to me. How was the query built?
The source clearly says:
TRUE = 'T'
FALSE = 'F'
On Thursday, 23 May 2013 16:21:18 UTC-5, Cliff Kachinske wrote:
auth.signature appends a boolean
Please open a ticket about this.
On Thursday, 23 May 2013 19:35:08 UTC-5, Matt wrote:
Hi there,
I'm using Version 2.4.6-stable+timestamp.2013.05.17.14.52.19, Running on
mac, Python 2.7.2, no external JSON library installed.
Sending the following data via PUT, application/json;
I've been using Web2Py successfully for this project since about September.
Recently, I restarted the server because something in the process had my
CPU pegged to 100%. Since then, I've been unable to update my controller
file. I normally upload my updated code to the server and run a script to
Of course read the book, auth.login_bare() manages my sessions
automatically? Will check it out thanx
On 23 May 2013 20:09, Anthony abasta...@gmail.com wrote:
Basic authentication won't do anything with the session -- it requires
sending the credentials on every request -- probably not what's
Why I asked cause a 2 months or so Massimo contributed to a similar thread
and this is what he wrote:
Should we offer something like {{=auth.ajax_login()}} helper which submits
to /user/login? If would not be difficult to write.
How should it work?
The guy who hd asked a question on pure Ajax
In addition, auth.login_bare() seems to check only with auth_user table, if
my authentication is based on LDAP it may not work. Any progress that has
been made on auth.ajax_login()?
On 24 May 2013 05:58, Teddy Nyambe software@gmail.com wrote:
Why I asked cause a 2 months or so Massimo
hi folks,
is there anyone know how to handle request.args string value contain a
space?
e.g.
models/menu.py
if request.controller=='default':
response.menu = [
(T('Home'), False, URL('default', 'index'), []),
]
services = db(db.service).select(orderby=db.service.id)
Have figured it out now.
I'm using the restful decorator to expose some web services.
In the example given in the book it shows:
@request.restful()
def api():
response.view = 'generic.json'
def GET(tablename,id):
if not tablename=='person': raise HTTP(400)
return
Hi, I am a complete web2py noob, so sorry in advance for a potentially
dumb question.
*I am trying to create a simple form that has three fields. StartDate,
EndDate, Symbol*
When I click submit button, I have a python function that
- takes these three variables
- creates a table (
76 matches
Mail list logo