ssary */ @media (max-width: 767px) {
> #footer { margin-left: -20px; margin-right: -20px;
> padding-left: 20px; padding-right: 20px;} }
>
>
>
> On Friday, November 23, 2012 12:04:31 AM UTC+1, jonas wrote:
>>
>>
ht: -20px;
> padding-left: 20px; padding-right: 20px;} }
>
>
>
> On Friday, November 23, 2012 12:04:31 AM UTC+1, jonas wrote:
>>
>> Hi. I tried the link and more or less copied the code but the sticky
>>
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
ocessing
> itself. If you want it to redirect, do:
>
> crud.settings.create_next = URL('index')
>
>
> as indicated in the book.
>
> Anthony
>
> On Sunday, December 2, 2012 4:15:51 PM UTC-5, jonas wrote:
>>
>> Hi.
>>
>> when using the co
hi
this is probably a trivial problem but I post it anyway:
I have an image model:
db.define_table('blog',
Field('date','datetime',default=request.now),
Field('image','upload'),
Field('imageTitle','text',default="image text"),
Field('title','text'),
Field('text','text'))
# f
hi
I have a controller that basically inserts a number in a database. I don't
want it to render any view. For now I just redirect back to index.html, but
is there any other way to do it, i.e to have a controller that not renders
any views?
controller:
def plus_minus():
""" add or subtr
Hi
I still have some problems with callbacks. I have a like button that is in
my index.html view that add 1 to a database, then displays it:
I want to call the plus function as a callback to avoid render another
view, i.e I want to render the result in the index view, but I don't know
how t
urday, December 8, 2012 5:00:41 PM UTC+1, jonas wrote:
>>
>> Thanks, that solved the callback problem. now I just have to figure
>> how to update part of the index.html view.
>>
>> On Sat, Dec 8, 2012 at 4:25 PM, Niphlod wrote:
>> > use the power, Luke!
7;default', 'comment.load', args=result.id, ajax=True)}}
>
> On Saturday, 8 December 2012 16:26:02 UTC-6, jonas wrote:
>>
>> LOAD looks interesting. trying to LOAD comment form but gets error
>> (non-keyword
>> arg after keyword arg) when using the followi
aceback (most recent call last):
File "/Users/jonas/Dropbox/web2py/gluon/main.py", line 538, in wsgibase
serve_controller(request, response, session)
File "/Users/jonas/Dropbox/web2py/gluon/main.py", line 225, in
serve_controller
run_view_in(response._view_envi
same recursive error. is there
something wrong with the path?
On Monday, December 10, 2012 12:21:45 PM UTC+1, jonas wrote:
>
> HI
>
> I have two views that I want to have in the same layout file. One is for
> the sidebar and the other one is for the main column.
>
&g
ok, that solved the problem. Thanks
On Monday, December 10, 2012 4:46:12 PM UTC+1, Anthony wrote:
>
>
>
> and in layout.html:
>>
>>
>> {{if left_sidebar_enabled:}}
>>
>>
>>
>>
>>
>> {{include 'sidebar.html'}}
>>
>
> In layout.html you include sidebar.html, but then
Hi
I have a link that redirects to a comment page:
{{=A(TAG.i(_class="icon-pencil"), _rel="tooltip", _title="give a comment",
_class="btn", _href=URL('comment',args=result.id))}
But I want to use LOAD instead of filling a form in a separate page:
{{=LOAD('default','comment.load',args=result.i
Hi
I have a custom comment form:
def comment():
""" create comment form. Every comment is id locked to the specific
post """
#crud.settings.create_next = URL('index')
post=db(db.blog.id==request.args(0)).select().first()
db.comments.post_id.default=post.id
form=crud.create(
Hi.
I have a default form that is passed in view: {{=form}}
using this validation and insertion works. but when I use a custom form
none of that works. why?
Also form.process().accepted works only when using default form.
My second question is: when submitting the form I redirect to index, and
this is probably simple but I post it anyway
I have a layout that includes sidebar.html:
{{block left_sidebar}}
{{include 'default/sidebar.html'}}
{{end}}
and sidebar.html:
{{left_sidebar_enable=True}}
me (from sidebar.html):
{{for pre in about:}}
{{for
- but the other views do not call their own controller functions.
>
> Anthony
>
> On Saturday, December 22, 2012 3:11:38 PM UTC-5, jonas wrote:
>>
>> this is probably simple but I post it anyway
>>
>> I have a layout that includes sidebar.html:
>>
ok. thanks, that clarified the a few things.
On Saturday, December 22, 2012 10:48:35 PM UTC, Anthony wrote:
>
> On Saturday, December 22, 2012 5:00:52 PM UTC-5, jonas wrote:
>
>> Ok, I have a {{include}} statement in the beginning of the layout.html
>> file that ca
act: {{=pre.contact}}
{{pass}}
but it would have been better to return the ab dict from the sidebar.py
controller instead.
On Saturday, December 22, 2012 11:24:11 PM UTC, jonas wrote:
>
> ok. thanks, that clarified the a few things.
>
> On Saturday, December 22, 2012 10:48:35 PM UTC
Hi. Is there any way to generate xml svg via controllers? svg can be made
by using declarative syntax, i.e xml instead of javascript. is it possible
to return an string containing svg xml and render it in index.html? for
example, a very simple function, index.py:
def index():
a=""
r
> def index():
> return dict(a="")
>
> Then in the view, to prevent the XML string from being escaped, you have
> to wrap it in the XML() helper:
>
> {{=XML(a)}}
>
> You might also take a look at the generic.xml view for help serializing
> data into XML.
>
Hi
when using the following functions in index.html only the last one works:
{{extend 'layout.html'}}
index.html
Hello 2World 2
jQuery('.one').click(function(){
jQuery('.two').slideToggle()
});
Hello 3
World 3
but when using the first function in layout.html it suddenly works. why is
no
solved the problem, missing closing statement, although I think that
was included in the real code
On Saturday, January 5, 2013 3:23:00 PM UTC+1, jonas wrote:
>
> Hi
>
> when using the following functions in index.html only the last one works:
>
> {{extend 'layout
Hi.
Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html?
I tried to use it in web2py but with no success.
the necessary lib was imported:
but is seems that the svg function is not present :
svg should be here
$('.test').svg();
var svg=$('.test').svg('get');
svg.cir
Hi
How do you put links to other sites in a text that is stored in a database?
for example, I have a blogg where all coments, posts etc are stored in a
database. Everytime I add a post I do it from the admin interface by adding
new entries in the database. But adding a link in the text is not w
hi
I have developed javascript functions in /static/js/custom/charts.js
they are loaded in layout.html:
I call them in index.html by:
myfunction();
I know that ajax and jQuery can be used to call python functions in
default.py and my question is, is it possible to use ajax or jQuery to
Hi
I have a controller that is supposed to return a list to a js function (for
testing purposes):
def test():
print "called2"
data=[3, 6, 2, 7, 5, 2, 0, 3, 8, 9, 2, 5, 9, 3, 6, 3, 6, 2, 7, 5, 2, 1,
3, 8, 9, 2, 5, 9, 2, 7]
return 'var data=%s;' % data
I am calling this with an
Mengu,
I agree to all the mentioned pros for web2py.
Would you like to elaborate on your first item -scalable?
Which features in web2y fo you refer to that facilitates scalability?
cheers
/ jonas
On May 7, 12:13 am, Mengu wrote:
> 1) scalable
> 2) fast
> 3) easy
point at?
Could the 'Ajax Recipes' be updated in the book? (I can help if that's
needed, as soon as I understand the concept enough)
cheers
/ jonas
On Jul 13, 7:06 pm, mdipierro wrote:
> BTW since 1.80.1 welcome include a generic.load
> what is it?
>
> Say you have
Hi
In sqlhtml.py, SQLFORM:
the comment field's class is w3p_fc.
Should't this be w2p_fc to be consistent with w2p_fl and w2p_fw?
cheers
/ jonas
find "Consider the following names
global: (comma separated)"
There you can add service,auth,T,response,session,request,db or
whatever.
Doing this seems easier then writing "global request", ... at the top
of all of your controller files.
cheers
/ jonas rundberg
--
Subs
Hi Sverre,
I have the exact same issue. (Running web2py 1.87.3)
Did you manage to get to work?
/ jonas
On Nov 4, 11:10 am, Sverre wrote:
> My cron tab looking like this
>
> #crontab
> */2 * * * * root *sys/test_cron
> @hourly root *applications/mm/cron/exp
hi
When doing results=crud.select(db.hem,query) I got a list containing the
result with html tags in the beginning and the end. But I am not able to
access different fields like result.info and so on. When I am using
results=db(query).select() I can do results.info. Is there any way to get
in
Hi. I tried the link and more or less copied the code but the sticky footer
don't work. especially the push seems not to work. here is my code:
page header
span4
span8
span10
span2
sticky footer?
On Thursday, November
now it works, had to put everything in the right order:
crud.settings.create_next = URL('index')
post=db(db.blog.id==request.args(0)).select().first()
db.comments.post_id.default=post.id
form=crud.create(db.comments)
Thanks again
On Wed, Dec 5, 2012 at 12:55 PM, jo
ault', 'download',
> args=row.something) as a "downloader" of an 'upload' record.
>
>
> On Wednesday, December 5, 2012 6:41:58 PM UTC+1, jonas wrote:
>>
>> hi
>>
>> this is probably a trivial problem but I post it anyway:
>&g
Thanks.
Actually the call comes from a button:
It has to provide the right result.id so the like addition relates to
the right post.
I will try using callbacks from the button call to see if it works.
On Thu, Dec 6, 2012 at 11:17 PM, Niphlod wrote:
> Learned something also today! Nice one Anth
tle="you like this",
> _class="btn", _href=URL("plus",args=result.id))
> and you can turn it into a callback using
> A(TAG.i(_class="icon-thumbs-up"), _rel="tooltip", _title="you like this",
> _class="btn", callback=
thanks
I use the following solution;
{{for result in res:}}
{{=result.id}}
{{=result.title}}
{{=A(TAG.i(_class="icon-plus-sign"), _rel="tooltip", _title="testing",
_class="btn", _href='#', _onclick="jQuery('#uc').toggle();")}}
{{=LOAD('default','comment.load',args=result.id,ajax=True)}}
with
ok. another thing is that if I use a regular form, {{=form}}, then
validation works but not if I use the custom form. Also form.process()
works, so the problem seems to be related to custom forms.
On Sat, Dec 15, 2012 at 4:06 AM, Anthony wrote:
>> form=crud.create(db.comments)
>> if form.
base but I want to avoid that in this case, so another form
of redirect would be better.
On Sun, Dec 16, 2012 at 3:35 PM, Massimo Di Pierro
wrote:
> Hello Jonas,
>
> Can you show us your custom form, the one that does not work. Validation and
> form processing are done before the vie
I send the app to your gmail address.
On Sun, Dec 16, 2012 at 4:35 PM, Massimo Di Pierro
wrote:
> This should work. I do not see why it does not work. Can you email me,
> perhaps privately, an example app so I can reproduce it?
>
>
> On Sunday, 16 December 2012 09:26:54 UTC
ok, to include everything in the for loop is more elegant. The reason
why I wanted to separate the call to sidebar.py is that the sidebar
contains almost static material that doesn't change that much, while
the main page (index page) has content that changes more. In the first
version I had the db
svgBasics.html
>>
>> See the drawInitial function.
>> You need to load it, put it into a document.ready function or something.
>>
>>
>> On Sunday, January 6, 2013 2:14:13 PM UTC, jonas wrote:
>>>
>>> Hi.
>>>
>>> Has anyone here
Hi
Using left or right sidebars in layout.html doesn't render the page as
intended. (Using both sidebars seems ok).
layout.html sets the width of #content to 740px, but it should be
720px to handle the padding in #page.
I've tried it on OSX, Chrome+FF5
cheers
/ jonas
cal_import
local_import has the reload=True feature. How does this work now?
1.96.4 - better support for "id" fields not called "id"
Are we now able to define any existing integer fields as id? How would
I use this?
br
/ jonas
I tried ckeditor and I've got an editor in admin so I can insert links, so
far so good.
but the text is still rendered plain with html tags visible.
my function and db in db.py: (text field is the field I want to insert
links into)
def advanced_editor(field,text):
return TEXTAREA(_id = str(te
just to clarify, my problem is that html tags in my input text area is just
rendered as tags, naturally because the field is classified as text and
nothing else. I need to render the html elements when displaying text.
On Fri, Dec 27, 2013 at 10:01 PM, Jonas Fredriksson wrote:
> I tr
the XML function solved the problem:
{{for i, row in enumerate(rows):}}
{{=DIV(XML(T(row.table_field), sanitize = True) ) }}
{{pass}}
thanks.
On Mon, Dec 30, 2013 at 3:29 AM, 黄祥 wrote:
> another way around is define it on the represent for your table text field.
> e.g.
> table.table_field.re
I just wanted to see if it's possible to call custom made js functions
using jQuery. I found that it is possible to call by using this function:
$(document).ready(function() {
$(function_call());
}
css tags can also be added.
but it is simpler to just use myfunction();
In the web2py book al
yes, and it works. thanks
On Sun, Jan 12, 2014 at 3:08 PM, Anthony wrote:
> Did you try:
>
> $(document).ready(function() {
> myfunction();
> });
>
> Anthony
>
> On Sunday, January 12, 2014 3:48:48 AM UTC-5, jonas wrote:
>
>> I just wanted to see if
ument.write() line will be executed
> before the ajax call has completed. Try putting the document.write() in the
> returned Javascript itself.
>
>
> On Wednesday, January 15, 2014 11:09:04 AM UTC-5, jonas wrote:
>>
>> Hi
>>
>> I have a controller
nice solution and it works.
thanks
On Wed, Jan 15, 2014 at 7:34 PM, Anthony wrote:
> graph1 is the actual function, the write function was just for testing.
>> This works but it means that I have to make a python function for every js
>> function call when passing values from python functions.
53 matches
Mail list logo