Hello Massimo and thanks for your reply.
The two components point to a different action but I just noticed that they
have the same formname. :)
Thank you very much. I'll change the formname of the second and I'll let
you know.
Have a good day,
David
On 1 December 2012 22:50, Massimo Di Pierro
Thank you...
On Sunday, December 2, 2012 7:45:50 AM UTC+3, Massimo Di Pierro wrote:
You are missing that you need to generate html br/ and {{=anything}}
always escape anything.
You want:
td class=span8{{=(row.body1)}}br/{{=(row.body2)}}/td
or
td
Hi all,
I'm rendering a menu with the following line of code:
nav
div id=menu-iconMenu/div
{{=MENU https://cgc.yedia.com/examples/global/vars/MENU(response
https://cgc.yedia.com/examples/global/vars/response.menu, _class='menu
responsive-menu', ul_class=None, li_class=None,
If #article_DTU_Content is a textarea
{{results.update_form.element('#article_DTU_Content')['_cols']=300}} should
work as well
as {{results.update_form.element('#article_DTU_Content')['_rows']=10}}
unless you set the element width somewhere.
In other words, for example (code from my
One or two high-profile projects would would go a long way towards this.
On Thursday, 29 November 2012 01:14:52 UTC, Daniele wrote:
I really believe web2py will indeed become the rails for python as
someone mentioned. Actually, I believe it's much better, easier to use and
comprehend, and
yes, it gives very little info:
In [3] : print mail.result
{}
In [4] : print mail.error
None
On Friday, November 30, 2012 1:42:16 PM UTC+2, Niphlod wrote:
did you try to see what errors you get back ?
rtn = mail.send('y...@example.com javascript:',
'Message
A combination of the two. Since I use bootstrap, I edited the html in the
view, but i also added some parameters to the custom form in the
controller, such as form['_class'] = form-horizontal
On Sunday, December 2, 2012 2:29:57 AM UTC, Julian Sanchez wrote:
Just curious... did you end up
OK I think that's probably the easiest solution for now.
How can I do this? Do I need to add
auth.add_group('role', 'description')
in my db.py file and then have a form that when a user submits, runs
auth.add_membership(group_id, user_id)
in the controller? Or do both of these go inside the
It works fine if I remove 'format='
db.t_project.f_parent_project.requires = IS_EMPTY_OR(IS_IN_DB(db,'
t_project.id',db.t_project._format))
--
Luc.
On Saturday, 1 December 2012 07:57:16 UTC, Luc Chase wrote:
db.define_table('t_project',
Alright I've created the two groups with the web2py appadmin interface. Now
I suppose the rest of the logic goes in the controller.
I have a SQLFORM right now but it probably makes more sense to just use a
FORM, right? And then when that is processed, I can run the command
Also, note that your solution will work specifically when using the
generic.json view because that view does not require any of the
response._vars values to be added to response._view_environment (because
the view processes response._vars directly). But that solution will cause
rendering of
Is there a way to realize the condition of the table that will be executed by
default? As in ActiveRecord (defaultScope).
E.g.: Need to get the record for a particular user on the number of his
contract.
In PHP I do that:
function defaultScope()
{
if (user-role == admin){
return ['order' =
You have to use jquery. I would take a MANU patch to deal with this case.
On Sunday, 2 December 2012 04:18:51 UTC-6, Calycé wrote:
Hi all,
I'm rendering a menu with the following line of code:
nav
div id=menu-iconMenu/div
{{=MENU
Another patch:
In login_cookieless(), after:
session.person_email=rows[0].email
insert this following line:
session._try_store_in_db(request, response) # save changes to the
session
On Sunday, November 25, 2012 7:41:00 AM UTC-6, dlypka wrote:
Sample controller code:
(This is not
On Friday, September 9, 2011 9:17:12 AM UTC-4, kachna wrote:
I made some investigation and here is results.
1) routes_onerror do not work with static files. It is cased by
lines 488 and 489 in gluon.main
if static_file:
return
You could use also css3 selector :last-child (ie9 and safari3.2 doesn't
support it)
For example, in your css file add:
.menu ul li:last-child /*in this way ul.menu direct li children are
bypassed*/
{/* apply your rules, for example: */
color: red;
background-color: yellow;
}
Il giorno
One GOTCHA I found with WING IDE is that you must delete all .pyc files
before running, in order to have it correctly
stop on your breakpoints in non-module code, in the case where such .py
source has been subsequently modified after the .pyc was created.
For code that is in a module, the
You can still use SQLFORM, and append additional fields. The code is here:
http://web2py.com/books/default/chapter/29/07#Adding-extra-form-elements-to-SQLFORM
You need to add code to ensure that the user is being added to the
particular groups under form.process().
form=SQLFORM(db.table)
Here is the client code in Javascript for a PhoneGap mobile app using all
the web2py mods and controller code I have previously posted.
Hopefully it is straight forward to convert to C++ or C# for a Windows
client app as well:
It uses the HTML 5 feature window.localStorage instead of cookies.
On Sunday, December 2, 2012 8:41:49 AM UTC-5, Anthony wrote:
Also, note that your solution will work specifically when using the
generic.json view because that view does not require any of the
response._vars values to be added to response._view_environment (because
the view processes
I am still working on this with the hopes of getting it to work on my
local dev machine before deploying to production, but after reading the
forums I am very unsure of the best practice to get a simple background
task that wakes up every 10 (or n minutes) does some stuff (in my case see
Hmm I'm still confused. Sorry guys.
So the way I'm displaying the two forms is through two tables in the database
that I've defined. Consequently, in the controller I have something like
form = SQLFORM(db.tutor)
Below that I will have something like if form.process().accepted:
If not
I hv large documents produced daily using word by 10 or more staff, how can
I the staff make these documents be maked-up using XML so that they r
searchable using python specifically web2py...my headache is how can the 10
staff with no idea of XML markup such a document like this one below:
doc
I opened issue 1200 and attached a possible (quick and dirty) patch.
http://code.google.com/p/web2py/issues/detail?id=1200
On Sunday, December 2, 2012 2:47:40 PM UTC+1, Massimo Di Pierro wrote:
You have to use jquery. I would take a MANU patch to deal with this case.
On Sunday, 2 December
Thanks for your tip
On Sunday, December 2, 2012 4:19:30 PM UTC+1, Paolo Caruccio wrote:
You could use also css3 selector :last-child (ie9 and safari3.2 doesn't
support it)
For example, in your css file add:
.menu ul li:last-child /*in this way ul.menu direct li children are
bypassed*/
if you want to create it programmatically, there is elementtree, dom,
minidom and sax in the standard library. I always seen (and used) lxml as
the best package to work with xml, both for parsing and creation. Web2py
and its templates can handle xml generation pretty well too.
How to create an
and the rtn ? it's strange that no errors are returned because that would
mean that the mail library didn't catch the error (i.e. no error messages
were returned by the mail server)
On Sunday, December 2, 2012 1:57:22 PM UTC+1, Aurelijus Useckas wrote:
yes, it gives very little info:
In [3]
add a default query in your dal expression ?
q = db.whatever.contract == contractid
then
db(yourquery)(q)
otherwise you can poke around with multi_tenancy
http://web2py.com/books/default/chapter/29/06#Common-fields-and-multi-tenancy
On Sunday, December 2, 2012 8:20:15 AM UTC+1, Andrey
it only returns True. I'm beginning to guess there's smthng wrong with some
firewalls ISP has placed
On Sunday, December 2, 2012 9:54:40 PM UTC+2, Niphlod wrote:
and the rtn ? it's strange that no errors are returned because that would
mean that the mail library didn't catch the error (i.e.
Hi.
when using the code below redirect and verification doesn't work:
def comment():
create comment form
post=db(db.blog.id==request.args(0)).select().first()
db.comments.post_id.default=post.id
form=crud.create(db.comments)
if form.process().accepted:
session.flash =
On Tuesday, April 5, 2011 1:08:54 PM UTC-4, VP wrote:
My question is: in your locking policy above, what's the purpose of
locking at all?
If you don't lock during writes (e.g. when updating the counter), two
writes might happen simultaneously and cause inconsistent results.
There are
let's inspect the code: if the exception has something to do with an error
related to sending the email, the value returned is always True.
That means that if (and that's not your case) there's something wrong with
body, sender, cc, etc, you would see an exception. Given instead that there
are
forehead so:
form=crud.create(db.comments)
post=db(db.blog.id==request.args(0)).select().first()
db.comments.post_id.default=post.id
return dict(post=post,form=form)
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
I have a bookmark that I wish to assign various tags to. I have a table of
tags, and a table of bookmarks, and I have a table of bookmark_tags.
I wish to click on a bookmark's tags link, and to see a list of tags with
checkboxes next to them. I also want the tags that are already assigned to
On Sunday, December 2, 2012 11:37:43 AM UTC-5, Chris wrote:
On Sunday, December 2, 2012 8:41:49 AM UTC-5, Anthony wrote:
Also, note that your solution will work specifically when using the
generic.json view because that view does not require any of the
response._vars values to be added to
Read through the CRUD section of the book again:
http://web2py.com/books/default/chapter/29/07#CRUD.
Crud automatically handles form processing, so you do not call
form.process() after calling crud.create() -- in that case, you are
processing the form twice. Instead, crud.create() handles the
I'm trying to have a couple of forms showing a list of checkboxes that
follow this structure:
div class=control-group
label class=control-labelCheckboxes/label
div class=controls
labeldiv class=checker id=uniform-undefinedspaninput
type=checkbox name=radios style=opacity:
Thanks, any pointers on documentation, cause I would like to create an
interface for my users, cause I feel that's the only way they would buy
into the idea.
On Sunday, December 2, 2012, Niphlod wrote:
if you want to create it programmatically, there is elementtree, dom,
minidom and sax in
Hello Web2py users :
I had so much trouble with previewing an image before upload or submit, I
have tested so many javascripts out there and various solutions that have
worked mostly with PHP projects,
I have tried so many scripts taken from all over the place, none of
them actually did
Thanks guys. I got it working with web2py_component. What an amazing
resource! This ajax stuff is actually getting approachable to javascript
novices like me.
The final user interface has tabs that select different forms, and on one
of the tabs an accordion that exposes multiple forms.
Ok Massimo, changing *formname* was the solution. Now everything works.
Thanks one more time for your help. ;)
I wish you a good Monday,
David
On 2 December 2012 09:00, David Sorrentino sorrentino...@gmail.com wrote:
Hello Massimo and thanks for your reply.
The two components point to a
Hi, I have this unusual behavior of my code below, the options are
being duplicated what could be the problem:
#print SELECT(CAT([OPTION(s.name, _value=s.id) for s in
db(db.file_subject).select()]))
select
option value=option value=1Information
Technology/optionoption
42 matches
Mail list logo