On Monday, January 10, 2011 6:36:18 AM UTC+2, Anthony wrote:
On Sunday, January 9, 2011 1:24:02 AM UTC-5, Graham Dumpleton wrote:
You guys really just got to learn to do your own thing and not treating
it like a crusade where you have to convert the world.
But that's exactly the
Many thanks Anthony,
Firstly I changed the default in 'gluon/sqlhtml.py' with 'truncate=32' on
line 1312.
Using '{{=records}}' in the view and, after restart web2py from source, all
the string fields are truncated only after 32 characters.
This solve effectively the problem without change in
Also you can pass truncate=None and use field.represent and make your own
field representation. What version of web2py?. You are not mixing this
sqlhtml.py file (trunk) with older web2py version?.
2011/7/8 Valter Foresto valter.fore...@gmail.com
Many thanks Anthony,
Firstly I changed the
:-)
On Fri, Jul 8, 2011 at 2:25 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
yes. even better use router (vs routes)
On Jul 6, 10:03 am, Miguel Lopes mig.e.lo...@gmail.com wrote:
Humm,
Nice. Yes, closures are enough, and cleaner too.
Is routes OK for production mode?
Yes. That's what I meant. Thank you for making it much clearer.
Like you mention the benefit is unclear. This makes it unnecessary to toy
with routes or router, which I believe is in the spirit of web2py and
benefits beginners with one less location to edit, thing to learn (routes
rules vs.
I'm using the last version souces of web2py - Version 1.97.1 (2011-06-26
19:25:44) .
With the view:
{{extend 'layout.html'}}
{{=SQLTABLE(records, truncate=None)}}
I get the Traceback (most recent call last):
File C:\Users\valter\Desktop\ALTECH\web2py\web2py\gluon\restricted.py, line
You're doing it right, but there are a couple of things to keep in mind.
Using $.post(url, {input_n: input_number}); is easier than using $.ajax, but
that's merely preference. The other thing you should know is that if a
web2py ticket is generated during an AJAX call, you will not know about
On Jul 8, 3:02 pm, Ross Peoples ross.peop...@gmail.com wrote:
You're doing it right, but there are a couple of things to keep in mind.
Using $.post(url, {input_n: input_number}); is easier than using $.ajax, but
that's merely preference. The other thing you should know is that if a
web2py
Ok, so this is my setup:
I have article() function inside default controller, which obtains
article title in request.args, puts ('articles/'+str(request.args[0])
+'.html') into returned dict(article=...), and serves appropriate
article's HTML from article.html with
!-- various common tags along
Going from web2py - JavaScript is easy:
{{=var}}
However, going from JavaScript - web2py requires an AJAX call. Since
JavaScript is run on the user's machine and not the web server, the two
machines have to communicate somehow, which is where AJAX comes in. You
should also know that things
On Friday, July 8, 2011 3:25:45 AM UTC-4, cjrh wrote:
On Monday, January 10, 2011 6:36:18 AM UTC+2, Anthony wrote:
On Sunday, January 9, 2011 1:24:02 AM UTC-5, Graham Dumpleton wrote:
You guys really just got to learn to do your own thing and not treating
it like a crusade where you
First, if you want to use a particular view, you can always explicitly
assign response.view:
def about():
response.view='default/article.html' # This view will be used instead of
'default/about.html'.
# more code
return dict(...)
Also, note that the {{include}} statement is not a
You need to have the AJAX URL formed in a way that invokes a controller.
eg /application_name/controller_name/function_name/arg0/arg1 .
and include the variable(s) you want to send back. The variables can be
either addition items after the function as above where they show up as args
or if
Can you show the code that produces the 'records' object -- it looks like
it's already a SQLTABLE object rather than a DAL Rows object.
Anthony
On Friday, July 8, 2011 7:53:08 AM UTC-4, Valter Foresto wrote:
I'm using the last version souces of web2py - Version 1.97.1 (2011-06-26
19:25:44)
This will be my second public plugin release. I will put it up on BitBucket
soon, but for now, I thought I would introduce a new plugin I've been
working on. Sometimes you just need a WYSIWYG editor. This plugin integrates
CKEditor into web2py. It acts much like the Auth object in its usage.
Hardo to say. 0.9.7 branch is now obsolete, and a lot of fix has been
added to signal framework in 0.9.8. If you want to manage timer reliably
you should use the latest tip (it is really the 0.9.8.2 release, i am only
waiting for a last patch before release)
--
Roberto De
OMG, setting response.view does it for me 110%!
Confident in the ease of use of web2py, I swear I tried this the very first.
Maybe I mistyped it to response.view = 'article.html' or request.view, and
then just turned to alternatives. Anyway, now it works! :-D
I also understand your explanation,
Anthony, you are a 'clairvoyant', the controller code is :
@auth.requires_login()
def current_logs():
records=SQLTABLE(db().select(db.logs.ALL))
return dict(records=records)
... oops, you say that I need to use DAL Rows object. not SQLTABLE object !
Then I suddenly changed the
On Friday, July 8, 2011 12:14:48 PM UTC-4, Kernc wrote:
I also understand your explanation, except one thing: if I have an
{{include}} inside a {{block}} as a default value (both these statements are
template, non-python statements), and that default is overridden, and since
{{block}}
Anthony,
I reply to you also privately to say many thanks for your support on the
web2py-users group.
I give you my references and if you are on LinkedIn I very appreciate if you
join my professional networks.
Best Regards.
Valter Foresto
No problem. Unfortunately, SQLTABLE does not appear to be well documented in
the book. You could also leave the call to SQLTABLE in the controller and
just add the 'truncate' argument there (and keep {{=records}} in the view),
though since it's a display issue, I suppose it makes most sense in
This looks great. I would certainly find it useful. Thanks for contributing.
Anthony
I think this is awesome and really like the double-click edit
feature! I'm sure this will be of great use to many.
Good on you!
Mart :)
On Jul 8, 12:00 pm, Ross Peoples ross.peop...@gmail.com wrote:
This will be my second public plugin release. I will put it up on BitBucket
soon, but for
Congrats, this is a very useful plugin, and certainly will be one of most
importants and for sure it is very wanted.
I would like to use, let me know if you want some help testing.
(i am curious to see how it integrates with FormWizard plugin)
I am working a lot to finish the web2pyslices 2. In
Hi
I have a utility module that I use regularly where I put some of my
application-specific helper functions. What is the proper way to import
this to make it available in my controllers and views?
I've tried the local_import in db.py but have seen references on this
list that recommend
Yes, SQLTABLE is not well documented but WEB2PY is fantastic !
I agree with you that the use of SQLTABLE should be (typically) in the view.
-- Valter
local_import should work, but you should now use regular import statements
instead. If you want your modules reloaded automatically, do the following:
from gluon.custom_import import track_changes
track_changes()
That will reload your modules, but only when they change (which is an
Fantastic, that is exactly what I was looking for!
-Jim
On 7/8/2011 2:20 PM, Anthony wrote:
local_import should work, but you should now use regular import
statements instead. If you want your modules reloaded automatically,
do the following:
from gluon.custom_import import track_changes
On Friday, 8 July 2011 16:05:54 UTC+2, Anthony wrote:
On Friday, July 8, 2011 3:25:45 AM UTC-4, cjrh wrote:
On Monday, January 10, 2011 6:36:18 AM UTC+2, Anthony wrote:
On Sunday, January 9, 2011 1:24:02 AM UTC-5, Graham Dumpleton wrote:
You guys really just got to learn to do your own
Ok, I have posted the source code on BitBucket. I don't have time to put any
documentation up there yet other than what's here in this thread. I will
update with more documentation hopefully this weekend when I have time.
Until then, enjoy!
https://bitbucket.org/PhreeStyle/web2py_ckeditor
On Friday, July 8, 2011 3:47:09 PM UTC-4, cjrh wrote:
*Why* should we care how many users we have?
Again, this is not the most important thing, but the number of users is
not entirely without consequence either. Generally, more users will
translate into more expert contributors and
Adding to the plugins thread...
*web2py_ckeditor:*
https://bitbucket.org/PhreeStyle/web2py_ckeditor
https://groups.google.com/d/topic/web2py/fCia6IvhZew/discussion
Thanks, Ross.
Hi,
There exist a way to do an upload when a Upload field is defined at
the model but it upload the file to a S3 bucket?
Do I have to extend the upload field properties? How?
Thanks in advance.
Oscar.
Sorry cjrh, but the number of users and the perception of the project DO
matter. Some of us are building businesses around Web2py and need to feel
comfortable that the project has longevity, that we can hire and retain
engineers, that we can find resources if we need them, etc. Not everyone is
I seem to have forgotten exactly how URL() works. I believe my URLs used to
look like /static/image/asdfadsfa.jpg but now they are including /init at
the beginning (ie: /init/static/image/asdfadsfa.jpg). I
have default_application = 'init' in my route file. Am I missing something?
It only seems to be happening on images.
OK:
URL('default', 'item', extension='', args=item.item.slug)
http://pricetack.com/item/us-open-2010-pebble-beach-greg-norman-golf-shirt-x-99
Not OK:
{{=URL('static', 'uploads', extension='', args=item.item.image_thumb)}}
On Jul 8, 2011, at 2:31 PM, pbreit wrote:
It only seems to be happening on images.
OK:
URL('default', 'item', extension='', args=item.item.slug)
http://pricetack.com/item/us-open-2010-pebble-beach-greg-norman-golf-shirt-x-99
Not OK:
{{=URL('static', 'uploads', extension='',
Have I missed some new controversial reddit thread?
On Jul 8, 4:18 pm, pbreit pbreitenb...@gmail.com wrote:
Sorry cjrh, but the number of users and the perception of the project DO
matter. Some of us are building businesses around Web2py and need to feel
comfortable that the project has
Bingo, thx. Not sure how I missed except that I guess it works either way.
But now I have nginx handling /static which I presume is better.
On Jul 8, 2011, at 3:21 PM, pbreit wrote:
Bingo, thx. Not sure how I missed except that I guess it works either way.
But now I have nginx handling /static which I presume is better.
Up to you.
The idea is that static URLs aren't very visible to users, so there's less
motivation to shorten
in my db.py I have
import datetime
rom time import mktime, localtime
timestamp = SQLCustomType(type='datetime',
native='NUMERIC(16,6)',
encoder=(lambda x: str(mktime(x.timetuple()) +
x.microsecond/100.0 if x else None)),
I think I'd rather have my static URLs resemble my other URLs. Seems like if
I'm removing the default appname, that should be global?
Although I don't even know: on a URL like this, does it even touch web2py?
Could be a copy/paste error but there's a typo in line 2: rom should be
from.
thanks pbreit
alas (and o heck!) it was just a lost character in my pasted posting.
On Jul 8, 11:48 pm, pbreit pbreitenb...@gmail.com wrote:
Could be a copy/paste error but there's a typo in line 2: rom should be
from.
On Jul 8, 2011, at 3:39 PM, pbreit wrote:
I think I'd rather have my static URLs resemble my other URLs. Seems like if
I'm removing the default appname, that should be global?
Although I don't even know: on a URL like this, does it even touch web2py?
No, or rather, not that I am aware. We are discussing, I think, the
principal of the matter.
On Friday, 8 July 2011 23:18:57 UTC+2, pbreit wrote:
You need to think slightly bigger than your own personal projects.
Why should I? The bigger community does not concern me. I contribute to
web2py for entirely selfish reasons, because it want it to be the best tool
for me to use for my
47 matches
Mail list logo