Hi
I have the following method:
def add_event():
form = SQLFORM.grid(db.timeline,
fields = ['tl_start'] )
return dict(form=form)
my view has {{= form }}
but I get the following error when trying to view the page:
type 'exceptions.AttributeError' 'str'
thanks Anthony - that worked.
Do you know why SQLFORM fields takes a string whilst SQLFORM.grid takes the
actual db.table.field?
cheers
Dave
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Hi
I have a SQLFORM which I embed in my web page using LOAD. If I successfully
save the data in the database I want to pass the saved data back as part
response.js. The idea is that a user enters data via the SQLFORM, it is s
saved to the db and the data returned to the client where I add it
Hi Massimo
I've spent some time thinking about my own suggestion and I now believe
that changing the delimiter in either Web2py or Angular is actually a
better idea than mine. I'm happy to either withdraw my proposal or submit
if you think it should be discussed further.
cheers
Dave
--
LightDot
The implementation I put together was only done last night and I have done
limited testing. I did it as I feel Web2py and Angular make a fantastic
combination and want to explore the two working together more.
I'm really keen to understand from Massimo and other Web2py guru's if my
Hi Massimo
I appreciate you can change either Web2py or Angular delimiters but the
small code change I have suggested allows you to have the best of both
worlds. If you change one of the delimiters it means you need to be careful
with anything that might rely on it.
Is there any reason why we
Hi Leonel
I think you are correct in that it might make it a little more difficult to
parse. My problem with having to change either of the delimiters for
Angular or Web2py is that I have to remember to change them for everything.
For example if I change the
web2py delimiters I then have
Hi All
I'm starting to look at Web2py and Angularjs. As many people have noted
they clash with the use of the delimiter {{ and }}. I know I can change
them in both Angular and Web2py but how difficult would it be to have a
verbatim tag (command) so that I could write.
{{= Verbatim}}
{{ some
Hi Leonel.
I know you can change the web2py delimters but that means views that uses
extends has to be modified. If you simply switch of the interpretation of
{{ for a block of html then you could mix and match angularjs and web2py.
cheers
Dave
--
Resources:
- http://web2py.com
-
Hi All (again).
I did some digging around with the web2py source code and came up with
this.
https://gist.github.com/shortly-portly/9538005
The usage is pretty straight forward. You can use normal Web2py tags {{ and
}}. When you want to drop down into Angular, surround your stuff with {{
Hi All
I've just come across this thread and wondered if the proposed change made
it into a version of Web2py?
cheers
Dave
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
Thanks both. It is great to see the improvements in Web2py.
cheers
Dave
--
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)
---
You received this message
Hi
I have a database table with a reference field. I'm passing the contents
back as JSON but the reference field gets passed as ref_id rather than the
format name. Is there anyway to pass back the format name rather than just
the id of the reference record.
many thanks
Dave
--
Resources:
-
Hi
I understand the concept of cache but I don't understand the statement
below. Would someone be willing to try and explain it to me in a different
way (in the vain hope that I might actually understand it :-))
Note, time_expire is used to compare the current time with the time the
Hi Niphlod
thank you for your clear explanation. Do you know why cache.ram behave this
way (as it is different to standard cache behaviour).
many thanks
Dave
--
Thanks Niphlod
--
Hi Jim
did as you said and that worked fine. Now all I need to do is work out why
my app is not showing the same behaviour. Having one that works will be a
big help.
many thanks for your help.
Dave
--
Hi Jim/Leonel
tried both of your suggestions but still no luck.
thanks
Dave
--
On Wednesday, October 24, 2012 3:37:17 PM UTC+1, Jim S wrote:
Are you logged in?
On Tuesday, October 23, 2012 12:32:32 PM UTC-5, David Simmons wrote:
Hi
I am following the image tutorial described in the online web2py book. I
have the following code:
@auth.requires_membership
Hi Jim
my model is:
db.define_table('image',
Field('title', unique=True),
Field('file', 'upload'),
format = '%(title)s')
db.define_table('comment',
Field('image_id', 'reference image'),
Field('author'),
Field('email'),
Field('body', 'text'))
I'm really hoping I'm
Hi
I am following the image tutorial described in the online web2py book. I
have the following code:
@auth.requires_membership('manager')
def manage():
grid = SQLFORM.smartgrid(db.image, linked_tables=['comment'])
return locals()
I have the following view:
{{extend 'layout.html'}}
Hi
I downloaded the latest trunk version of Web2py 2.0 from Github. I have
noticed that the keepvalues setting in SQLFORM defaults to True. This is
different from the setting in FORM and equally different from SQLFORM in
the 1.0 branch. Is this a deliberate change or a simple mistake?
Hi Me again :-)
Is this the wrong place to ask this question, if so I apologies and ask
that somebody please point me to the right place for this kind of thing.
Many thanks
Dave
On Thursday, June 14, 2012 8:08:10 AM UTC+1, David Simmons wrote:
Hi
I downloaded the latest trunk version
On Thursday, 14 June 2012 12:11:05 UTC-5, David Simmons wrote:
Hi Me again :-)
Is this the wrong place to ask this question, if so I apologies and ask
that somebody please point me to the right place for this kind of thing.
Many thanks
Dave
On Thursday, June 14, 2012 8:08:10 AM UTC+1, David
Hi All
I've downloaded Web2Py version 2.00.0 (2012-06-12) from Github today. I
created a simple database table and form using SQLFORM. I then display the
form using {{=form}}. I can enter data in the form, the form gets saved BUT
the redisplayed form does not clear the data: Here is my
25 matches
Mail list logo