An example of "return response.render('custom.html',data=data) " would
be useful on the web2py website.
Fabulous framework.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to th
I agree with has. You cache when multiple users need to access the
same data. In you case the data is clearly associated to a user hence
it belongs to a session.
Massimo
On Jun 29, 10:37 pm, Hans Donner wrote:
> you should be able to also store the results in a cache. But perhaps
> the session
you should be able to also store the results in a cache. But perhaps
the session is better in this case
On Tue, Jun 30, 2009 at 2:57 AM, Richard wrote:
>
> do you mean caching the database query? That might help, but
> constructing the dictionary from the query also takes a lot of
> operations.
>
I just discovered
www.websequencediagrams.com
Here is a sample web2py diagram:
http://www.websequencediagrams.com/cgi-bin/cdraw?lz=bm90ZSByaWdodCBvZiBCcm93c2VyOiBodHRwOi8vLi4uL2FjdGlvbgoAFActPlNlcnZlcjogSFRUUCBSZXF1ZXN0CgBCBW92ZXIgABkGLCBNb2RlbCxWaWV3LENvbnRyb2xsZXIsIERhdGFiYXNlOiB3ZWIycHkgKG11
a note about www.reversehttp.net/demos:
I noticed on the tiniestdemo --- it will serve the value of the text box,
and sets it to a default ("Hello from the tiniest demo") ---
When I try to browse to http://tiniestdemo.www.reversehttp.net/
If I serve this text a few times, then change it (I addde
correction. not print statements on GAE but logging statetements.
On Jun 29, 8:54 pm, mdipierro wrote:
> In gluon/contrib/gql.py web2py does this:
>
> if field.type == 'datetime' and value != None and not
> isinstance(value, datetime.datetime):
> (y, m, d) = [int(x) f
In gluon/contrib/gql.py web2py does this:
if field.type == 'datetime' and value != None and not
isinstance(value, datetime.datetime):
(y, m, d) = [int(x) for x in
str(value)[:10].strip().split('-')]
time_items = [int(x) for
I think I see where this is happening in the /gluon/sql.py code. There
are lines in that file that use this pattern, which truncates
information about fractional seconds:
datetime.isoformat()[:19]
what is the best way to modify this behavior to retain the precision?
(note that this pattern appea
Here is some sample code to produce the behavior I'm trying to
describe. Note that in the controller, there are 2 lines commented out
because they return an error ("TypeError: unsupported operand type(s)
for -: 'str' and 'str'")
db.define_table('timetest',
db.Field('starttime','datetime',defa
well this is inevitable, I suppose; jquery doing it in javascript;
opera doing in (?) I'll guess executable code, making a portable web
services source, and traditional computing going small - twitter, iPhone,
Android, etc. --- all these concerned with security on the open web, and
wanting
Dave sounds very interesting. Point of information: there are very
strict rules in the (at least in the US) for soliciting investment
in this way and taking about potential profits. Google "rule 504 of
regulation d". These rules are there to protect
small investors and usually bar soliciting inves
Imagine a similar Opera UNITE... http://unite.opera.com/
New technology called Opera Unite, radically extending what you are
able to do online. Opera Unite harnesses the power of today's fast
connections and hardware, allowing all of us to help define the future
landscape of the Web, one computer
I'm using a datetime field with SQLite and GAE (different systems for
development and deployment), and I can only get time resolution of 1
second when reading from the database. I know that I am working with
information down to the 0.01 second resolution, and this is what I'm
inserting into the da
Thanks. Actually, I just uncommented line on default model.py, and in
that file:
auth.settings.registration_requires_approval = True
I will set it to False then clear the registration keys.
Other questions:
1. Can we rename the auth_user table to other for example to member
table?
2. Can r
do you mean caching the database query? That might help, but
constructing the dictionary from the query also takes a lot of
operations.
On Jun 30, 1:11 am, Hans Donner wrote:
> or store the data in cache?
>
> On Mon, Jun 29, 2009 at 3:43 PM, cjparsons wrote:
>
> > Session data is normally store
http://www.reversehttp.net/demos/
Not sure what to make of this but this is interest, for example as an
alternative to heartbeats to check what a user is doing.
Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
thanks for the explanation about what is happening behind the scenes.
I think session should work well for me then.
On Jun 29, 11:43 pm, cjparsons wrote:
> Session data is normally stored on disk in the "sessions" folder in
> python pickle format - only the session id is transferred over the
>
reading this again I incorrectly read the title as
"[Permission to raise funds for web2py] [friendly hi-tech business?]"
and did not understand it.
then I read it again as
"Permission to raise funds for [web2py-friendly] hi-tech business?"
and now I understand your post.
This is a tricky one.
oops, thanks
On Jun 29, 6:34 pm, "mr.freeze" wrote:
> Perfect. BTW, I think you need to change line 172 of tools.py to:
> self.errors['captcha'] = self.error_message
> instead of:
> self.errors['captcha'] = 'invalid!'
>
> It returns 'invalid!' even if you set error_message
>
> On Jun 28, 11:18
Did you set?
auth.settings.registration_requires_approval = True
The default should be
auth.settings.registration_requires_approval = False
If you require approval, this has to be done manually via admin
(unless you create an interface) by clearing the registration_key
field of th
Perfect. BTW, I think you need to change line 172 of tools.py to:
self.errors['captcha'] = self.error_message
instead of:
self.errors['captcha'] = 'invalid!'
It returns 'invalid!' even if you set error_message
On Jun 28, 11:18 pm, mdipierro wrote:
> def contact():
> form = SQLFORM.factory
Hi, I am really new in using web2py. I trued to use auth function
email verification. It sent vericifation key using gmail smtp to my
email containing: 'Click on the link
http://127.0.0.1/myapp/user/verify_email/34080fc6-0606-4ec8-91ef-8634221cd9a8
to verify your email'. I click the link. Then fl
Hi Massimo:
Would you allow me to post a notice of mini share placement available.
The company will be using web2py for its application development. It
is a Canadian company. The business is satellite communications
technology development. The company has invented a new vastly more
efficient
Massimo,
"return response.render('custom.html',data=data) "
Wow, learn something new every week. That kills my (2) observation.
Thanks.
I do however think Web2Py would grow faster still if it could foster
plug-ins with design editors and report generation tools as well.
On Jun 29, 11:14 am, md
But what about when you accumulate many thousands of images? Putting
them all into one directory is going to stress the operating system,
if not cause an outright crash, won't it? I suppose we could change
the file storage scheme to break the images into subdirectories, but
this gets more and mo
Would it be possible to add an example of more complex form on the
web2py website, as it may be a way of answering lots of queries?
On my side, I was asking myself the same question and was trying to do
a complex form using a bit of javascript (Jscript?).
Like lots of new user of Web2py, I find
Even better then to break it out into a public available function.
/R
On Jun 29, 8:11 am, mdipierro wrote:
> This is a very delicate mechanism. There are many parts that need to
> cooperate to make this work. I will look into it but I cannot make
> promises.
>
> Massimo
>
> On Jun 28, 11:32 pm,
OK. I'll move my inner functions to be outside the function, and do
the testing that way. I can move them back inside the function when
I'm satisfied with the testing results.
On Jun 29, 1:58 pm, mdipierro wrote:
> The inner_function is only interpreted if the outer function is
> called. It cann
On Jun 29, 8:06 pm, haftish21 wrote:
> Then can I say it's always better 2 run the source version than the
> windows one? Or what?
If you need to easily customise the running Python, yes.
The Windows distribution is convenient for simpler users (& can be
modified by including extra DLLs, but thi
Here is the ppt of my 5 min lightening talk at pycon
http://www.web2py.com/examples/static/lightening.ppt
Massimo
On Jun 29, 3:37 pm, fpp wrote:
> So... does anyone have any advice and/or ready-made material on how to
> best describe web2py in under 5 minutes ?...
--~--~-~--~~-
I rewrote my db and forms a bit and am now getting the following:
Traceback (most recent call last):
File "/Users/mellis/sources/trunk/python/web2py/gluon/
restricted.py", line 107, in restricted
exec ccode in environment
File "/Users/mellis/sources/trunk/python/web2py/applications/init/
The inner_function is only interpreted if the outer function is
called. It cannot be tested this way. It may depend for example on
variables that are defined at runtime in the outer function.
Massimo
On Jun 29, 3:01 pm, Dan wrote:
> That's a good suggestion, Hans. Unfortunately, when I tried it
So... does anyone have any advice and/or ready-made material on how to
best describe web2py in under 5 minutes ?...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group,
On 27 juin, 00:27, JohnMc wrote:
> You will find both Brazil and Argentina are big FOSS proponents. One
> of the bigger community WiFi setups run on FOSS. Many just cannot
> afford the costs of a Microsoft OS. Once past that adoption of other
> open source tools just naturally follow.
I understa
reST requires a relatively large third party library therefore it will
not incorporated in web2py (i.e. they will not be distributed
together). You can use reST right now if you easy_install it.
try:
from docutils import core
from docutils.writers.html4css1 import Writer,HTMLTranslator
That's a good suggestion, Hans. Unfortunately, when I tried it I get
false OK results -- all the tests are reported as "passing" yet I know
that one of them should fail. Here is my modified controller code,
with 2 doctests for the inner function, 1 of which should fail:
def my_controller():
"
>From my point of view if you don't have a storage issue then i think
the best approach could be storing it in the file systems with name
stored in the database. It also provides better performance when you
compare with store it in the db and retrieving.
database has to process lot and get the d
>{{=TAG[''](*[P(p) for p in body.split('\n')]) }}
>
> or, if you want to allow HTML tags in texts
>
>{{=XML(body.replace('\n',''),sanitize=True)}}
>
> of you want to allow WIKI syntax
What about rest from the wiki?
When will this be added to the devel branch?
Please do give this tip a m
Oh yeah, forgot about Google Apps Engine.
On Mon, 2009-06-29 at 11:31 -0700, mdipierro wrote:
> It is not pure python it is a binary library. As far as I know none of
> them runs on GAE.
>
> On Jun 29, 1:23 pm, Joe Barnhart wrote:
> > Since PIL is all Python, do you suppose it's compatible wi
My dear Fran, really thank u very much.
Then can I say it's always better 2 run the source version than the
windows one? Or what?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post
place the doctest for inner function in the docstring for
innerfunction. now its called before the functions is defined...
On Mon, Jun 29, 2009 at 7:58 PM, Dan wrote:
>
> I'd like to create some tests for functions that exist within a
> controller using web2py's (very convenient) doctest integrat
Note: In order to use the Images API in your local environment you
must first download and install PIL, the Python Imaging Library. PIL
is not available on App Engine; it is only used as a stub for the
Images API in your local environment. Only the transforms provided in
the images API are availab
Hmmm ...
I may want to rethink the db and interface design a bit. There are
only 4 items that the operator needs to enter at the beginning of the
test session: a name, an equipment identifier, an ip address, and a
port number. There are not all that many possible values for any of
these items (e
Sounds like we need an IAL (image abstraction layer) besides the DAL
On Mon, Jun 29, 2009 at 9:03 PM, Hans Donner wrote:
> Note: In order to use the Images API in your local environment you
> must first download and install PIL, the Python Imaging Library. PIL
> is not available on App Engine; it
that is, on linux, something like:
apt-get install python-mysqldb
or
yum install python-mysqldb
should do it;
You can also look at http://pypi.python.org/pypi/MySQL-python/1.2.3c1
At least on Ubuntu 9.04/python2.6 easy_install of mysql-python fails; For
PC you might be better off downloadi
http://code.google.com/intl/nl-NL/appengine/docs/python/images/installingPIL.html
On Mon, Jun 29, 2009 at 8:31 PM, mdipierro wrote:
>
> It is not pure python it is a binary library. As far as I know none of
> them runs on GAE.
>
> On Jun 29, 1:23 pm, Joe Barnhart wrote:
>> Since PIL is all Pyth
something like this
def mywidget(field, value):
return INPUT(_name='field', _id='table_field',
_class='fieldtype', _value=value)
db.table.field.widget=mywidget
but in your case mywidget should return a table containing a select
box obtained from selecting the records and an entry field (to
Since PIL is all Python, do you suppose it's compatible with GAE?
That could give it a nod over ImageMagick in my mind.
On Jun 29, 9:12 am, mdipierro wrote:
> Something like this could go in gluon.conrtib send me a patch when you
> have time.
>
> On Jun 29, 10:39 am, cjparsons wrote:
>
> > I've
Not possible because the doctests are run outside the function and the
inner_function is not defined outside the scope of my_controller.
It is possible to extract the code of the inner_function and execute
it:
>>> def f():
... def g(): return 5
... return 8
>>> eval(f.func_code.co_consts[
It is not pure python it is a binary library. As far as I know none of
them runs on GAE.
On Jun 29, 1:23 pm, Joe Barnhart wrote:
> Since PIL is all Python, do you suppose it's compatible with GAE?
> That could give it a nod over ImageMagick in my mind.
>
> On Jun 29, 9:12 am, mdipierro wrote:
I think have multiple levels of forms
Highest Level
{{=form}}
Intermediate Level
{{=form.custom.begin}}
{{=form.custom.labels.somefield
{{=form.custom.widget.somefield}}
{{=form.custom.submit}}
{{=form.custom.end}}
Lowest level
{{=BEAUTIFY(form.errors) #optional}}
It is possible but you would need to create your own validator and
wdget for that.
Is the "unique items in a given field" the same field you need to
validate? If not you also need an ajax callback to handle the creation
of the new entry.
Massimo
On Jun 29, 12:56 pm, MikeEllis wrote:
> I'm taki
Tow more cents. This is what I normally do:
Place {{=form}} in the html. Save the generated html from the
browser.
Customize the form using a tool. replace the hidden fields with
{{=form.hidden_fields()}}.
Replace the value="" with value="{{=form.impval.field}}"
Save it back into the view.
I
It should be easy to create a validator that does that and calls
'imagemagic convert', validators are filters. All you need to do is
read the tream, save it in a tmp file, convert the tmp file, read the
database back in the stream, rewind the stream for further processing.
On Jun 29, 12:11 pm, Ja
I'd like to create some tests for functions that exist within a
controller using web2py's (very convenient) doctest integration. Is
this possible?
For example, here is a controller with a subfunction and one test
defined for the controller and another defined for the function within
the controlle
I'm taking the liberty of extending this topic with a (somewhat)
related question. Hope that's all right.
Is it possible to use SQLFORM to create a dropdown entry with the
following properties?
1. Display a list of unique items in a given field AND
2. Accept new items typed into the entry box.
Hello,
If you want to use mysql with web2py since it using Python you need to
install MySQLdb which is a MySQL DB API the help python to talk with
mysql db...
I hope it help...
CHeers,
Yannick P.
On Jun 25, 9:32 am, Stefan wrote:
> I want to add y mysql database.
> When I start the framework
Massimo,
Thanks for the quick reply! Yes, it's the same field I need to
validate. Can you steer me toward docs and/or examples of creating my
own validator and widget? (I have a copy of your manual).
Mike
On Jun 29, 2:16 pm, mdipierro wrote:
> It is possible but you would need to create your ow
The stuff that web2py does is behind the scenes and not visible to
anyone without a membership. Web2py is doing the heavy lifting in
running the club's scheduling system. Ruby is doing the public user
interface. Web2py is doing the private administrative interface.
--~--~-~--~~
hi guys,
the temperature outside is high enough, so lets try to stay cool here. :-)
for the moment i'm fine with what i can do with web2py, how the framework is
worked on (frequent updates etc). The latter is why i'm using it.
I've seen various frameworks, with parts i do not like and stuff tha
As nice as this is, the real power, I think, would be in requesting an
image, declaring it's width and height, and it resizes or sends an image
read for you. At least at first thought, it would be cool.
Regards,
Jason
On Mon, 2009-06-29 at 08:39 -0700, cjparsons wrote:
> I've had success with P
Or better, why don't we just package this with web2py?
http://www.imagemagick.org/download/python/
That would be fancy schmancy.
Regards,
Jason Brower
On Sun, 2009-06-28 at 20:36 -0700, mdipierro wrote:
> I think imagemagic is the best way. It is in every unix system and it
> very easy to use fo
i do not understand the question. If you are talking about directory
traversal attacks, they are prevented by URL validation. A folder
under static can be a symbolic link.
Massimo
On Jun 29, 11:22 am, JohnMc wrote:
> Massimo,
>
> Is there any security provision that would prevent someone from d
yes. You still need
from gluon.tools import Auth
auth=Auth(globals(),db)
auth.define_tables()
then you can check with
user = auth.login_bare(username, password)
user is None if invalid login.
On Jun 29, 2009, at 11:30 AM, Hasanat Kazmi wrote:
> Hi,
>
> I want to programatically authe
Hi,
I want to programatically authenticate a user. I have username and
password of a user and I want to authenticate it without created a
form.
Something like this:
token = Auth().check(username, password)
if token:
..
Is it possible?
--~--~-~--~~~---~--~~
Massimo,
Is there any security provision that would prevent someone from doing
a symbolic link substitution for the '../static' folder in Web2Py?
On Jun 28, 7:32 pm, mdipierro wrote:
> No. Let's step back for a sacond.
>
> Say you have a file in path="/home/you/somewhere/file.txt" the path
> al
I think Julio / speedbird makes a good observation about granularity (e.g.
{{=form}} is too coupled to controller), but I think goes - similarly to
Hans - off into solution (and perhaps too far the other end of the
spectrum).
I still at some level agree w/ Massimo:
Tags / format that looks like:
> b) That the Web2Py developer can for any given function in a
> controller specify a custom html rendering. If not so specified then
> the default .html be utilized. Maybe like
>
> return dict(data=data, html='custom.html')
>
this can be achieved by
response.view='custom.html'
return dict(data
Something like this could go in gluon.conrtib send me a patch when you
have time.
On Jun 29, 10:39 am, cjparsons wrote:
> I've had success with PIL to thumbnail uploaded images.
>
> In upload form handling:
>
>if form.accepts(request.vars,session):
> if not form.vars.get("delete_this_r
I agree w/ Massimo here -
It "feels" like all are jumping into solutions and tools and
implementations...
What I want to "nail" is the problem, and what (WHAT) we are talking about,
would like to do,
and what makes sense and is web2py-ish, pythonic...
So - Hans makes this very good point:
- to u
ceej makes the right observation. Web2Py is a great backend
development platform. I would also second Annet's observations that
Web2Py not get all 'fuzzy' with WYSIWYG. So maybe it is time for
Web2Py to think about the next step -- third party ecology. jQuery for
example is great on its own. But i
I've had success with PIL to thumbnail uploaded images.
In upload form handling:
if form.accepts(request.vars,session):
if not form.vars.get("delete_this_record",False):
response.flash = "image accepted"
makeThumbnail(form.vars.id)
else:
response.flash =
I think I have understood:
for a graphic-people point of view, it is normal "opening" a html
file with dreamweaver and change it. Graphic-guys here wanted,
probably, "open" web2py files inside Dreamweaver, like a normal
project of Dreamweaver, to change his graphical aspect, only that.
This is
Excellent reply IMHO, I've been "slightly" slapped in the wrist on
previous posts when I talked about separation of logic and
presentation, a very subjective topic if you will, since where to
define that "fine line" in presentation vs logic implementation for
one thing..
I'd rather have a UI desi
It is a different philosophy. This seems more in line with the Kid/
Genshi template language than the web2py template language.
Massimo
On Jun 29, 10:08 am, Hans Donner wrote:
> Web2py must stay a python programming framework, and I love the ease
> it porvides for a programmer. However, when I
or store the data in cache?
On Mon, Jun 29, 2009 at 3:43 PM, cjparsons wrote:
>
> Session data is normally stored on disk in the "sessions" folder in
> python pickle format - only the session id is transferred over the
> network connection between the client and the server. (I say
> "normally" be
Web2py must stay a python programming framework, and I love the ease
it porvides for a programmer. However, when I want to have great
looking pages re layout etc my design skills are a bit less. So I want
help from somebody who can do great stuff with html, css and jquery
stuff and they prefer tag
Fantastic! i will try process it tonight.
Massimo
On Jun 29, 8:56 am, Markus Gritsch wrote:
> On Mon, Jun 29, 2009 at 3:39 PM, mdipierro wrote:
>
> > I do not have a windows machine.
> > Can you build this, unzip web2py_win.zip, place the file in the proper
> > place and rezip it?
>
> http://xi
On Mon, Jun 29, 2009 at 3:39 PM, mdipierro wrote:
>
> I do not have a windows machine.
> Can you build this, unzip web2py_win.zip, place the file in the proper
> place and rezip it?
http://xile.org/le/web2py_win.zip
I will leave the file there for about a week.
Markus
--~--~-~--~~-
Hi there,
I would just like to say that, web2py is a python programming
framework not a designing one and it's a lot easier to use than most.
I can implement the greatest of design that any designer could dream
up with ease. I do not understand when you say "the html views could
perhaps bit more
Session data is normally stored on disk in the "sessions" folder in
python pickle format - only the session id is transferred over the
network connection between the client and the server. (I say
"normally" because there is also an option to store session data in
the database, though this has to b
I do not have a windows machine.
Can you build this, unzip web2py_win.zip, place the file in the proper
place and rezip it?
Massimo
On Jun 29, 7:33 am, Markus Gritsch wrote:
> On Mon, Jun 29, 2009 at 6:31 AM, mdipierro wrote:
>
> > Markus,
>
> > sorry for my delay about this issue. Two question
On Mon, Jun 29, 2009 at 6:31 AM, mdipierro wrote:
>
> Markus,
>
> sorry for my delay about this issue. Two questions:
> 1) will this make sqlite files created by web2py windows binary
> incompatible with web2py osx binary and or web2py running form source?
No. The data in the database is not affe
On Jun 29, 12:40 pm, haftish21 wrote:
> Any one who successfully managed to get connected to postgres db?
On XP, yes
> I already installed psycopg2, postgres, web2py and python 2.6 on my
> windows vista os, but still can't get linked to postgres. Did I miss
> sth? What I get is this:
> Tracebac
On Jun 29, 8:10 am, Richard wrote:
> I have a Python dictionary that is unique to each user and takes a
> rather heavy database query to instantiate. Is there a way to maintain
> the state of this dictionary between requests? For example, is saving
> it in the session variable a good idea?
Looks
Any one who successfully managed to get connected to postgres db?
I already installed psycopg2, postgres, web2py and python 2.6 on my
windows vista os, but still can't get linked to postgres. Did I miss
sth? What I get is this:
Traceback (most recent call last):
File "", line 1, in
File "gluo
fully agree with this.
However, the html views could perhaps be a bit more html and less python so
most html tools could be used to build them and without needing much
conversions. As indicated, how the java tapestry framework did this is very
nice and we could perhaps borrow some ideas from t
In a model I defined a table:
db.define_table('image',
db.Field
('bedrijf',db.bedrijf,default='',notnull=True,ondelete='CASCADE'),
db.Field('imagepositie',db.imagepositie,default='',notnull=True),
db.Field
('imagefile',type='upload',deletable=True,default='',notnull=True),
db.Fie
I appreciate web2py as it is. In the past I worked with Adobe GoLive,
NetBeans, JDeveloper and ADF and Filemaker. Beautiful software, I
implemented use case after use case by simply dragging and dropping
components and clicking my way through dialog boxes. However, the
moment I wanted to adjust th
I still seem to be missing something. Must be obvious but I can't see it.
I use the example code you showed, and the errors dict shows the values and
form.errors is now an empty dict, but the error messages still get displayed
in the old manner without me doing anything. It's as if the error messag
hello,
I have a Python dictionary that is unique to each user and takes a
rather heavy database query to instantiate. Is there a way to maintain
the state of this dictionary between requests? For example, is saving
it in the session variable a good idea?
thanks,
Richard
--~--~-~--~~-
91 matches
Mail list logo