Hi all,
I'm just wondering how to ensure creating only one instance of object.
Methods that comes on my mind:
* use gc module and search object by id -- inefficient
* singleton
* __init__.py?
* serialize object to DB?
* other ...
Cold somebody give me an advise, which way is the best/clean fo
Is it possible to use hardcron when running on rocket not on apache?
I am running web2py on top of gevent.pywsgi on CentOS 5.+
soft cron is just not suitable...
dera develpoers,
i am adding just a german ä in the menu list. like this.
T('täter') for translation
and the web2py shows it false in the browser, althoguth i have setup
utf-8.
in layout.html
does anybody have similar experiences?
Massimo since you are a real gentleman you have been too polite... ;)
DAL vs ORM: the fact that DAL uses a clean functional approach does not mean
that is not OO...
"Python magic was all over the place, variables defined globally are
allover, you cannot see real OO in the design"
I only agree th
Web2py is Great, Greatest framework that i had ever tried and stick onto it.
But what it is lacking is publicity and lack of KILLER web-apps like those
Made PHP most popular web-development platform.
Here are some , what that had made PHP Popular and which will also make
Web2py + Python all togeth
Singleton are not the solution if you are in a multiprocess
environment.
gc and cache.ram have the same problem.
You can use cache.disk or db.
On Aug 2, 3:39 am, Tomas Pelka wrote:
> Hi all,
>
> I'm just wondering how to ensure creating only one instance of object.
> Methods that comes on my
Not sure. Give it a try
On Aug 2, 3:57 am, elffikk wrote:
> Is it possible to use hardcron when running on rocket not on apache?
> I am running web2py on top of gevent.pywsgi on CentOS 5.+
>
> soft cron is just not suitable...
+1
next on todo list new KPAX
On Aug 2, 5:16 am, Phyo Arkar wrote:
> Web2py is Great, Greatest framework that i had ever tried and stick onto it.
>
> But what it is lacking is publicity and lack of KILLER web-apps like those
> Made PHP most popular web-development platform.
> Here are some , wha
Hello
I have situation when .select() give lots of rows select().first()
start consume lots of cpu.
I work around this by changing query to minimize answer of select().
LOGGING = True gives this in profile.log
ncalls tottime percall cumtime percall
filename:lineno(function)
3
use
select(limitby=(0,1)).first()
On Aug 2, 4:22 am, KMax wrote:
> Hello
> I have situation when .select() give lots of rows select().first()
> start consume lots of cpu.
> I work around this by changing query to minimize answer of select().
> LOGGING = True gives this in profile.log
> nc
Kitchen Knives are not made to Kill people , but people using it to :).
Yes it is choice for the people , yes . But should not include inside
web2py. Should be hosted separately (not hiding).
On Sun, Jul 25, 2010 at 11:57 PM, Kuba Kucharski
wrote:
> huge part creation is about modifying smth tha
Ok, I would like to elaborate more on the points I've mentioned.
1- Web2py does not support unit testing out of the box and if you want
to hack everything to get unit testing well integrated you can but
this still doesn't mean the framework support unit testing, and by
that I mean the ability to t
I would like to add another app in that list.This one I am working hard to
create.
Social Network platform podered by web2py
Inspired in noosfero app
RadiantCMS is a great app to use as example
Sent from my iPhone
On 02/08/2010, at 07:35, mdipierro wrote:
> +1
>
> next on todo list new
I forgot links
http://noosfero.org/Site
http://radiantcms.org/
Sent from my iPhone
On 02/08/2010, at 07:57, rochacbruno wrote:
> I would like to add another app in that list.This one I am working hard to
> create.
>
> Social Network platform podered by web2py
> Inspired in noosfero app
>
Ahmed,
Ok I understand now point 2. I think that is "dependency injection" and
"inversion of control", web2py uses it.
The problem you mention is real: debugging is harder because you don't know
where things come from.
This is common to programs that uses IoC, but is good for code reuse and
uni
Thanks Ahmed for the clarifications. Having feedback from users is
very important. :-)
On Aug 2, 5:51 am, Ahmed Soliman wrote:
> Ok, I would like to elaborate more on the points I've mentioned.
>
> 1- Web2py does not support unit testing out of the box and if you want
> to hack everything to get
I am working in a cms *blog style* the idea is to be simple, ready to
work, looking professional, and use ajax and effect in admin panel at
least. You can see here: http://code.google.com/p/instant-press/ It is
in developing state but many things are working. I am working on it in
the last 2 or 3 w
Does someone elaborate already how to use DAL with PostgreSQL full-
text indexing features? Any hints?
David
Thank you.
Some code with .first() for newbies
nextpaper_id=db(db.papers.id >
paper_id).select(limitby=(0,1),orderby=db.papers.id).first().id
prevpaper_id=db(db.papers.id <
paper_id).select(limitby=(0,1),orderby=~db.papers.id).last().id
I guess .first=.last while limitby=(0,1)
O
Martin, is it able to work on GAE ?
2010/8/2 Martin.Mulone
> I am working in a cms *blog style* the idea is to be simple, ready to
> work, looking professional, and use ajax and effect in admin panel at
> least. You can see here: http://code.google.com/p/instant-press/ It is
> in developing stat
Here's my naif setup - note that this should be exactly the same for Eclipse
or Aptana (Aptana is Eclipse + goodies):
1. Use web2py source.
2. Make sure you have PyDev installed in Eclipse/Aptana.
3. Create a project a PyDev project:
* this will link to the web2py folder on the file system - so
I don know I think yes, but I dont test it.
On Aug 2, 9:45 am, Bruno Rocha wrote:
> Martin, is it able to work on GAE ?
>
> 2010/8/2 Martin.Mulone
>
>
>
>
>
> > I am working in a cms *blog style* the idea is to be simple, ready to
> > work, looking professional, and use ajax and effect in admin
Another BUG in markmin render
paragraph with **bold**, ''italic'' and ``code``.but:
**text** renders as text
**text:** renders as **text:**
the same happens if we put any mark, point or accent as the last in Markup
**text()** renders as **text()**
where should render as text()
2010
I have several functions returning forms in a module file, and started
experimenting with the LOAD function, but I can figure out how to use this
functions without moving them to the controller. I would prefer to keep
these functions in a module for code organization reasons. I wonder if it is
poss
Have you tried local_import()?
I really dont know if that will work in your case, Give it a try
http://web2py.com/book/default/chapter/04?search=local_import
2010/8/2 Miguel Lopes
> I have several functions returning forms in a module file, and started
> experimenting with the LOAD function, bu
yes I've tried it. local_import does not work. the LOAD function signature
expects a controller name and function name (defaulting to the
request.application), as far as I know it is not possible to pass it a
function - at least supplying it a function object does not work.
Miguel
On Mon, Aug 2,
Hi,
I have topics, and each topic can have several examples.
I try to put all crud forms for those examples in one page.
the update works in them, but create and delete - don't :(
though delete gives flash'es, that it did it's job...
http://code.google.com/p/code-by-example/downloads/list
there a
Can somebody help me make the screenshots for chapter 3 and chapter 13
within this week?
You can a free copy of the final PDF book before everybody else ;-)
Let me know if you can before you start doing it. No need to duplicate
work.
Massimo
On Aug 2, 9:22 am, Massimo Di Pierro wrote:
> Here is
For me . Web2py completions works flawlessly under Eclipse + PyDEV
Just follow Mr.Freeze post on web2py slice
http://www.web2pyslices.com/main/slices/take_slice/2
and add on each controller :
from applications.sExtract.modules.doctypes import *
from gluon.sql import *
from gluon.html import *
fr
I can do for plugin_wiki chapter, as I am working a lot with that.
let me know about standard format for the image and min-max size/scale, I
use default MacOs screenshot tool ( shift+command+4)
Do you want only selection of the funcionality?, zooming ?, just
content or including browser window?
On Aug 2, 2010, at 2:36 AM, Michele Comitini wrote:
> "Python magic was all over the place, variables defined globally are allover,
> you cannot see real OO in the design"
>
> I only agree that Python is magic, but that is the only thing I agree with.
> Probably a long exposure to COO (Class O
Hi, I'm going to rewrite an API made with webpy into web2py.
This API is available only over https and I'd need to use basic auth.
It's an API available only to cmdline clients such as curl, wget and
so on.
I think there's an error on the documentation (http://www.web2py.com/
book/default/chapte
One of my views has a number of if else clauses to control what the
user sees depending on context. I'm finding it painfully difficult to
debug because omitting a pass statement generates a not very helpful
error:
Traceback (most recent call last):
File "/Users/mellis/w2ptip/gluon/rocket.py", l
Hi, I'm going to rewrite a REST API made with webpy into web2py.
This API is available only over https and I'd need to use basic auth.
It's an API available only to cmdline clients such as curl, wget and
so on.
I think there's an error on the documentation (http://www.web2py.com/
book/default/ch
The template system actually emits an error that says "Missing pass in
view" or "too many pass in view".
This has to do with cron / rocket failing, nothing to do with template.
--
Thadeus
On Mon, Aug 2, 2010 at 10:57 AM, Michael Ellis
wrote:
> One of my views has a number of if else clauses
I'm pretty sure it does because I've fixed several instances during
the past two days by correcting pass statements. I'll try to create
a minimal example to post here.
On Aug 2, 12:13 pm, Thadeus Burgess wrote:
> The template system actually emits an error that says "Missing pass in
> view" or
Running locally InstantPress looks awesome, quickly, beauty/clean layout and
I loved the way you treat Admin Buttons.
Congratulations!
But, this could not works on GAE, I saw a lot of code that is not allowed on
GAE, you are using .like() in get_lats_pots_with_search()
Today I will try to run it
On Aug 2, 2010, at 9:21 AM, Michael Ellis wrote:
> I'm pretty sure it does because I've fixed several instances during
> the past two days by correcting pass statements. I'll try to create
> a minimal example to post here.
That would be good. Whatever it is, it's leading to rocket seeing an em
I seriously doubt it.
I guarantee you it is just a fluke probably having to do with your setup.
--
Thadeus
On Mon, Aug 2, 2010 at 11:21 AM, Michael Ellis
wrote:
> I'm pretty sure it does because I've fixed several instances during
> the past two days by correcting pass statements. I'll t
Ok, think I know what was going on:
1. I did have a missing pass statement
2. I had not restarted web2py after updating from tip this morning.
It's probably not fair to expect web2py to show the correct errors after
repairing the engine while the motor's still running :-}
So I immediately got th
Its not a matter of easy, but more a matter of it even being a
possibility. There is no way to know where you intended to place the
pass statement.
--
Thadeus
On Mon, Aug 2, 2010 at 11:47 AM, Michael Ellis
wrote:
> Ok, think I know what was going on:
> 1. I did have a missing pass statement
by false do you mean incorrectly in the webbrowser?
The area that is printing this is python not the html though you should
have it there. :)
I am not sure where it is set python side, but I do know my finnish
äÄöÖåÅ all work for me.
Best Regards,
Jason
On Mon, 2010-08-02 at 02:09 -0700, max wrote
> Here is an early draft of the book chapter 13 which discusses
> Components, Plugins and plugin_wiki.
As plugin_wiki will be contained in the book I'd suggest to include it
into the main repository for web2py as a standard plugin.
By both actions -- wrinting about it in the book and including i
seems to be 'soft' when running on rocket on my pc (windows)
how to make it 'hard' ?
my file name is wsgi.py in web2py folder and looks like that
def start_server():
#patch
from gevent import monkey
monkey.patch_all()
#web2py config
import os, sys
sys.path.insert(0, '')
path = os.path.dirname(o
Thank you Bruno,
OK. I would like to have the images as tiff in actual size in pixels.
Scale the window so that the default layout fits in the browser. I
will cut it as needed.
Massimo
On Aug 2, 9:53 am, Bruno Rocha wrote:
> I can do for plugin_wiki chapter, as I am working a lot with that.
>
>
The screenshots look really cool. Please keep us posted about
progress. This is better other blogging system I have seen for web2py.
Massimo
On Aug 2, 7:11 am, "Martin.Mulone" wrote:
> I am working in a cms *blog style* the idea is to be simple, ready to
> work, looking professional, and use aja
Hello,
I would like to ask for a little improvement in the web2slices site:
please make the title of the pages the same as the slice title.
Currently, every page reads as HTML title: "web2pyslices2".
Thanks,
Timmie
Hello,
recently I have seen a slice showing how to create a list table and
ording the entries by drag&drop within the table.
Could someone please point me at the very slice?
Thanks,
Timmie
have you contributed to web2py? have you submitted patches? helped
with testing? Reported bugs?
if so you probably should be listed in
http://web2py.com/examples/default/who.html
If you are not it is an oversight. If you are not I apologize.
If you do not find your name there, do not be shy a
Done. Thanks.
On Aug 2, 12:47 pm, Timmie wrote:
> Hello,
> I would like to ask for a little improvement in the web2slices site:
>
> please make the title of the pages the same as the slice title.
>
> Currently, every page reads as HTML title: "web2pyslices2".
>
> Thanks,
> Timmie
Was it this plugin?
http://web2py.com/plugins/default/sortable
On Aug 2, 12:50 pm, Timmie wrote:
> Hello,
> recently I have seen a slice showing how to create a list table and
> ording the entries by drag&drop within the table.
>
> Could someone please point me at the very slice?
>
> Thanks,
> T
Hello Web2Py group,
I'm am currently evaluating different Python-based Web Application
frameworks and had a question regarding Web2Py and the use of
traditional Python classes.
My question is that why do you not create true Python classes (using
the class) keyword when developing the models? For
I really tried every example given,
but no one works on GAE
I cant figure out how to change this:
http://web2pybrasil.appspot.com/init/plugin_wiki/page/home
to this:
http://web2pybrasil.appspot.com/page/home
2010/8/1 mdipierro
> ('/(.*?)/(.*?)', '/$1/yourcontroller/$2'),
>
> or use
>
>
I think your question is why do we provide a Database Abstraction
Layer and not an Object Relational Mapper.
The answer is because the difference is semantic and not functional.
In my view the mapping between tables in relational database and
objects is a too much of a stretching that works well i
Will look into it but probably not until later in the week. Meanwhile
if somebody can make any progress, let me know.
On Aug 2, 1:18 pm, Bruno Rocha wrote:
> I really tried every example given,
> but no one works on GAE
>
> I cant figure out how to change this:
>
> http://web2pybrasil.appspot.com
Agreed. That's why I said "some indication". I can think of a couple of
things that might be helpful:
1. If the nesting level returns to 0 at any point in the file, the missing
pass statement must be afterwards. If that's the case, the error message
could say "missing pass statement after line 2
Another suggestion:
should be the page.title field of plugin_wiki_page just
including response.title = page.title to page controller
def page():
"""
shows a page
"""
slug = request.args(0) or 'index'
w = db.plugin_wiki_page
page = db(w.slug==slug).select().first()
res
I've used the sortable plugin (
http://www.web2py.com/plugins/default/sortable ) in some projects and
I think it is very useful to arrange list of items in database. What I
miss is the "connect list" functionality (
http://jqueryui.com/demos/sortable/#connect-lists ) of jQuery UI. What
I think can
ok, I took a look into tools.py to get some more clear ideas.
I did a little mess up here (tends to be really confusing), and
actually:
from gluon.contrib.login_methods.basic_auth import basic_auth
and
auth.settings.login_methods = [basic_auth()]
are needed if we're going to authenticate a
> 5- Yes, Python does work on Eclipse, IntelliJ, etc. but does web2py
> work smoothly and easily? for instance, to get web2py working
> correctly on eclipse (PyDev) you will need to put stupid nonsense
> imports ( if 0: import ) on the top of every file because of the
> "magic" I mentioned before.,
- Page History
page history does not works on GAE,
http://web2pybrasil.appspot.com/init/plugin_wiki/page_history/home Fails
and raises a ticket
There is a limit to history entries per page?
I mean, if I edit a page too many times this will create too many entries in
plugin_wiki_page_history
I t
> No that I can think of.
Would be good if you could use one of the major markup languages as input:
http://en.wikipedia.org/wiki/List_of_lightweight_markup_languages
Currently, your markmin seems to be like Texy (http://texy.info/en/)
A look at converters show how is the life could be:
* http://
> Was it this plugin?
> http://web2py.com/plugins/default/sortable
Ah, forgot there are also plgins besides the slices...
+1 KPAX
An CMS is essential for adoption of web2py. If you have a small
project for a small customer. You simple can't write an app from
scratch -
even if you use web2py. This is where php really shines.
I would really like to help with the information and interaction
design of kpax.
On Aug 2, 1
> Done. Thanks.
Cool, thanks for the quick fix.
Thank you very much Massimo.
On 08/02/2010 12:32 PM, mdipierro wrote:
Singleton are not the solution if you are in a multiprocess
environment.
gc and cache.ram have the same problem.
You can use cache.disk or db.
On Aug 2, 3:39 am, Tomas Pelka wrote:
Hi all,
I'm just wondering how
ok, I took a look into tools.py to get some more clear ideas.it
turns out that is a bit difficult to clean out the magic from Auth()
I did a little mess up here (tends to be really confusing), and
actually:
from gluon.contrib.login_methods.basic_auth import basic_auth
and
auth.settings.logi
Hi it's me again. :)
It turned out, that this problem only occurs with a specific Python
interpreter (the one included in openSUSE 11.3 x64). Sorry, it's my
fault, I should have checked it. So problem solved! :)
I am using cube2py(plugin_wiki) as a CMS, for my site I am using markmin to
write in, it is a quite difficult and needs some improvement, I like markin
syntax and I will keep markmin to the site.
besides, is it easy to turn plugin_wiki in to a Simple CMS ( able to run on
GAE).
In Model:
change pl
I use like() to search, but in a near future this could be disabled.
On Aug 2, 1:23 pm, Bruno Rocha wrote:
> Running locally InstantPress looks awesome, quickly, beauty/clean layout and
> I loved the way you treat Admin Buttons.
>
> Congratulations!
>
> But, this could not works on GAE, I saw a l
Thats the way I found to perform LIKE() search in GAE, it is ugly (I know)
but works.. I am waiting for any feature to replace this.
@staticmethod
def searchPages(string=None,nfmessage='Nothing found with %s'):
"""
string: string to be found
"""
found = set()
Texy features are very good http://texy.info/en/syntax
but the syntax is ugly...
I would like markmin to implement all that features in a beauty way.
2010/8/2 Tim Michelsen
> > No that I can think of.
> Would be good if you could use one of the major markup languages as input:
> http://en.wiki
First, We're not using the DAL. Our database provides stored
procedures for all manipulation. I've got quite a large (to me)
web2py application with 20-25 controllers and over 100 templates.
We've got our own class hierarchy that sort-of wraps the db procedures
and represents our data model.
I h
Let me look into this.
On Aug 2, 4:17 pm, Niphlod wrote:
> ok, I took a look into tools.py to get some more clear ideas.it
> turns out that is a bit difficult to clean out the magic from Auth()
>
> I did a little mess up here (tends to be really confusing), and
> actually:
>
> from gluon.cont
You form must have
you will file the file in
request.vars.file.file.read()
and the filename in
request.vars.file.filename
request.vars.file is a cgi.FieldStorage object (look in the Pyhon cgi
module) and "file" is the name of your field.
On Aug 2, 5:48 pm, ae wrote:
> First, We're
might as well leave clone.py in trunk - there are legitimate uses for
it and it can't be hidden now anyway:
http://code.google.com/p/web2py/source/browse/scripts/clone.py?r=19d163c0406a1787da4077a2b2aa8074c725ad87
On Aug 1, 10:14 am, Joe Barnhart wrote:
> No, he is NOT right.
>
> I need tools E
The book is based on a specific version? are you using 1.81.5 or trunk?
2010/8/2 mdipierro
> Thank you Bruno,
>
> OK. I would like to have the images as tiff in actual size in pixels.
> Scale the window so that the default layout fits in the browser. I
> will cut it as needed.
>
> Massimo
>
>
Thank you for the extended description.
This is almost exactly what I had been following. I had skipped the
arguments partially because I think Eclipse is not taking them. When I
enter the arguments and then go to the interpreter tab to "see
resulting command line for the given parameters" (button)
78 matches
Mail list logo