It appears right there in the svn sources:
http://code.google.com/p/web2py/source/browse/trunk/gluon/fileutils.py
You should try to either get a fresh svn checkout, or re-do your svn update.
On Sat, May 23, 2009 at 1:00 AM, posh wrote:
>
> I use svn to fetch the trunk code, and when I try to te
Hi all,
what do you think in having routes.py to each app? I think if we have
a site and installs an app called my_app, so this app would be "owner"
of http://mydomain.com/my_app/ URL. It turns apps more flexible,
example: if I create a wiki app and this app have its own routes.py,
user that insta
On Sat, May 23, 2009 at 4:47 PM, wrote:
> T.force('en-de') ## en-de is a language file you'll create below
>
>
> In the table definition:
>
> SQLField('fieldname', type='date')
>
>
> ... a validator on this field which reads like:
>
> db.tablename.fieldname.requires=IS_NULL_OR(IS_DATE(str(T('%Y
Taken direct from the lulu manual.
controllers/default.py
def index():
images=db().select(db.image.ALL, orderby=db.image.title)
return dict(images=images)
default/index.html
{{extend 'layout.html'}}
{{try:}}{{=H2(message)}}{{except:}}{{=BEAUTIFY(response._vars)}}
{{pass}}
{{=H1('Cur
The text label to the right of the 'revert' button at the bottom of
the code editor
is 'to previour version'
should be
'to previous version'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" gr
Slightly off-topic, but fckeditor does just what you want out of the
box, with many connectors in different languages, including python
(but not web2py specific). See also the django fck connector project
(http://code.google.com/p/django-fckconnector/) that should be easy to
port to web2py.
On 23
It appears fine on web2py Version 1.62.3 (2009-05-19 23:25:03)
On May 23, 5:03 pm, dlypka wrote:
> The text label to the right of the 'revert' button at the bottom of
> the code editor
> is 'to previour version'
> should be
> 'to previous version'
--~--~-~--~~~--
Oops. I was accidentally running the older web2py 1.60.2
On a more positive note, I just started using Google Chrome 2.0 with
web2py.
What a difference on the code editor performance compared to IE 8.
Like night and day. Under IE 8, the code editor is extremely sluggish
and is practically unusable
I did. I guess this is the only way to go about it
On May 22, 9:53 pm, JohnMc wrote:
> NikG,
>
> Buy the electronic copy of the book. I followed the same route you
> did. The book really helped me a lot.
>
> On May 21, 11:54 pm, NikG wrote:
>
> > Hello everyone. I'm learning web2py on my own by
I found this change to be very helpful, when doing multi-table inserts on
single submit:
--- sql.py.old 2009-05-23 14:28:15.286720712 +0400
+++ sql.py 2009-05-23 14:27:09.450720875 +0400
@@ -1372,7 +1372,7 @@
fs.append(fieldname)
vs.append(sql_represent(fi
if not request.args:
return redirect()
On 23 Maj, 08:43, annet.verm...@gmail.com wrote:
> Massimo,
>
> After restarting the server if not record: worked.
>
> However, further down the workflow there is an error ticket issued
> when the user clicks the submit button.
>
> My custom update function:
And another similar one.
Massimo, if there are no security implications then may be it worths going
over all 'raise' statements and checking if there is more info that could be
provided w/o much effort, how do you think?
--- sqlhtml.old2.py 2009-05-19 09:51:00.0 +0400
+++ sqlhtml.py
Horst,
The NicEdit site references a image upload plug-in:
http://www.nicedit.com/forums/viewtopic.php?f=3&t=471.
On May 23, 1:50 am, Horst Herb
wrote:
> I need *urgently* either a plugin or web2py "image server" implemented
> that does allow image upload from within nicEditor
> I basically use
I've made it working too, including a working ticket page.
Indeed a ugly hack is needed to store the db value in the request
object, I've not yet discovered a better way.
On May 20, 2:43 pm, Alexey Nezhdanov wrote:
> Today I managed to make ticketing kind of work on GAE.
>
> The 'kind of' becaus
this plugin works but uses image schack to host the pictures.
On May 23, 1:57 pm, JohnMc wrote:
> Horst,
>
> The NicEdit site references a image upload
> plug-in:http://www.nicedit.com/forums/viewtopic.php?f=3&t=471.
>
> On May 23, 1:50 am, Horst Herb
> wrote:
>
> > I need *urgently* either a
These are also great news.
Atenciosamente,
Elcimar Leandro - http://elcimar.blogspot.com
Portal Net Fácil - http://www.nfacil.com.br
2009/5/22 dlypka
>
> I did email it last Monday.
> I have just resent it.
>
> On May 22, 8:35 am, mdipierro wrote:
> > Can you email the new auto to me?
> >
>
I know what the problem is. I think I fixed it. Please download trunk
again.
On May 23, 2:11 am, Yarko Tymciurak wrote:
> It appears right there in the svn
> sources:http://code.google.com/p/web2py/source/browse/trunk/gluon/fileutils.py
>
> You should try to either get a fresh svn checkout, or
Sorry my laziness on searching a little more into this forum/
documentation/web.
I think I understand the way web2py creates forms from model's tables.
But I didn't figure out yet how to show only a few fields from a
table... Or mix fields from various tables in only one form. Any
advice?
--~--~-
On Sat, May 23, 2009 at 10:37 PM, desfrenes wrote:
>
> this plugin works but uses image schack to host the pictures.
I know.
I want to host the images locally.
That site shows an example in PHP how to implement the feature on your
local server
Looks easy and straightforward enough, but I have no
Can you email me the application you wrote. I suspect either defaut/
index.html is mispelled or it is in the wrong place.
Massimo
On May 23, 3:16 am, NikG wrote:
> Taken direct from the lulu manual.
>
> controllers/default.py
>
> def index():
>
> images=db().select(db.image.ALL, orderby=db.
Try edit applications/admin/models.py and change the editor to the Amy
editor. There is a flag.
On May 23, 4:20 am, dlypka wrote:
> Oops. I was accidentally running the older web2py 1.60.2
> On a more positive note, I just started using Google Chrome 2.0 with
> web2py.
> What a difference on the
Is there any reason why bold and italic typefaces can't seem render
views correctly when underline, strikeout or teletype works fine?
Same goes for font face, color and size.
Bold
Italics
Underline
Strikeout
Teletype
This is some text!
--~--~-~--~~~---~--~~
You re
If this does not affect too many files it may get it, please send it
to me so that I can take a look.
Massimo
On May 23, 7:36 am, HansD wrote:
> I've made it working too, including a working ticket page.
> Indeed a ugly hack is needed to store the db value in the request
> object, I've not yet
I did not get it. Twice. :-(
On May 22, 6:11 pm, dlypka wrote:
> I did email it last Monday.
> I have just resent it.
>
> On May 22, 8:35 am, mdipierro wrote:> Can you email
> the new auto to me?
>
> > On May 22, 1:19 am, dlypka wrote:
>
> -
--~--~-~--~~~---~--~---
db.table.field.writable=False
db.table.field.readable=False
or
db.table.field.writable=False
#db.table.field.readable=False
makes the field readonly.
On May 23, 8:02 am, Elcimar wrote:
> Sorry my laziness on searching a little more into this forum/
> documentation/web.
>
> I think I understan
A recurrent problem in web2py is that request.args is a list and if no
request.args are provided
request.args[0] returns a ticket. To avoid this I have a created a new
class called storage.List and not request.args[i] returns None if the
index i is out of bounds.
This does not break anybody's cod
- from the web page of nicedit download nicedit packed with nicUpload
plugin.
- edit nicEdit.js replace
var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"http://
files.nicedit.com/",
with
var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"http://
YOURUPLOADURL",
I h
On Sat, May 23, 2009 at 11:46 PM, mdipierro wrote:
> var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"http://
> YOURUPLOADURL",
>
> I have not tried but it should do the trick.
The documentation suggests that they require a specific upload protocol
Horst
--~--~-~--~~
I would just print request.vars, request.args and requesy.body.read()
whatever it is, is a trivial protocol since it is coded in very few
lines.
On May 23, 8:48 am, Horst Herb
wrote:
> On Sat, May 23, 2009 at 11:46 PM, mdipierro wrote:
> > var nicUploadButton=nicEditorAdvancedButton.extend({nic
Kacper,
Thanks for your reply. Problem solved.
Annet.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from t
Did you get it on my 3rd attempt (from hotmail)?
On May 23, 9:24 am, mdipierro wrote:
> I did not get it. Twice. :-(
>
> On May 22, 6:11 pm, dlypka wrote:
>
>
>
> > I did email it last Monday.
> > I have just resent it.
>
> > On May 22, 8:35 am, mdipierro wrote:> Can you
> > email the new aut
It looks like the zip is corrupted.
I will zip again and also will send the unzipped file as well - in a
few minutes.
On May 23, 9:24 am, mdipierro wrote:
> I did not get it. Twice. :-(
>
> On May 22, 6:11 pm, dlypka wrote:
>
>
>
> > I did email it last Monday.
> > I have just resent it.
>
> >
In case of a custom update() function form= should read like:
form=crud.update(db.adres,request.args[0],next=(URL
(r=request,f='crud_address')))
In web2py next is set to: URL(r=request)
self.settings.update_next = URL(r=request)
Which in case of a custom update function calling update() on cru
Tt does break existing properly written python code (and is very non-
pythonesque). Think:
try: target = request.args[0]
except:
response.flash = 'No target specified'
return
do_something(target)
If this is an issue for people, I think they should improve their
python skills (learn except
On Saturday 23 May 2009 18:42:58 AchipA wrote:
> Tt does break existing properly written python code (and is very non-
> pythonesque).
+1 except for harshness. Masking exceptions is a BAD THING (TM)
> Think:
>
> try: target = request.args[0]
> except:
>response.flash = 'No target specified'
yes but we do this already for request.vars and request.env
anyway, I am not sure about myself about this. Let's here a few
comments about this can I can revert it.
Massimo
On May 23, 10:29 am, Alexey Nezhdanov wrote:
> On Saturday 23 May 2009 18:42:58 AchipA wrote:> Tt does break existing
>
Env and vars are somewhat different, being dicts. The Proper (TM) way
for those would be target = request.vars.get('myoptionalvar', None).
The reason this is the Proper (TM) way is that you *have* to know when
you're handling undefined data (is that a None ? Or a '' ? Maybe 0 ?)
You can't just thr
request.args is a special list anyway because it could be made
readonly and because its elements can only be non-empty strings. This
is why I have difficuly seeing how this will create conflicts.
I like the fact it would allow to do
record = db.table[request.args[0]] or redirect(...)
when yo
On Sat, May 23, 2009 at 11:34 AM, mdipierro wrote:
>
> request.args is a special list anyway because it could be made
> readonly and because its elements can only be non-empty strings. This
> is why I have difficuly seeing how this will create conflicts.
>
> I like the fact it would allow to do
>
Changed it back and uploading to trunk.
On May 23, 12:16 pm, mdipierro wrote:
> ok, I think I found a better solution:
>
> request.args stays as originally was
>
> but I will also define
>
> request.arg0 as request.args[0] or None
> request.arg1 as request.args[1] or None
> request.arg2 as reque
On Sat, May 23, 2009 at 12:13 PM, Yarko Tymciurak wrote:
> On Sat, May 23, 2009 at 11:34 AM, mdipierro wrote:
>
>> .
>
>>
> I would like to consider if "List" is the strategically correct thing to
> extend;
> What about extending storage-class deque instead?
> A storage-deque class with this
On Sat, May 23, 2009 at 12:27 PM, mdipierro wrote:
>
> Changed it back and uploading to trunk.
>
> On May 23, 12:16 pm, mdipierro wrote:
> > ok, I think I found a better solution:
> >
> > request.args stays as originally was
> >
> > but I will also define
> >
> > request.arg0 as request.args[0]
ok, I think I found a better solution:
request.args stays as originally was
but I will also define
request.arg0 as request.args[0] or None
request.arg1 as request.args[1] or None
request.arg2 as request.args[2] or None
Massimo
On May 23, 12:13 pm, Yarko Tymciurak wrote:
> On Sat, May 23, 200
Look into this. in gluon.main there is
a
try:
try:
except:
# try store exception on filesystem
except:
# just print exception
if should be
try:
try:
except:
# try store exception on filesystem
except:
if settings.web2py_runtime_gae:
# store ticket on GAE
I will when I've unbroken the ticketing for non-gae :-)
On May 23, 3:24 pm, mdipierro wrote:
> If this does not affect too many files it may get it, please send it
> to me so that I can take a look.
>
> Massimo
>
> On May 23, 7:36 am, HansD wrote:
>
> > I've made it working too, including a wor
On 5/23/09, mdipierro wrote:
>
> ok, I think I found a better solution:
>
> request.args stays as originally was
>
> but I will also define
>
> request.arg0 as request.args[0] or None
> request.arg1 as request.args[1] or None
> request.arg2 as request.args[2] or None
I like more the old solution
Sent you restricted.py.diff off-list.
> If this does not affect too many files it may get it, please send it
> to me so that I can take a look.
>
> Massimo
>
> On May 23, 7:36 am, HansD wrote:
> > I've made it working too, including a working ticket page.
> > Indeed a ugly hack is needed to store
Send the patch via email
made it that tickets can also be stored in db outside gae
(and i managed to brake the view tickets)
On May 23, 7:41 pm, mdipierro wrote:
> Look into this. in gluon.main there is
> a
>
> try:
> try:
> except:
> # try store exception on filesystem
> except:
>
You can try this:
* Model.py ***
db.define_table("Foo",
db.Field("foo1", "string", length=32, default=None,
requires=IS_NOT_EMPTY()),
db.Field("foo2", "string", length=32, default=None,
requires=IS_NOT_EMPTY()),
db.Field("foo3", "string", length=32, default=
I really like this - the web2py way to do this. :-)
On 5/22/09, mdipierro wrote:
>
> This is now done in trunk.
>
> - download trunk
> - Create a new app
> - make sure you have the new views/generic.* in the new app
>
> - edit default.py and create an action:
>
> def test():
> return dict(ti
Hang on, not sure if we're talking about the same thing. Style, as in
preference of 'if' over 'try' is okay to discuss (although I think
*forcing* people to use 'if' is wrong). This proposed change, however,
inherently BREAKS backward compatibility, as seen from my example, for
anybody using the E
Hello
Who knows some cheap (30 Dollar/Euro a year) or free hosting? Without need
to install W2P.
Thanks,
Pynthon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, s
Hi,
I am newbie to web2py. I am working on a project where multiple people
will have to get different type of authentication, (e.g. teacher and
student have different level of access to the system). Now the problem
is that I can not create different instances of Auth class, e.g.
autht = Auth(glob
Hello-
I am just starting out with both GAE and web2py. After reading through
the GAE docs and thinking about my data, I designed a data model that
is a hierarchy of a few levels using ReferenceProperty attributes to
create the relationships between levels. Here is a simplified example
of what I'm
Dear all,
Having a numeric/decimal support for web2py is key to produce
applications including accounting or financial aspects, and there had
been discussions about it back in March.
I understand that the reason for not including decimal or numerical is
that it is not supported by all the databa
I am definitely with AchipA this time: no need to change request.args
carlo
On 23 Mag, 21:32, AchipA wrote:
> Hang on, not sure if we're talking about the same thing. Style, as in
> preference of 'if' over 'try' is okay to discuss (although I think
> *forcing* people to use 'if' is wrong). This
Now, I have changed database, I have switched to mysql, and whole
database is empty. Now it gives me this error:
Table 'web2py.teacher' doesn't exist
If create table myself, it says it already exists. Any help?
On May 23, 11:49 pm, Hasanat Kazmi wrote:
> Hi,
> I am newbie to web2py. I am working
other options that will leave the current syntax unchanged
1) request.args.one, request.args.two, ... request.args.last
2) request.args.first, request.args.second, ... request.args.last
3) request.args(0), request.args(1), ... request.args(-1)
4) request.args.get(0,None), request.args.get(1,No
Can you post the entire code that gives the problem?
Do you have both authc and autht? There should be only one auth.
When delete a database make sure also delete everything in app/
databases/
Massimo
On May 23, 5:15 pm, Hasanat Kazmi wrote:
> Now, I have changed database, I have switched to
Hi,
I am experimenting with jpolite and tried to show a google map in a
module.
Cannot get it to work. Maybe google Javascript code conflicts?
Is it possible to get it to work with jpolite at this stage, or does
it need further work.
any ideas/help appreciated,
Thanks
Chrism
--~--~-~--~-
Cant you use "float" when specifying the field type in the database
definition?
On May 23, 9:43 pm, "Francois (Jersey)"
wrote:
> Dear all,
>
> Having a numeric/decimal support for web2py is key to produce
> applications including accounting or financial aspects, and there had
> been discussions
A workaround (until web2py mission control can be convinced to support
decimal type) would be to store them as string (similar to BCD
concept)
and then convert to python decimal when needed. Luckily python itself
supports decimal.
On May 23, 7:56 pm, Pystar wrote:
> Cant you use "float" when spe
Have you tried Google App Engine?
On May 23, 8:38 pm, Pynthon Pynthon wrote:
> Hello
>
> Who knows some cheap (30 Dollar/Euro a year) or free hosting? Without need
> to install W2P.
>
> Thanks,
> Pynthon
--~--~-~--~~~---~--~~
You received this message because you
I like option 3) but I think having __call__ and __getattr__ is much
"magic" to a new web2py user I think. It can cause confusion and must
be well documented.
On 5/23/09, mdipierro wrote:
>
> other options that will leave the current syntax unchanged
>
> 1) request.args.one, request.args.two, ..
On 5/23/09, Hasanat Kazmi wrote:
>
> Now, I have changed database, I have switched to mysql, and whole
> database is empty. Now it gives me this error:
> Table 'web2py.teacher' doesn't exist
> If create table myself, it says it already exists. Any help?
If database already exists you should use
Massimo,
and about to setting views? With "normal" views we can do:
response.view = 'blablabla.html'
How we can setup these RSS, XML etc. views with response? Is there a
way? If not, I think we should create one.
On 5/23/09, mdipierro wrote:
>
> You can remove the generic.xxx file that you do no
I have two different objects for Auth
autha = Auth()
authb = Auth()
Can we have multiple instances of Auth, if no then why not?
On May 24, 4:03 am, mdipierro wrote:
> Can you post the entire code that gives the problem?
>
> Do you have both authc and autht? There should be only one auth
> Perhaps some unification between these two - so that applications can be
> portable accross both types - will emerge, and this would be useful.
>
> But I think the first step is to cleanly, intentionally separate the two
> kinds of back ends and see where that leads.
These two statements are ke
Hi Dan,
for now we do not support GAE ListProperty becase it would make the
code not portable on relational databases.
This is what you can do:
db.define_table('user',
SQLField('name'),
SQLField('email'),
SQLField('phone'),
SQLField('pets'))
db.define_table('pet',
SQLField('name'),
I do not know. I do not think it should conflict. I have not tried it
yet.
On May 23, 6:33 pm, murray3 wrote:
> Hi,
> I am experimenting with jpolite and tried to show a google map in a
> module.
> Cannot get it to work. Maybe google Javascript code conflicts?
>
> Is it possible to get it to wor
Mission control is convinced there is no real reason not to use double
since, even if the database may store them as decimals there is no
decimal type in python, hence this extra conversion can only hurt
you.
You can very much mimic decimals using validators:
class IS_DECIMAL:
def __init__
(s
currently you can set view but that overrides the requested extension.
For example
http:///action.xml
def action():
response.view='myview.html'
return dict()
unless
def action():
response.view='myview.'+request.extension
return dict()
Is this sufficient? I think so.
On M
You can but I do not see why you would ever do it. I am sure there is
a better way to do what you are trying to do and perhaps you should
explain what you are trying to do. Anyayw, since this is what you are
doing there are some caveats.
auth.settings.table_user by default is called 'auth_user'
> 1. A separate DAL for GAE/BigTable is needed to harness it. web2py is
> too relational specific and not portable to column oriented databases
> like BigTable. After going through several data model design
> iterations and getting to one that feels correct, web2py imposes the
> relational model
Yes, I think so.
Using only response.view = 'myview' (without extension) works too?
On 5/24/09, mdipierro wrote:
>
> currently you can set view but that overrides the requested extension.
> For example
>
> http:///action.xml
>
> def action():
> response.view='myview.html'
> return d
It works in the sense that it will for a file without extension.
On May 23, 11:54 pm, Álvaro Justen [Turicas]
wrote:
> Yes, I think so.
>
> Using only response.view = 'myview' (without extension) works too?
>
> On 5/24/09, mdipierro wrote:
>
>
>
>
>
> > currently you can set view but that overr
> Can you make a concrete example? It will help us improve.
The oft-cited ListProperty is a great example. Because GAE/BigTable
doesn't provide substr support, we have a couple options for a search
facility. One is to take a string, say "foobar" and tokenize it into
parts.
['fo','oo','ba','ar','
Hello:
I'm really new using python and web2py, and now I need to make some
dynamic queries (the table name and the field name will be dynamic),
and I think that I can use:
executesql
But I have some questions:
1.- Is more safe to use executesql?
2.- Advantage and disadvantage of executesql?
Good point. I think we can and should support listproperty. I also
think its behavior can be mimicked in relational databases. This will
probably happen within 1-2 weeks.
Massimo
On May 24, 12:50 am, Cory Preus wrote:
> > Can you make a concrete example? It will help us improve.
>
> The oft-cit
> But I have some questions:
>
> 1.- Is more safe to use executesql?
It is less safe because you must validate values yourself to avoid SQL-
injection vulnerabilities.
> 2.- Advantage and disadvantage of executesql?
No advantage if you have the option not to use it. If you need to
build a quer
Note that testing of appengengine specific development can / should be able
to go on local machines;
I haven't tried it, but I will remind of the announcement in
http://googleappengine.blogspot.com/2009/05/web2py-support-new-datastore-backend.html
of the datastore backend - claiming to be more rob
81 matches
Mail list logo