Thank you both for your reply.
I chose to code my own validate_entropy function.
Kind regards,
Annet
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
thanks for your offer I'm working my way through the example code but my
biggest problem is that php site. I don't know php. But from what I get
from the php code is that all the sample cities need to be in an unordered
list environment ulli/li.../ul
but this form part of the bsmselect example
hey everyone,
so i have a main form/view that shows all but three of the fields from a
single table. and then i am designing another form/view to show the other
three. the other three are text fields so that the user can write
paragraphs, so showing those three on a full form makes sense.
it should have been. If you're still experiencing issues please post your
findings.
On Thursday, December 12, 2013 2:46:51 AM UTC+1, Vincent Audebert wrote:
Oh it has been fixed with 2.8.2? (that was the purpose of my first
question. Sorry if I was not clear)
On Thursday, August 1, 2013
Why do you want to use multiple databases?
Check out this discussion.
http://sqlite.1065341.n5.nabble.com/Foreign-key-on-different-database-possible-td58370.html
On Wednesday, December 11, 2013 11:58:02 PM UTC-5, Copper Lark wrote:
db =
Hi,
Is it possible to translate the strings inside requires=IS_IN_SET?
For example i have
requires=IS_IN_SET(('Allowed','Not allowed'))
Now i'd like to translate Allowed and Not allowed
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
yes,
requires=IS_IN_SET([('Allowed', T('Allowed')), ('Not allowed', T('Not
allowed'))])
Quinta-feira, 12 de Dezembro de 2013 12:23:51 UTC, Ruud Schroen escreveu:
Hi,
Is it possible to translate the strings inside requires=IS_IN_SET?
For example i have
requires=IS_IN_SET(('Allowed','Not
requires=IS_IN_SET([('Allowed', T('Allowed')), ('Not allowed', T('Not
allowed'))])
another way around to achieve it is
requires = IS_IN_SET({T('Allowed'), T('Not allowed') } )
p.s.
please ensure if you use translate version in the conditional logic (if),
please also put the translation on
Set the fields you don't want to be changed in each of the forms to
readable=False and writable=False before calling SQLFORM, then you won't
even need to use a custom form.
As for the data disappearing, I'm not entirely sure why, I'd have to see
your code more carefully.
Quinta-feira, 12 de
1. When the user perform a successful register process, i need to
perform an insert of that user in a new table. Not sure where i can embed
this process
please take a look at the book for record versioning
ref:
Stifan, I'm sorry but that seems like a terrible way to do it as you would
have different values in the database depending on the language of the
user, and, even worse, you could have different values for the same thing
for the same user if you start without a translation in his language and
yes, you are right, i'm understand right now, thanks for correct my mistake.
please also take a look at this discussion
ref:
https://groups.google.com/forum/#!topic/web2py/WbF7GlZ9uKc
thanks and best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Looks promising. I can test this next week. I will implement an email
reminder service and compare it with using own scheduler in Pythonanywhere.
Ykä
On Thursday, December 12, 2013 5:05:40 AM UTC+2, Massimo Di Pierro wrote:
Should be self-explanatory:
http://callme.experts4solutions.com/
I rigged the sqlhtml.py, so that I can rearrange the fields in the form as
well. The following worked for me, but not sure if it has any side effects:
In sqlhtml.py, after the line
create_form = update_form = view_form = search_form = None
insert
fieldnames = [f.name for f in fields]
and
- cacheable=True **strips** from the Row object any bells and whistles
to be able to cache it from an outside module (select(cache=True) does this
by default) AND to leverage some speedups in case delete_record(),
update_record() and automatic FK are not needed. It's ok, expected and
Would this work?
On Saturday, November 16, 2013 1:21:07 PM UTC+1, Paolo Caruccio wrote:
The IS_IN_SET validator allows to list the options as a dictionary (
http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=IS_IN_SET
)
Therefore, for an example, you could do:
def
Oh, wait, I see it is a keyed table with no auto-incrementing id field.
In that case (as stated in the book), the .update_record() method is not
available.
Actually, there is an integer Id field -- is it auto-incrementing? If so,
change its field type from integer to id, and remove the
The problem is that while you get the same fields in the same order this
may have the effect of overriding the field.readable and field.writable
attributes.
The fields argument of the grid can be a subset of the list of writable
fields in forms and it is intended to select a subset. Now you
This would work. Yet it will not preserve the order in the list of options.
To preserve the order replace
options = {'Apple':T('Apple'),'Banana':T('Banana'),'Cherry':T('Cherry')}
with
options = (('Apple',T('Apple')), ('Banana',T('Banana')), ('Cherry',T(
'Cherry')))
On Thursday, 12 December
Hi Guys,
I am trying to build a form. I have the drop down list working in the form,
but when I display the record, it displays the id instead of the selected
field.
db.define_table('training',
Field('type', type='string',
label=T('Training Held')),
auth.signature,
Hello Leonel,
*Thanks for your prompt reply*.
actually I am developing a search engine and I was in the process of
selecting DB for it. So I have shot-listed 2 DBs 1) Mongodb and 2) Cassandra.
After doing some RD on both the DBs
*I have decided to use cassandra.*
On Wednesday, December 11,
Hi,
I just filed a bug report for session.connect resulting in an internal
error with PostgreSQL as DB and the parameter migrate set to False (Issue
1814 http://code.google.com/p/web2py/issues/detail?id=1814, about
session.connect ignoring the migrate=False parameter).
To go further from the
I'd try changing your battle_log def to:
db.define_table('battle_log',
Field('battle_date', type='date',
label=T('Battles Date')),
Field('battles', type='integer',
label=T('Battles'),
requires=IS_IN_SET(['0', '1', '2', '3', '4', '5', '6', '7', '8',
'9',
I am not sure I fully understand but the problem is that
Field('training_id',
label=T('Training Status'),
requires=IS_IN_DB(db,db.training.id,'%(type)s')),
is meant to be a reference but it is not defined as such, replace it with
Field('training_id','reference
How about doing:
SQLFORM.grid(..., formargs=dict(fields=[f.name for f in fields]))
Anthony
On Thursday, December 12, 2013 9:04:21 AM UTC-5, P T wrote:
I rigged the sqlhtml.py, so that I can rearrange the fields in the form as
well. The following worked for me, but not sure if it has any
Don't bother with the php thing...
Just look the data structure of the select...
Here what I do to restore proper order on update form :
controller_view_js +=
var ordered_values = ''%s'';
$(document).ready(function() {
if(ordered_values != None) {
$.each(ordered_values, function(i,
It's a bit hacky but it works...
:)
Richard
On Thu, Dec 12, 2013 at 9:48 AM, Richard Vézina ml.richard.vez...@gmail.com
wrote:
Don't bother with the php thing...
Just look the data structure of the select...
Here what I do to restore proper order on update form :
controller_view_js +=
On 12 Dec 2013, at 2:34 AM, Niphlod niph...@gmail.com wrote:
it should have been. If you're still experiencing issues please post your
findings.
Do you recall what the issue was? I'm curious, because I have a 2.5.1 server at
the moment serving up application/json.
On Thursday, December
Works like a charm, thanks Massimo!
On Thu, Dec 12, 2013 at 3:25 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
This would work. Yet it will not preserve the order in the list of
options. To preserve the order replace
options =
Hi,
I have a model which contains a couple of upload fields, they all have
requires=IS_IMAGE
Right now when you browse for a file you can select any file you want, but
i'd like users to only be able to browse for image files (for example .png
and .jpeg)
I know that this doesn't really matter
I am trying to develop a one page ajax application using web2py. But the
problem i have is to manage the default redirection of annotated actions in
web2py. For instance:
@auth.requires_login()
def index():
...
return locals()
I have javascript in the main template that makes requests
On Thursday, December 12, 2013 3:59:20 PM UTC+1, Jonathan Lundell wrote:
On 12 Dec 2013, at 2:34 AM, Niphlod nip...@gmail.com javascript:
wrote:
it should have been. If you're still experiencing issues please post your
findings.
Do you recall what the issue was? I'm curious, because I
Thanks Niphold and Anthony taking away the id field inside the table
definition brought update_record back to life :)
Love the fast responses you guys give in this group. :D
On Wednesday, December 11, 2013 4:01:44 PM UTC-6, LaDarrius Stewart wrote:
db.define_table('Participant',
Anthony, Excellent!!! That works perfectly, no need to mess up with
sqlhtml.py.
Massimo, Thanks for insight.
PT
On Thursday, December 12, 2013 8:45:35 AM UTC-6, Anthony wrote:
How about doing:
SQLFORM.grid(..., formargs=dict(fields=[f.name for f in fields]))
Anthony
On Thursday,
This has been resolved. See the related post at
https://groups.google.com/forum/#!topic/web2py/5sz_w4S-czE
On Monday, December 9, 2013 11:54:27 AM UTC-6, P T wrote:
I am building the field list as given here
https://groups.google.com/forum/#!topic/web2py/5sz_w4S-czE
I have a controller that does an *import requests. *I get the message
Cannot import module 'requests' when trying to run it. I installed
Requests using pip install, and
/Library/Python/2.7/site-packages/ contains *requests-2.1.0-py2.7.egg*. I
can import requests from the Python2.7
I would save the extension in another field, which would be computed from
your file field, then you can use regular selects to find them.
A less efficient in terms of query speed (it does use less storage)
alternative is to use some of these operators
Some field definitions in my models have comments, which in a Bootstrap
form are
being displayed in a help-block.
The problem is that this help-block
span class=help-blockmy comment/span
is added to every form field, resulting in 20 px of extra padding between
form fields, margin-bottom: 10px
Thanks Massimo.
--
*This e-mail is confidential and may also be privileged. If you are not the
intended **recipient, please notify the sender immediately, delete it from
your system and do **not copy, disseminate, distribute or disclose any
information contained therein.*
--
Resources:
-
Hey guys,
*I have this in the db.py*
*db.define_table('t_usertypes',*
*Field('f_usertype',label='User Type :', required=True,
notnull=True),*
*format='%(f_usertype)s')*
*I have this in default.py*
*def usertypes():*
* form=SQLFORM(db.t_usertypes)*
* if
def usertypes():
grid = SQLFORM(db.t_usertypes, editable=)
return {'grid': grid}
div id=mydiv class=mydiv
{{=grid}}
For details, read about SQLFORM.grid at
http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM.grid
On Thursday, December 12, 2013 1:24:21 PM UTC-5,
Remove this line:
@auth.requires_login()
handle it in the template.
On Thursday, December 12, 2013 8:17:42 AM UTC-7, software.ted wrote:
I am trying to develop a one page ajax application using web2py. But the
problem i have is to manage the default redirection of annotated actions in
Can you please open a ticket about this so it does not get lost? We need to
port welcome to bootstrap 3 asap.
On Thursday, 12 December 2013 12:08:15 UTC-6, Annet wrote:
Some field definitions in my models have comments, which in a Bootstrap
form are
being displayed in a help-block.
The
@Niphlod yes it's exactly this.
@Jonathan I am on 2.5.1 too and it works fine on my MAC OS X machine but
once I go on a web2py running under apache, the header content_type is sent
and web2py catches only http_content_type
I will post my findings if it's not fixed in 2.8.2. I plan to migrate
Hello
With:
response.title=XML('h3Something/h3')
in the body, its display Something with h3 font, but in the browser tabs,
displays : h3Something/h3
Are there any way to display in the tabs only the text, not html?
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book
did you already try :
response.title = 'Something'
and if you want to have Header 3 for response title in body, please try :
{{=H3(response.title) }}
Best Regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
For a compelling (and humorous) argument of why NOT to use Regex to parse
XML/HTML, read this SO nugget:
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
Seriously, it's my favorite SO post ever. Enjoy!
On Wednesday, December 11, 2013 8:47:42 PM
*default.py*
for showing button
create = True
editable = True
deletable = True
for hide button
create = False
editable = False
deletable = False
def *usertypes*():
grid=SQLFORM.grid(*db.t_usertypes*, create = create, editable =
editable, deletable = deletable)
return locals()
LOL
On Thursday, 12 December 2013 17:08:44 UTC-6, AbrahamLinksys wrote:
For a compelling (and humorous) argument of why NOT to use Regex to parse
XML/HTML, read this SO nugget:
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
Seriously,
I have a word document that I output as a .'.mht; file ie, a 'single file
web page'.
I can put sections of this into a string field in a database and then
display the field through a view, and the formatting in the word document
is preserved.
here is a line from the file that I read into
On 12 Dec 2013, at 4:16 PM, peter peterchutchin...@gmail.com wrote:
I have a word document that I output as a .'.mht; file ie, a 'single file
web page'.
I can put sections of this into a string field in a database and then display
the field through a view, and the formatting in the word
On 12 Dec 2013, at 6:12 PM, Jonathan Lundell jlund...@pobox.com wrote:
On 12 Dec 2013, at 4:16 PM, peter peterchutchin...@gmail.com wrote:
I have a word document that I output as a .'.mht; file ie, a 'single file
web page'.
I can put sections of this into a string field in a database and
On 12 Dec 2013, at 2:13 PM, Vincent Audebert vinc...@showcaseworkshop.com
wrote:
@Niphlod yes it's exactly this.
@Jonathan I am on 2.5.1 too and it works fine on my MAC OS X machine but once
I go on a web2py running under apache, the header content_type is sent and
web2py catches only
53 matches
Mail list logo