it works but its not showing any text next to the check box , how can i
show some text next to the check box ?
I guessed it was something like that :-)
Thanks Massimo I am going to test it.
On 03/30/2012 10:51 AM, Massimo Di Pierro wrote:
You have to pass it
SQLFORM.grid(...,field_id=db.lvdisksetup.id,)
else it does not know what table to use.
On Thursday, 29 March 2012 19:58:52 UTC-5, Gwayne ak
After testing
form = SQLFORM.grid(query,
fields=fields,
field_id=db.lvdisksetup.id,
<---
orderby=['lvdisksetup.lunid'],
csv=False,
create = True,
maxtextlength=45
)
It worked like a ch
Il 29/03/2012 19:14, rdodev ha scritto:
All,
Is it possible to have the DAL create/discover models from an existing
DB (without providing the schema)? If so, how would I go about making
sure the models are created? Thanks in advance.
Hi,
I'm involved in the same problem and I'm developing a
Many thanks Jonathan. That did the trick.
Thank you to everyone who helped out
S
On Friday, March 30, 2012 3:01:58 AM UTC+1, Anthony wrote:
>
> Thanks for the correction. I guess my version allows you to eliminate the
> app, controller, and function, but doesn't allow anything else in the u
How are you inserting the form into your view? If you're using SQLFORM you
can supply labels to your fields (in your case the 'agree' field) using
something like:
form = SQLFORM(db.auth_user, fields = ['agree'], labels = {'agree':'Do you
agree to the Terms and Conditions?'})
Obviously you will
Hey List,
I am developing a database application with web2py as the server back-end,
and a client application in qooxdoo, which interacts with the server
through JSON-RPC.
I use Mercurial as my VCS and synchronize the code from qooxdoo, the code
from the controller and the code of the model (I
thanks, this is better, even though the quality of the rectangular logo is
still a bit crappy, a svg version would be much better (for all the logos)
On Thursday, March 29, 2012 5:51:44 PM UTC+2, Anthony wrote:
>
> On Thursday, March 29, 2012 10:56:47 AM UTC-4, selecta wrote:
>>
>> thanks i thoug
I have a grouping function based on what items are selected in a
multi-select widget. When the user presses a button, an ajax call is made
to a callback that evaluates the items that have been selected. The
evaluated item "list" is stored in request.vars.mylist.
Here's the problem. The "list" o
Just add a label argument to Massimo's answer:
auth.settings.custom_fields['auth_user'].append(Field('agree','boolean',label='Abandon
hope all ye who enter',requires=IS_NOT_EMPTY(error_message='you must agree
this')))
On Friday, March 30, 2012 3:19:14 PM UTC+8, Hassan Alnatour wrote:
>
> it w
custom_fields or extra_fields???
http://zerp.ly/rochacbruno
Em 30/03/2012 07:52, "weheh" escreveu:
> Just add a label argument to Massimo's answer:
>
> auth.settings.custom_fields['**auth_user'].append(Field('**agree','boolean',label='Abandon
> hope all ye who enter',requires=IS_**NOT_EMPTY(erro
We released a new book this month which you maybe aware of: *Web2py
Application Development Cookbook*. The authors for this book are core
developers of Web2py. We are offering free copies/e-copies of the book to
people (esp. bloggers) interested in writing a review/feedback for the book
on thei
Marco et all,
I've been monitoring the google group a bit bit now and it appears that
several people have found bugs in the example code in the pdf that was
recently released.
For those of us who bought the release of the 4th edition pdf, will there
be a cumulative corrected version available ?
On Monday, 26 March 2012 22:05:14 UTC+1, Timmie wrote:
>
> Am 20.03.2012 01:24, schrieb DenesL:
> > Spatial / GIS support (in latest trunk)
> > =
> > Sponsored by AidIQ for use by Sahana Eden
> Very cool. Great news.
>
> Has the Sahana Eden team also implemented a solution to th
There may be javascript issues:
> onchange="ajax('admin_assign',['org_name'],'shadow_clone');"
Wouldn't the 'shadow_clone' be specified as '#shadow_clone'? (as it is an
element selected by id)
> onchange="jQuery(maker_name).remove(); ...
Does the maker_name js variable exist? if maker_name is
Thanks Alan
On Fri, Mar 30, 2012 at 6:11 PM, Alan Etkin wrote:
> There may be javascript issues:
>
>
> > onchange="ajax('admin_assign',['org_name'],'shadow_clone');"
>
> Wouldn't the 'shadow_clone' be specified as '#shadow_clone'? (as it is an
> element selected by id)
>
> > onchange="jQuery(mak
Can I see the object that you are storing in session?
On Friday, 30 March 2012 01:09:09 UTC-5, Web2py Newbie wrote:
>
> session doesn't seem to have a "force an update to me" method, so I am
> just incrementing a counter.
>
sorry extra_fields.
On Friday, 30 March 2012 06:45:18 UTC-5, rochacbruno wrote:
>
> custom_fields or extra_fields???
>
> http://zerp.ly/rochacbruno
> Em 30/03/2012 07:52, "weheh" escreveu:
>
>> Just add a label argument to Massimo's answer:
>>
>> auth.settings.custom_fields['**auth_user'].append(
>
> > onchange="ajax('admin_assign',['org_name'],'shadow_clone');"
>
> Wouldn't the 'shadow_clone' be specified as '#shadow_clone'? (as it is an
> element selected by id)
>
No, the third argument of ajax() is just the id of the target element --
the ajax() function itself prepends the "#" to se
On Mar 30, 2012, at 1:58 AM, Simon Bushell wrote:
> Many thanks Jonathan. That did the trick.
Glad to hear it. Now that you've tested it, some color commentary for router
users.
> routers = dict(
> BASE = dict(
> default_application = 'shortener',
> ),
BASE might better be name
I am trying to make use of the cool 'new' (to me) grow_input which is the
default widget for a list:integer
I want to validate against an IS_IN_SET(), so looking at the code, I see
that this requires using IS_LIST_OF() (other validators get ignored)
I see this as the suggested way to use it:
ht
I don't agree that multiprocessing is difficult in Python. Threading is
difficult, multiprocessing is easy. Together with asynchronous I/O this
brings the scalability. You think node.js is multithreading? No, it's
single thread with event loop and non-blocking callbacks based I/O. And so
is Twi
On Friday, March 30, 2012 2:22:42 AM UTC-4, thstart wrote:
>
> Thank you, could you please post an example?
>
Perhaps someone else has a full working example. You just need a form on
the page that gets posted via Ajax (see
http://web2py.com/books/default/chapter/29/11#The-ajax-function), and the
>
> How do we check the number of users in the new google groups?
> Everything is so complicated compared to the old google groups. :-(
>
>
> Showing 50 of 3709 members
>
> https://groups.google.com/forum/?fromgroups#!members/web2py
>
Via the "Members" button in the upper right, which is only vis
Thanks Anthony and Jonathan.
On Friday, 30 March 2012 09:17:39 UTC-5, Anthony wrote:
>
> How do we check the number of users in the new google groups?
>> Everything is so complicated compared to the old google groups. :-(
>>
>>
>> Showing 50 of 3709 members
>>
>> https://groups.google.com/forum/?f
IS_LIST_OF takes a "minimum" argument, which defaults to 0, so it should
still validate if no items are submitted (it also takes a "maximum"
argument). If that's what you're looking for, you shouldn't need
IS_EMPTY_OR at all (note, IS_NULL_OR has been deprecated).
As for errors, when a validati
On Friday, 30 March 2012 15:43:15 UTC+1, Anthony wrote:
>
> IS_LIST_OF takes a "minimum" argument, which defaults to 0, so it should
> still validate if no items are submitted (it also takes a "maximum"
> argument). If that's what you're looking for, you shouldn't need
> IS_EMPTY_OR at all
Gre
On Friday, 30 March 2012 16:31:42 UTC+1, Fran wrote:
>
> On Friday, 30 March 2012 15:43:15 UTC+1, Anthony wrote:
>>
>> IS_LIST_OF takes a "minimum" argument, which defaults to 0, so it should
>> still validate if no items are submitted (it also takes a "maximum"
>> argument). If that's what you'r
On Friday, 30 March 2012 16:34:43 UTC+1, Fran wrote:
>
> I see it did default to 0, but the form doesn't get saved...just as I
> originally said...
>
The error comes from the e in (v, e) = self.other(item)
i.e. "value not allowed" from the IS_IN_SET()
I tried adding "" to the set, but obviously
Maybe we should take this down: http://www.web2py.com/php. The Python
"cognoscenti" are having a hissy fit about it on Twitter:
https://twitter.com/#!/mitsuhiko/status/185448802524729344
https://twitter.com/#!/AaronVanderlip/statuses/185453068572299264
https://twitter.com/#!/crgwbr/statuses/18544
On Friday, March 30, 2012 11:39:01 AM UTC-4, Fran wrote:
>
> On Friday, 30 March 2012 16:34:43 UTC+1, Fran wrote:
>>
>> I see it did default to 0, but the form doesn't get saved...just as I
>> originally said...
>>
>
> The error comes from the e in (v, e) = self.other(item)
> i.e. "value not allow
Yours is more elaborate! I am doing a hybrid on the smarttable one
(www.datatables.net). Nothing fancy, just adding an additional button for
the actions rather than links. This way I get the live-search plus the add
button I want.
Thanks
d
On Thursday, 29 March 2012 15:18:07 UTC-7, Dere
On Friday, 30 March 2012 17:01:43 UTC+1, Anthony wrote:
>
> I see it did default to 0, but the form doesn't get saved...just as I
>>> originally said...
>>>
>> The error comes from the e in (v, e) = self.other(item)
>> i.e. "value not allowed" from the IS_IN_SET()
>> I tried adding "" to the set,
On Friday, 30 March 2012 17:42:45 UTC+1, Fran wrote:
>
> On Friday, 30 March 2012 17:01:43 UTC+1, Anthony wrote:
>>
>> I see it did default to 0, but the form doesn't get saved...just as I
originally said...
>>> The error comes from the e in (v, e) = self.other(item)
>>> i.e. "value not
No.
On Thursday, March 29, 2012 5:54:59 PM UTC-7, Francisco Gama wrote:
>
> Let me put it this way:
> Can I determine the hash of an uploaded file during the upload process
> (when the form is submitted) and before it is actually stored on the
> filesystem?
>
> I believe that all my questions co
Your correct your solution Anthony works.
Massimo, I am not sure I understand what db.auth_user.username.
requires.insert(0, MyStrangeRequirement()) is doing?
On Thu, Mar 29, 2012 at 7:28 PM, Anthony wrote:
> If i am correct this will not work because it should be:
>>
>> 1. check last characte
>
> Let me put it this way:
> Can I determine the hash of an uploaded file during the upload process
> (when the form is submitted) and before it is actually stored on the
> filesystem?
>
I haven't been following this thread, but that sounds doable. When the file
is uploaded, request.vars.file
auth.settings.extra_fields['auth_user']= [
Field('Country',default="None"),
Field('City',default="None"),
Field('gender',requires=IS_IN_SET(genders,zero=None)),
# Trying to Show a massage new to the checkbox using this Field ..
Field('agree','boolean',requires=IS_NOT_EMPTY(error_message='
Anthony,
Where should I run this scrip from? Does it matter?
On Thu, Mar 29, 2012 at 1:18 PM, Anthony wrote:
> Check out this
> script: http://code.google.com/p/web2py/source/browse/scripts/extract_pgsql_models.py.
> You may need to adapt it slightly for your particular database.
>
> Anthony
>
I have the following two tables:
db.define_table('table_one',
Field('first', db.first, '%(name)s'),
Field('second', db.second, '%(name)s'),
Field('third', db.third, '%(name)s'),
format = '%(first)s - %(second)s Against %(third)s')
db.define_table('table_two',
Field('fourth', d
db.auth_user.username.requires.insert(0, MyStrangeRequirement())
is the same of
db.auth_user.username.requires = [MyStrangeRequirement(), IS_NOT_EMPTY(),
IS_NOT_IN_DB(..)]
MyStrangeRequirement() is your custom validator.
db.table.field.requires is a list of validators, so you can use "insert"
>
> Your correct your solution Anthony works.
>
> Massimo, I am not sure I understand what db.auth_user.username.
> requires.insert(0, MyStrangeRequirement()) is doing?
>
Massimo's solution does the same thing but by creating a custom validator
and adding the validator to the "requires" attribut
>
> Where should I run this scrip from? Does it matter?
>
Just from the command line. I don't think it requires web2py at all. It's
just using the db driver to inspect the db and generate the appropriate
web2py code.
Anthony
Cool. Thanks for the confirm. It's bombing for me right now, but it's
very likely due to the changes I made so that it would skip most types
since it's mongoDB.
On Fri, Mar 30, 2012 at 4:00 PM, Anthony wrote:
>> Where should I run this scrip from? Does it matter?
>
> Just from the command line. I
Yes I agree with this situation it is only on the login. Every other part
of the site uses the real username. Thanks for the explanation of Massimo's
example Bruno and Anthony.
On Fri, Mar 30, 2012 at 12:56 PM, Anthony wrote:
> Your correct your solution Anthony works.
>>
>> Massimo, I am not su
Just curious as to why you chose list:reference.
I'd just do it like this:
Field('table_ones', db.table_one ),
On Friday, March 30, 2012 12:38:23 PM UTC-7, pjryan126 wrote:
>
> I have the following two tables:
>
> db.define_table('table_one',
> Field('first', db.first, '%(name)s'),
> Fiel
Derek:
Thanks for your response. It's a many-to-many relationship between
table_one and table_two. i was hoping to denormalize this relationship with
list:reference, but maybe it's more trouble than it's worth in this case.
On Friday, March 30, 2012 3:38:23 PM UTC-4, pjryan126 wrote:
>
> I hav
Hello,
I need to configure my data source for different instances. Currently this
is the last problem preventing me from going productive. I run my
application for multiple customer instances and of course the database
connection is different for each customer. This issue also occurs if you
ha
Sure. Will Do.
Matt
On Wednesday, 28 March 2012 04:10:31 UTC+13, Anthony wrote:
>
> Can you submit an issue about this:
> http://code.google.com/p/web2py/issues/list
>
> Anthony
>
> On Tuesday, March 27, 2012 5:41:55 AM UTC-4, Matt wrote:
>>
>> I've managed to figure out a solution. (Not sure if
I agree: if you need to use multicores, multiprocessing is simpler,
faster and safer than threading.
NaCl is becoming more and more interesting.
https://developers.google.com/native-client/
It is going to LLVM so maybe in a not too far future web2py will enjoy
pushing some pypy generated vm on th
Dear ALL,
I have a website it has two languages so i have a controller for
every language , i want to change the labels for the fields in the login
and registration form , how can i do that ?
Why do you have a controller for every language? Have you looked into the
web2py translation
system:
http://web2py.com/books/default/chapter/29/4#T-and-Internationalization?
All fields can have a "label" attribute, which can be translated using the
T() translator. Note, all the Auth field labe
Check it again.
On Friday, 30 March 2012 10:48:21 UTC-5, Anthony wrote:
>
> Maybe we should take this down: http://www.web2py.com/php. The Python
> "cognoscenti" are having a hissy fit about it on Twitter:
>
> https://twitter.com/#!/mitsuhiko/status/185448802524729344
> https://twitter.com/#!/Aar
Hi,
I am curious why the validators don't use translations engine? For example
IS_STRONG English is great however I can't translate it without overriding
the error message. What is the reason for not wrapping the strings in a T()
so users of the validations can easily just update the translation f
yes and no. The file is not loaded in memory and then written to file. It
is uploaded into temp (request.vars.field.file points to the temp file)
then shuil.copyfile from temp to the destination. You can compute the hash
from request.vars.field.file then request.vars.field.file.seek(0)
On Frida
I think they do but now that I look into it, IS_STRONG does not. Please
open a ticket and we'll fix it.
On Friday, 30 March 2012 17:40:53 UTC-5, Detectedstealth wrote:
>
> Hi,
>
> I am curious why the validators don't use translations engine? For example
> IS_STRONG English is great however I ca
Massimo, I have looked at the file none of them have it.
IE:
IS_URL error_message='enter a valid URL'
IS_HTTP_URL error_message='enter a valid URL'
On Fri, Mar 30, 2012 at 4:13 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> I think they do but now that I look into it, IS_STRONG doe
Ticket: http://code.google.com/p/web2py/issues/detail?id=747
On Fri, Mar 30, 2012 at 4:17 PM, Bruce Wade wrote:
> Massimo, I have looked at the file none of them have it.
>
> IE:
> IS_URL error_message='enter a valid URL'
> IS_HTTP_URL error_message='enter a valid URL'
>
>
> On Fri, Mar 30, 2012
Nice. :-)
On Friday, March 30, 2012 6:39:21 PM UTC-4, Massimo Di Pierro wrote:
>
> Check it again.
>
> On Friday, 30 March 2012 10:48:21 UTC-5, Anthony wrote:
>>
>> Maybe we should take this down: http://www.web2py.com/php. The Python
>> "cognoscenti" are having a hissy fit about it on Twitter:
>
>
> Massimo, I have looked at the file none of them have it.
>
> IE:
> IS_URL error_message='enter a valid URL'
> IS_HTTP_URL error_message='enter a valid URL'
>
The error messages are not translated when specified as an argument to
__init__, they are translated when they are actually returned
Love it hehe
The database connection is initialized in models/db.py (assuming you used
the wizard to generate your application). Look for the line that says
"db=DAL(...)", and make it select the right database according to your
request, e.g. request.host, or however else you determine the configuration
envi
I see what you mean. In that case, you don't want to reference the other
table, since you don't have a many to many table.
For many to many relationships, you should have three tables.
table_one
table_two
table_relationship_between_one_and_two
But if you just want a list of the strings like so:
I was intrigued by this discussion:
http://news.ycombinator.com/item?id=3778158 about CSRF.
Do I understand correctly that the FORM / SQLFORM CSRF protection only
works when you pass a session (which is by default None)?
If so, I think it is important to update the book to caution everyone to
I'd say the most efficient is:
if type(mylist).__name__='string':
else
etc etc..
On Friday, March 30, 2012 3:36:01 AM UTC-7, weheh wrote:
>
> I have a grouping function based on what items are selected in a
> multi-select widget. When the user presses a button, an ajax call is made
> to a callb
Note, the book now recommends using .validate() or .process(), and they
default to using the session (and therefore protecting against CSRF). I
believe CSRF protection is on by default in Crud, Auth, and SQLFORM.grid as
well. I agree, though, that the book should discuss CSRF in the context of
Here's a simplified version:
class debugDM(object):
def __init__(self):
self.allDefs=[]
def add_def(self, rawText):
if rawText not in self.allDefs:
self.allDefs.append(rawText)
Here are some controllers:
def debug2():
print "counter: %s, counter2:
I meant "a simplified version which acts the same way"
Awe so that also answers my question from a past post on how to use
translate in a custom module, that is out side the application directory.
On Fri, Mar 30, 2012 at 4:57 PM, Anthony wrote:
> Massimo, I have looked at the file none of them have it.
>>
>> IE:
>> IS_URL error_message='enter a vali
If you deleted a .table file, fake_migrate will recreate it for you.
On Tuesday, March 27, 2012 6:34:58 PM UTC-7, web-dev-m wrote:
>
> Just continues trying to connect to any application. The application is
> still under development. After your suggestion, I dumped my db and deleted
> everythi
hello guys,
please am a newbie on ubuntu environment but been using python for a month
now. I am using the InstantPress to make a blog on the web2py framework.
Now, am reading the deployment recipe on the official web2py documentation
but it males no sense to me yet. i get confused at this point
ok, I think now I understand how the request_tenant works. So there would
be just one database for everything but every table is filtered by the
field? If that is the case that's really not what I want.
I also thought about selecting the db by the request.env.http_host etc.
this also seems like
Am I missing something ? Looks alright to me.
On Saturday, March 31, 2012 1:57:55 PM UTC+13, Ron McOuat wrote:
>
> Love it hehe
>
73 matches
Mail list logo