I´m still trying to troubleshoot this error. If I look at
auth.settings.mailer it says it is empty. How come?
In my models file if have auth.settings.mailer=mail
I added to tools.py in gluon:
return self.settings.mailer under def request_reset_password(
so no wonder it says function is
Hello,
I am wondering how to properly do an ajax login. I will be doing the
whole thing with jquery ajax. I use it for a lot of stuff, I hav ajax
controller that handles getting data from models and returns jsons. It
works just fine...
Yet when it comes to login, the whole auth seems to me to be
I use auth.login_bare function. Just post user and password to it. It will
do the rest of the job.
http://zerp.ly/rochacbruno
Em 28/09/2011 06:15, Marek Mollin rog...@gmail.com escreveu:
Hello,
I am wondering how to properly do an ajax login. I will be doing the
whole thing with jquery ajax.
Good man!
Thank a lot, its also undocumented in the book ;]
On Sep 28, 11:24 am, Bruno Rocha rochacbr...@gmail.com wrote:
I use auth.login_bare function. Just post user and password to it. It will
do the rest of the job.
http://zerp.ly/rochacbruno
Em 28/09/2011 06:15, Marek Mollin
hi
i want to insert a date, bust just a day and a mont, without a year
is that possible?
andrej
Hi.
I developed an app to manage schedule, lighting talks and talk pos
avaluation on Pycon Brasil.
If this app could be useful for anyone I will open the source.
Help me test it (Pycon starts tomorrow) give me your suggestions.
The app has 3 purposes:
You create a schedule based on conf
Take care! You will be responsible for all the data traffic from your form
to the function.
Create an action which receives request.args (post) and deal with login bare
function. I have a running app but I cant share the code now. I will send it
later.
http://zerp.ly/rochacbruno
Em 28/09/2011
Looks very nice, twitter bootstrap in action, open source it please :-) ...
I will test it later today ...
Yeah i love screen coz i can search back easily and interactively debug infos.
Yes its doing concurrent , the problem happen again yesterday but just
for once , and gone away again.
Theres 2 Grid (jqGrid) in one page , they request 2 json response from
that controller but from different function
Hi,
I am trying to develop a SNS site, and want to make it more
customizable and pluggable.
So I published some SNS plugins following Facebook:
[SNS-Plugins]
Comment Box http://dev.s-cubism.com/plugin_comment_box
Friendship http://dev.s-cubism.com/plugin_friendship
Messaging
I started using mod_proxy and everything is ok.
On Sep 24, 10:58 am, Necati Demir ndemir.de...@gmail.com wrote:
I started to see error messages again. So it is not about 1.94.
On Sep 24, 10:26 am, Necati Demir ndemir.de...@gmail.com wrote:
No. But I realized that I was using 1.94 and
I think it can be done through jQuery / jQuery API for handlers of
events .
regards
yogesh
Hello,
How can I use URL function ( i mean {{=URL()}} ) in external js and
css files?
I want to know how web2py provides the functionality for the
following :
I am developing an application in which I have a defined area in
the browser say : 100px x 100px . I want that any mouse clicks and
keyboard inputs be conveyed to web2py and then to the corresponding
code in python for
you can if you put your js and css files in the view folder e.g.
controllers/default.py
def myscript():
return dict()
def index():
response.files.append(URL('myscript.js'))
views/default/myscript.js
jQuery(document).ready(function() {
alert('this is an alert with a web2py url
I have a 2 part question I am rather new to web2py, I am trying to
merely generate several drop down forms of the unique values for a
field. I have accomplished this but feel there is a better way to do
so, if you see a better way feel free to comment. Second I want to
take these values and
The first thing my boss said when I demonstrated the new SMARTGRID was 'Why
are all the numbers aligned to the left?
I haven't dug into it yet so I'm hoping someone has an easy CSS fix or
something...I'm way out of my element here...
I'm not sure if this work cause I didn't test it, but did you tried with
represent?.
something like this:
db.mytable.price.represent = lambda price, row:
XML(DIV(price,_style='text-align: right;'))
2011/9/28 Willoughby neil.erik...@gmail.com
The first thing my boss said when I demonstrated
On Wednesday, September 28, 2011 8:16:18 AM UTC-4, Will wrote:
for row in ra:
SA.add(row.color)
##ra = db().select(db.aa.color, distinct=True)
##form = SQLFORM.factory(SQLField('color', label='Select a
service'), requires=IS_IN_DB(db,'aa.color'))
The above should
Have you confirmed the 'mail' is not None in your model file?
On Wednesday, September 28, 2011 5:11:00 AM UTC-4, Kenneth wrote:
I´m still trying to troubleshoot this error. If I look at
auth.settings.mailer it says it is empty. How come?
In my models file if have auth.settings.mailer=mail
You'll have to detect the event client side using jQuery (or some
Javascript), and then use jQuery ajax to send the data back to web2py.
Depending on the data and the desired result, you might be able to use the
web2py ajax() function, but more likely will need to use the jQuery .ajax
(or
How do I compile web2py application in release mode?
Hi All,
Has anyone got the jQuery-specific version of TinyMCE working with web2py?
Any hints? It's driving me potty, as it simply doesn't fire for me!
In an attempt to understand it, I've cut and pasted the example from the
TinyMCE site, and even that doesn't fire (in the sense that there are
That is exactly what I needed ! Thanks a lot.
Regards,
Thomas
Le 27/09/2011 22:52, Richard Vézina a écrit :
And since the file is always rebuild... If he wants to clear old stuff
he just can earase the entire file if he wants.
Also, imagine you want to keep some translation into DB... You
You've given the same name to three fields ('item[]'). web2py treats that as
one field, so it puts all the values submitted in those fields into a single
list to represent the value of the field. When an error is returned, web2py
populates the form with the previously submitted values, so it is
Martin,
You know what ? it works !
On Sep 28, 7:33 am, Martín Mulone mulone.mar...@gmail.com wrote:
I'm not sure if this work cause I didn't test it, but did you tried with
represent?.
something like this:
db.mytable.price.represent = lambda price, row:
Thanks for clearing up the displaying unique dropdown value code.
Anyone have any thoughts on how to take a select variable and display
those values from a table in the new url? For instance I am getting
None in the bla variable on the index page. After selecting my form
and redirecting there.
Thanks Anthony for the reply.
1) With your answer, I understand why the ['',''] is displayed. But is there
a way to change it?
2) [] is appended since I wanted an array. But in the mean-while I
experimented without [] and just having 'items' as the variable name for all
the three fields and
I think I forgot to mention...
Take care if you clear the whole file, you will probably lost your good
translation...
So maybe make a copy of the file and then you can write a simple script that
compare both dict the old one and the new generated dict store into
tranlation file than import just
I have updated the online book, the content, not the app, with my most
recent edits.
Not everything is documented yet but lot more stuff is. The book is
about 10% bigger already.
When done should be 20-30% bigger than the 3rd edition.
Here is a list of new features that are documented in 3.1 but
That's tricky. You might get ideas from
this: https://groups.google.com/d/topic/web2py/UK8NZ1VMlNk/discussion. Maybe
others have suggestions.
Anthony
On Wednesday, September 28, 2011 9:48:16 AM UTC-4, Joseph Jude wrote:
Thanks Anthony for the reply.
1) With your answer, I understand why
The way you're doing it, when you get to the index() function, 'blah' will
be in request.vars.blah, not in session.vars (you never saved anything to
the session). If you want it in the session, you'd have to do session.blah =
request.vars.color in your formentry() function.
Anthony
On
I found a work around. I had two decorators on the index controller
functions. I separated that function into two putting a decorator on each.
Previously:
@requires_session_option
@auth.requires_login
def index():
return dict()
Now:
@auth.requires_login
def index():
Thanks, that solved the problem,
didn't realize i wasn't saving in session, i was trying to transfer by
url following examples,
so i made following changes to code and now it is transferring values
correctly
redirect(URL('index',vars ={'bla' :request.vars.color}))
def index():
var =
Can we format 500.00 to $500.00 on smartgrid ?
Is there a reason that you want to format on the grid?
because you can do it in field.represent:
db.yourtable.yourfield = lambda value, row: '$ %.2f' % (0.0 if value == None
else value)
On Wed, Sep 28, 2011 at 4:48 PM, Omi Chiba ochib...@gmail.com wrote:
Can we format 500.00 to $500.00 on
On Aug 8, 3:30 pm, DenesL denes1...@yahoo.ca wrote:
I was, a while back, just before the new dal.
The changes in the dal plus a busier work day conspired to kill the
effort.
On Aug 7, 1:54 pm, Francisco Costa m...@franciscocosta.com wrote:
Is anyone working on the MongoDBAdapter?
Are you
I think this is still a bug, though.
On Wednesday, September 28, 2011 10:17:26 AM UTC-4, Jim Karsten wrote:
I found a work around. I had two decorators on the index controller
functions. I separated that function into two putting a decorator on each.
Previously:
@requires_session_option
On Sep 28, 2011, at 8:10 AM, Anthony wrote:
I think this is still a bug, though.
Shouldn't that have been:
@auth.requires_login
@requires_session_option
def index():
return dict()
?
On Wednesday, September 28, 2011 10:17:26 AM UTC-4, Jim Karsten wrote:
I found a work around. I
Wow ! This is what I want.
Thanks !!
On Sep 28, 9:53 am, Massimiliano mbelle...@gmail.com wrote:
Is there a reason that you want to format on the grid?
because you can do it in field.represent:
db.yourtable.yourfield = lambda value, row: '$ %.2f' % (0.0 if value == None
else value)
On
Um, actually one more question.
Now I have two represent and riht now either one of them work but not
both. How I can combine them together ??
# Currency format
db.Product.List_Price.represent = lambda value, row: '$ %.2f' % (0.0
if value == None else value)
# text-align: right
view/layout.html
Is one of the file you don't want to update for sure... ;-)
Richard
On Wed, Sep 28, 2011 at 12:23 AM, encompass encomp...@gmail.com wrote:
They pretty much are.
All your files should be in the applications folder. But there may be
a few exception most you don't have to
untested
db.Product.List_Price.represent = lambda value, row: XML(DIV('$ %.2f' % (0.0 if
value == None else value),_style='text-align: right;'))
On 9/28/2011 10:42 AM, Omi Chiba wrote:
Um, actually one more question.
Now I have two represent and riht now either one of them work but not
Jim,
close but I got a following error.
Traceback (most recent call last):
File /home/www-data/web2py/gluon/restricted.py, line 194, in
restricted
exec ccode in environment
File /home/www-data/web2py/applications/pricelist/controllers/
default.py, line 95, in module
Can you post the relevant code from default.py?
-Jim
On 9/28/2011 11:02 AM, Omi Chiba wrote:
Jim,
close but I got a following error.
Traceback (most recent call last):
File /home/www-data/web2py/gluon/restricted.py, line 194, in
restricted
exec ccode in environment
File
As has been suggested, updating those files can be tricky and is best left
to the developer to figure out the best approach. If you want to consolidate
non-web2py files, how about a project (or whatever name) directory in
static?
Please disregard and forgive the list spam.
I adapted some of the file renaming code from store() in dal.py to
manually rename the file and everything worked out.
Thanks Massimo and contributers once again for the amazing code we all
benefit from.
-David
It's smartgrid so nothing really in default.py.
just this one.
def admin():
products = SQLFORM.grid(db.Product,deletable=False, paginate=10)
return dict(products = products)
This is my table.
db.define_table('Product',
Field('Part_Number'),
Field('List_Price', 'decimal(13,2)'))
I spoke too soon.
SQLFORM.factory is doing the proper renaming and uploading of the file
to the filesystem but I still cannot get the new filename
no_table.sirgallahad.823497htn7crh743uo5e4.ext
I can only retrieve the original filename with no path a la
request.vars.sirgallahad.filename
After
My question is regarding displaying modal window (jquery-ui)
After clicking a link in table row, the modal window appears
momentarily vanishes.
Code in View---
{{extend 'layout.html'}}
h1Department Master/h1
table id=dept_table
thead
tr
thDepartment ID/th
thDepartment Name/th
Happened once again
THis time 1st json request went ok and another request failed like it
did before.
On 9/28/11, Phyo Arkar phyo.arkarl...@gmail.com wrote:
Yeah i love screen coz i can search back easily and interactively debug
infos.
Yes its doing concurrent , the problem happen again
Michele,
Thank you for the info but it's kind of hard to follow because I use
IIS 7.5 and also I'm not sure if we should point c:\web2py for local
path (If it's the place we have web2py source version.)
I appreciate if you have step by step guide somewhere.
On Sep 27, 5:36 pm, Michele Comitini
This one should work...
db.Product.List_Price.represent = lambda value, row: DIV('⬠%.2f' % (0.0
if value == None else value), _style='text-align: right;')
On Wed, Sep 28, 2011 at 6:26 PM, Omi Chiba ochib...@gmail.com wrote:
It's smartgrid so nothing really in default.py.
just this one.
Got it!
My problem was using request.vars.bridgetroll.filename when I should
have used form.vars.bridgetroll_newfilename
Will read more carefully next time.
/list spam
-David
A couple of issues with the new grid. In particular I have a page that
includes a customer form and multiple grids on the same page:
1) Clear buttons for each list clears the first search box on the
page.
2) Add button passes the table name but not the other args. I want to
pass the customerid
Hi:
Are you importing the required files?
Load your view in firefox, and check if firebug show some error loading the
required files or maybe is coding typo.
Then show us the code you use it.
HTH, Bye
Hello,
I had to fix a old model design flaw. The old schema implies multiple
FK that are nullable depending of the context... I would use the base
parent table antipattern that Bill Karwin is proposing to normalised
db and keep referential integrity...
I would like to know what you think about
Can you try with a setup without rocket? I.e. scgi or uwsgi or fastcgi.
Is the server machine multicore?
mic
Il giorno 28/set/2011 18:48, Phyo Arkar phyo.arkarl...@gmail.com ha
scritto:
Happened once again
THis time 1st json request went ok and another request failed like it
did before.
Oh it worked !!
My smartgrid looks so smart !!!
On Sep 28, 12:07 pm, Massimiliano mbelle...@gmail.com wrote:
This one should work...
db.Product.List_Price.represent = lambda value, row: DIV('€ %.2f' % (0.0
if value == None else value), _style='text-align: right;')
On Wed, Sep 28,
ok
Ovidio Marinho Falcao Neto
ovidio...@gmail.com
83 8826 9088 - Oi
83 9334 0266 - Claro
Paraiba-Brasil
2011/9/28 Massimo Di Pierro massimo.dipie...@gmail.com
I have updated the online book, the content, not the app,
A different but related problem.
Now that I have the file on the filesystem with the nice web2py
renaming to prevent directory traversal attack, I cannot use the
default download function to download my newly uploaded file.
type 'exceptions.KeyError'('no_table')
This is because I'm using
Massimo,
web2py Japan finished the tranlation for ver 3.0 at the following
site.
https://sites.google.com/site/web2pyjapan/book/01
Editing to (ja) is disabled now and we're kind of waiting.
Now, I'm confused how we proceed it.
What the best way to do the translation work ?
1. Wait for the 4th
Hi,
This occurred to me too, and I had to use the 'table_name' argument in the
SQLFORM that handles the factory.
I hope this helps.
Carlos
The following commit has caused an error when columns/fields are not
specified:
http://code.google.com/p/web2py/source/detail?r=48e6f24a4ed36bb35bcd3f37e9ebc955dc9868a1
I have been trying to figure out where this error has been coming from and
finally narrowed it down. Here is the code I have
Hello Bruno,
Pretty nice and clean... I notice one thing in light talk :
http://labs.blouweb.com/pytalks/default/light
When user need to be logged to accomplish the works, maybe he could be
redirect to the login page??
Richard
On Wed, Sep 28, 2011 at 6:14 AM, David Marko dma...@tiscali.cz
I have this problem in GAE
Traceback (most recent call last):
File /base/data/home/apps/s~book-on/1.353593485285740911/gluon/
restricted.py, line 194, in restricted
exec ccode in environment
File /base/data/home/apps/s~book-on/1.353593485285740911/
Your download link to a Linux-compatible version of web2py takes me
to /tmp/D4veujvc.zip.part, which my laptop doesn't recognize as a
valid file extension. I did some research and Mozilla is supposed to
recognize this file type I think, perhaps I'll need to reconfigure it
somehow.
But in my
Yes, a couple of rows before that I have mail=Mail().
But now I found it. I have splitted db.py into four different files. For
some strange reason I had auth=Auth(globals(),db) twice, I removed the
second one and now everything works.
Thanks to everyone helping me.
Kenneth
Have you
Thank you so much Carlos. How noobtastic of me to not think of that
one.
-David
On Sep 28, 3:03 pm, Carlos carlosgali...@gmail.com wrote:
Hi,
This occurred to me too, and I had to use the 'table_name' argument in the
SQLFORM that handles the factory.
I hope this helps.
Carlos
It is not finding the record db.auth_group(description=Teacher)
Not sure it is a dal problem,
On Sep 28, 2:50 pm, felixdm joi@gmail.com wrote:
I have this problem in GAE
Traceback (most recent call last):
File /base/data/home/apps/s~book-on/1.353593485285740911/gluon/
restricted.py,
Which link are you looking at? We only download zip files.
On Sep 28, 2:56 pm, cvkluka cvkl...@gmail.com wrote:
Your download link to a Linux-compatible version of web2py takes me
to /tmp/D4veujvc.zip.part, which my laptop doesn't recognize as a
valid file extension. I did some research and
Ok but if the record exist
http://imageshack.us/f/198/dbgroup.png/
only if i do this the problem is fixed
if i change for this
if request.args(1)==teacher:
username_id =
db.auth_user(username=request.vars['username']).id
Server machine is 32 cores 64 GB RAM :)
WSGI limitation is bad at concurrency right? I am thinking to move to more
Concurrent setup. Coz version 1 of this software gonna use Qooxdoo for UI
and there will be a lot more concurrency.
What are the advantages of uwsgi can use uevent right?
On Thu,
Here is what i was asked for, weird that i haven't see in any application
yet.
A Dynamic Model : A dynamic table schema.
They want a feature to add a column dynamically , for example a table do not
have comment field. they want a button to add a new field on the fly and add
the data into it.
so
Excellent!
Thank you.
On Sep 28, 9:54 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
I have updated the online book, the content, not the app, with my most
recent edits.
Not everything is documented yet but lot more stuff is. The book is
about 10% bigger already.
When done should
Hi Phyo!!! I needed almost the same, and I found the EAV Modeling technique
(http://en.wikipedia.org/wiki/Entity-attribute-value_model) useful, but due
the complexity of my project I write the model as a file, I mean open the
*.py, write, append.
On Wed, Sep 28, 2011 at 4:31 PM, Phyo Arkar
Today Heroku started to also support Python (they only supported Ruby
before): http://blog.heroku.com/archives/2011/9/28/python_and_django/
Who wants to give a try with web2py on it?
Hi everybody!! I'm currently working on a really dynamic app.. basically we
are trying to automate a lab...
Here is the issue, I need to have a fully customizable database... In short
a new project is created and a custom model file is written for that
project, also I generate two groups in
Thank you very much for that technique. I will check it.
Yeah i also thought about writing schema_0-1-2-3-4.py file for each of the
table for each users.
But Letting python write its own Python code , wont it introduce security
concern :| ?
On Thu, Sep 29, 2011 at 4:11 AM, Ismael Serratos
NoSQL
Couch ? Mongo?
I really have to try them , not started yet.
On Thu, Sep 29, 2011 at 4:28 AM, pbreit pbreitenb...@gmail.com wrote:
NoSQL
Uses Pip to install dependencies. Our pip install is ready to go, right?
Looks like it's there but version 1.98.2.
Ok so your machine really behaves concurrently it could be that you
stumbled in some threading problem, probably at db driver level,
I am quite confident about rocket, so the next questions are ;-)
do you use a database?
which database?
mod_wsgi is not so bad it is difficult to tune IMHO and
I wrote:
uwsgi uses many different models. Using uwsgi a mix of event +
prefork could give a big boost, but if you care about performance
avoid apache.
I should have been:
uwsgi uses many different models. Using uwsgi a mix of event +
prefork could give a big boost --and-- if you care about
http://groups.google.com/group/web2py/browse_thread/thread/99cd6e8d1141336/0670fb6370961c26?lnk=gstq=meta+Jose#0670fb6370961c26
Cool thanks alot i will look into it too .
Try nginx or cherokee as http server then scgi. We using that type of
configuration in production with at least 180K json requests a
day and very complex business logic with high concurrency.
scgi is not much tunable but is really simple: on a machine
SQLFORM.factory renames and uploads my file to uploads/ dir via
store() in dal.py great.
In form.accepts (will refactor code to use .process() soon) I store
the new filename in a currently unsupported db.
What is the safe/proper/best way to retrieve my file?
I know the renamed filename but
Exactly Jose,
That is what I'm doing for one app. The Table, and Fields are
defined in metadata.
On Sep 29, 11:31 am, Jose jjac...@gmail.com wrote:
http://groups.google.com/group/web2py/browse_thread/thread/99cd6e8d11...
This does not prove that you have a record auth_group with
description='Teacher'. Perhaps your record has description='Teacher
\n'?
As soon as I announce the book 4th ed. please ask me a I will send you
a diff so you can translate the diffs.
If you send me the translated book as makrmin files (one per chapter)
I can post it on web2py.com/book or you prefer I can simply link it.
On Sep 28, 2:03 pm, Omi Chiba
Before we get into this discussion. Why are you bypassing the normal
mechanism?
Massimo
On Sep 28, 5:51 pm, TheSweetlink yanosh...@gmail.com wrote:
SQLFORM.factory renames and uploads my file to uploads/ dir via
store() in dal.py great.
In form.accepts (will refactor code to use .process()
I've made this work. I still need a little bit of time to make it
backward compatible with non-salted passwords though.
First things first, I had to disable the CRYPT validator. Although it
makes handling passwords easier, encrypting them at the validator
level really limits a lot of account
Time to donate again.
Hi Massimo!
It is not my intention to bypass anything as I'd prefer you experts to
do the framework business. Rather, I wish to know what the best
course of action would be.
I cannot retrieve a file which was uploaded using SQLFORM.factory
My SQLFORM.factory renames and places my file on the
Maybe use server-side DOM
parsing: http://web2py.com/book/default/chapter/05#Server-side-DOM-and-Parsing
Something like:
form.element('option', _value='value')['_selected'] = 'selected'
or:
form.element('select').update(value='value') # adding the 'value' attribute
to SELECT causes that
Thanks to Carlos Galindo for the tip. He helped me earlier today.
I am not using web2py's auth to download the uploaded files, I just
reference them directly with URL('static', 'myfolder/' +
uploadfieldvalue) ... where uploadfieldvalue is the uploaded file name
stored in the field.
I believe
I was thinking about this... how about editing the validate function
in dal.py and allow it to pass the current record to the validators?
We cannot change the APIs but a validator is an object so we can just
pass the current record by attaching it as an attribute to the
validator object. CRYPT
I store my images in a different folder and serve them directly:
Field('image', 'upload', uploadfolder=request.folder+'static/uploads',
requires=IS_EMPTY_OR(IS_IMAGE())),
That may be an even better way to accomplish this task. I actually
considered using some sort of self-reference first, but didn't find it
there.
On Sep 28, 9:00 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
I was thinking about this... how about editing the validate function
in
=D I fix it
Now I'm using role no more description
tid = db.auth_group(role='Teacher').id
http://imageshack.us/f/28/screenshot1gvq.png/
But i dont know how select description any way or if the problem was
the read/write property of description
http://imageshack.us/f/51/screenshot2uy.png/
On
1 - 100 of 116 matches
Mail list logo