Updated and included link to dal.py 101 video
On Jun 13, 8:36 am, Massimo Di Pierro
wrote:
> Just call it dal.py since it is going to remain single file The
> description should include a notice that says (this module di normally
> distributed as part of web2py but it does not depend on web2py, e
oops...
while parsing the string in controller, there was a bug.
Now I can escape the u character by using .encode('utf-8')
But still there are 2 questions---
1) using .encode('utf-8') everywhere is not preferable for me.
Is there any alternative, by which the default string encoding can be
set t
So there is no difference functionally (once problems are fixed).
However the page loads visibly faster in my application with
ajax=False.
So once the problems are fixed then presumably one would always use
ajax=False; setting ajax_trap to achieve desired functionality?
On Jun 12, 6:04 pm, Massim
Not necessarily. Ajax=true loads the page and component in parallel. Ajax=false
waits for the component to load before rendering the page.
On Jun 13, 6:37 am, Stefaan Himpe wrote:
> I found this blog post and it seems interesting:
>
> http://www.mattb.net.nz/blog/2011/06/13/using-startcom-free-ssl-certi...
Just got one (ssl pki), thanks for the link!
Well it certainly seems faster. With Ajax=True the first part of the
page appears then there is a disconcerting pause before the rest.
On Jun 13, 9:37 am, pbreit wrote:
> Not necessarily. Ajax=true loads the page and component in parallel.
> Ajax=false waits for the component to load before rend
I still have not find a solution to the problem of the autocomplete widget
not working as it should on Internet Explorer.
The following code can illustrate my problem
db.define_table("toets",
Field("veld1"))
db.toets.veld1.widget = SQLFORM.widgets.autocomplete(
@massimo...I am just trying to play a video of type flv,avi in the browser
itself...I tried to use 'embed' tag of html, but the video didn't played. It
just showed the black screen. I couldn't find the file
models/plugins_wiki.py..
@stifen...sorry i don't know what blob isi just defined the im
i have a one field i.e) username
>
i want to accept only alphabets plz send this code
db.define_table('table1',
Field('username', 'string')
plz send code for this
--
@n!l m@n!ky@m
i have a one field i.e) username
>
i want to accept only alphabets plz send this code
db.define_table('table1',
Field('username', 'string')
plz send code for this
--
@n!l m@n!ky@m
i have a one field i.e) username
>
i want to accept only alphabets plz send this code
db.define_table('table1',
Field('username', 'string')
plz send code for this
--
@n!l m@n!ky@m
Hello list,
This is not a web2py problem but as there is so many good programmers on
the list I thought I´d start here.
I´m extending out billing application that is made on webpy. The
extension is to handle bills that should be billed periodically (usually
once a year). So instead of having
I make heavy use of Storage in my apps because dot notation is so much
easier and faster. It is completely backwards compatible with Python's
dictionary. I usually end up putting this at the top of all my controllers
and modules:
from gluon.storage import Storage
Then instead of using a dictio
With ajax=True, first the parent page is returned to the browser, and then
an Ajax call is made to fill in the component. So, the parent page should
load a little faster in that case (because the component isn't called until
after), but there's an additional network call to get the component, so
True about plugin_wiki, but not everyone uses it. I know I don't, just
because I am mostly developing internal enterprise applications that do CRUD
operations on a database. Also, there are other plugins that require jQuery
UI, so having those plugins include their own version of it is a bad ide
and Gluon Dal?, because if you do import gluon.dal when you installed web2py
through pip
2011/6/13 Luther Goh Lu Feng
> Updated and included link to dal.py 101 video
>
> On Jun 13, 8:36 am, Massimo Di Pierro
> wrote:
> > Just call it dal.py since it is going to remain single file The
> > descri
I prefer the way to select the application you want to install, only welcome
in main web2py and the others over a repository.
New: You want to install?
- welcome (default)
- welcome jquery ui
- wiki
- xxx
2011/6/13 Ross Peoples
> True about plugin_wiki, but not everyone uses it.
I think that template app should be minimal.
On Mon, Jun 13, 2011 at 2:33 PM, Martín Mulone wrote:
> I prefer the way to select the application you want to install, only
> welcome in main web2py and the others over a repository.
>
> New: You want to install?
>
>- welcome (default)
>- welc
thank you so much for your hints and suggestion, anthony and pbreit. i'll
figure it out my wrong code.
On my debian server, I have setup Apache + wsgi + django. I've
multiple domains hosted. Structure as follows:
/srv/www/example1.com/public_html/
/srv/www/example1.com/application/
/srv/www/example2.com/public_html/
/srv/www/example2.com/application/
I'm accessing my django projects using Apache
Well, this is new to me. While not web2py related, still very valuable
information. I'll give them a try.
Thanks!
2011/6/13 Jason Schmidt :
> On my debian server, I have setup Apache + wsgi + django. I've
> multiple domains hosted. Structure as follows:
>
> /srv/www/example1.com/public_html/
> /srv/www/example1.com/application/
>
> /srv/www/example2.com/public_html/
> /srv/www/example2.com/application/
>
> I'm
Sorry, none of my solution uses Web2py, but maybe the workflow might help
because we do something similar.
First I wrote a Delphi Win32 app. It creates nicely formated statements as
PDFs using ReportBuilder to a directory accessible to our internal
webserver. It seemed to me that if this p
1. You could modify massimo's commet_messaging.py to use
https://github.com/kmike/tornadio. It also uses tornado but is based
on socket.io and gives you the choice of the following transports:
WebSocket
Adobe® Flash® Socket
AJAX long polling
AJAX multipart streaming
Forever Iframe
JSONP Polling
2.
Yes Martin, I think the idea of giving a choice of New 'Welcome XXX' is
great.
As you have found with Instant Press, it isn't always convenient to make
fundamental site features as a plugin.
There is little difference in principle between a 'New Welcome' app and the
existing appliances. How
Jquery ui can be installed in one line of code so I'm not exactly sure what is
being proposed.
On Monday, June 13, 2011 11:14:23 AM UTC-4, dspiteself wrote:
>
> 1. You could modify massimo's commet_messaging.py to use
> https://github.com/kmike/tornadio. It also uses tornado but is based
> on socket.io and gives you the choice of the following transports:
> WebSocket
> Adobe® Flash® Soc
It can be a little jarring but some believe this approach is a big trend in web
service design.
I can confirm that the autocomplete widget does not work at all in IE 7, 8,
or 9 (at least not using the 'welcome' app). After I type two letters, the
input box loses focus (i.e., I cannot continue typing). I then click back in
the box, type another character, and it loses focus again -- I have
Anyone?
I've been using StartSSL for a couple years now. I generate S/MIME certs,
SSL certs, and one for our Jabber server. Works great and never had a
problem and it was all FREE. Their paid certs are very competitively priced
too. The class 1 certs are about half the price of GoDaddy's and allow for
db.define_table('things',
Field('title', 'string'),
)
db.define_table('photos',
Field('thing_id', db.things),
Field('photo', 'upload'),
)
Is there a way to get all things and just one photo per thing?
Something like:
rows = db(db.things.id>0).select(db.things.ALL, db.photos.AL
Jim,
You could try doing:
import sys
sys.path.append('/path/to/web2py/applications/another_app/modules')
from mymodule import MyClass
Alternatively, you could also add mymodule to a location that already exists
in sys.path.
Hi Michele!
I get the same error as before:
{
"error": {
"type": "OAuthException",
"message": "Invalid redirect_uri: Given URL is not allowed by the
Application configuration."
}
}
from the following URL:
https://graph.facebook.com/oauth/authorize?scope=user_photos%2Cfriends_
module = local_import('') //module.py
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
2011/6/13 Ross Peoples
> Jim,
>
> You could try doing:
>
> import sys
> sys.path.append('/path/to/web2py/applications/another_app/modules')
> from mymodule im
I have the following functions defined in test.py file
@auth.requires_login()
def call():
return service()
@service.xmlrpc
def time():
import time
return time.ctime()
and following in my db.py file
auth.settings.allow_basic_
login = True #for CLI access
When I execute the following
No, I wasn't aware... sorry, I can't follow the current web2py
development at that detail. Could you point me to the information or
make a small brief? It sounds like it could be quite useful.
Greets.
On 10 jun, 04:52, Bruno Rocha wrote:
> Are you aware about the changes included in the latest w
Hi Massimo (and others),
Can you please let me know if this is supported by web2py (therefore
considered a bug)?.
Otherwise, do you have any recommendations to solve it?.
I also posted a message here:
https://groups.google.com/d/msg/web2py/G3HABb--lGs/9P9TIC_hIV4J
Thanks,
Carlos
Me and a few other did some more testing with the latest debian/ubuntu
packages. The debian package works just fine in wheezy/sid.
The ubuntu package does not work in Oneric nor does it work in Natty
(to be expected).
$ web2py
Traceback (most recent call last):
File "/usr/bin/web2py", line 87,
2011/6/13 Stavros :
> Me and a few other did some more testing with the latest debian/ubuntu
> packages. The debian package works just fine in wheezy/sid.
>
> The ubuntu package does not work in Oneric nor does it work in Natty
> (to be expected).
>
> $ web2py
> Traceback (most recent call last):
Advertise it. There is a pretty active Python user group here, and it would
make a nice talk.
On Mon, Jun 13, 2011 at 3:43 PM, Carlos wrote:
> Hi Massimo (and others),
> Can you please let me know if this is supported by web2py (therefore
> considered a bug)?.
> Otherwise, do you have any recommendations to solve it?.
You can define your tables manually via SQL, and disable web2py migrati
Hi Mariano,
Thanks for your input.
I would like a generic and automated web2py solution for circular references
that works with all supported dbs (not only postgresql).
I thought this was already supported in web2py, which is why I was asking
also to Massimo (pending his confirmation / correct
No problem I already solved the issue.
Regards,
Oscar.
On 12 jun, 01:33, Oscar wrote:
> Hi,
>
> I have a model using a list:string field called type.
>
> Validation for type field:
> IS_IN_SET({'finished':T('Finished'),'service':T('Service')},
> zero=T("-- Choose Type Of The Product --"))),
>
I used the following:
record = db(db[main_data.settings.table_name_products].id ==
product_id).select()
form.element(_id = "op_products_type")[0] = record[0].type
Regards,
Oscar.
On 12 jun, 01:33, Oscar wrote:
> Hi,
>
> I have a model using a list:string field called type.
>
> Validation for
IRRC Workaround are:
* redesign the database to avoid circular references
* don't use circular references at all, they aren't really required
by web2py DAL, you can define tables without "references" feild types,
just normal ones, and use validators (you can add foreign key
constraints later by
The patched package only produces "deposit" in web2py folder.
I then get the following fatal error message:
Traceback (most recent call last):
File "/usr/bin/web2py", line 87, in
if not
os.path.exists(module_web2py_applications):open(module_web2py_applications,
'w').close()
IOError: [Errno
Has anybody successfully added Facebook user Authentication or log-
in?
If so could you explain how you did it including example code if
possible?
python-web2py package seems to only available in wheezy and sid. My
current prod servers are running Squeeze and Ubuntu Lucid. So seems
like source is the only way. Anyone has a good installation guide for
Debain Squeeze and/or Ubuntu Lucid? My main concern is to keep the
same directory structure a
Do you know why it does not work?
On Jun 13, 10:28 am, Anthony wrote:
> I can confirm that the autocomplete widget does not work at all in IE 7, 8,
> or 9 (at least not using the 'welcome' app). After I type two letters, the
> input box loses focus (i.e., I cannot continue typing). I then click b
Ok, Obviously I'm doing something wrong as I can't use my website
unless I'm logged in.
I have this db
db.define_table('image',
Field('title'),
Field('file', 'upload'),
Field('description', 'text'),
Field('date', 'datetime', default=request.now),
Field('user', default=session.auth.
If you're ever in L.A. there is an active Python community here.
Are users logged in? Usually you do it like this:
Field('created_by', db.auth_user, default=auth.user_id)
Do you allow users to inset an image without registering or logging in? If
so, you may need to handle it differently, possibly with an onvalidation
function that accounts for there being no
Mariano is probably right that you want to avoid circular references if
possible. But the example you provided doesn't look like a circular
reference to me.
What you might want to do is define the tables first without the reference,
have Web2py create them and then add the reference after the t
No I would require them to login to post. They can login at index but
its not required, it only displays content.
And I'll try that code in a sec, let you know.
On Jun 13, 4:14 pm, pbreit wrote:
> Are users logged in? Usually you do it like this:
> Field('created_by', db.auth_user, default=auth.
Hi all,
I just ran into a sort of stupid issue. I setup ldap authentication
for my web2py app some time ago, and just recently noticed this issue
-- I cannot seem to authenticate when connecting to the web2py
application using port forwarding (via SSH tunnel).
When logging in to the Production or
And I got this error when using the code you supplied
Traceback (most recent call last):
File "C:\Users\Drise\Desktop\web2py\gluon\restricted.py", line 188,
in restricted
exec ccode in environment
File "C:/Users/Drise/Desktop/web2py/applications/***/models/db.py",
line 15, in
Field('u
I always recommend installing Web2py from version control:
hg clone https://web2py.googlecode.com/hg/ web2py
That's pretty much all you need to do. That allows for much better control
over which version of Web2py you are running. Web2py itself requires no
further setup.
I'm not exactly sure abo
I guess that means you are not using authentication. How did you set up your
application in the first place? Can you delete it and start over with a "New
simple application"?
If you don't want to start over, make sure you have these lines in a model
file.
from gluon.tools import Mail, Auth
mai
I assume most of you have heard about Node.js by now. If not, http://nodejs.org/
What are everyone's thoughts/feelings about Node.js?
Hi All,
just wondering if there are plans of supporting ajax_trap as documentation
in the next releases (see bug
http://code.google.com/p/web2py/issues/detail?id=286)
thanks
--
Sebastian E. Ovide
I've just followed the instructions from the manual:
http://web2py.com/book/default/chapter/08
On Mon, Jun 13, 2011 at 6:11 PM, Arvin Andrews Jr wrote:
> Has anybody successfully added Facebook user Authentication or log-
> in?
> If so could you explain how you did it including example code if
>
Thank you for saving me some time.
On Jun 13, 10:20 am, Anthony wrote:
> On Monday, June 13, 2011 11:14:23 AM UTC-4, dspiteself wrote:
>
> > 1. You could modify massimo's commet_messaging.py to use
> >https://github.com/kmike/tornadio. It also uses tornado but is based
> > on socket.io and gives
I had similar problems... fixed using dns names rather that IP numbers...
On Mon, Jun 13, 2011 at 7:08 PM, wrote:
> Hi Michele!
>
> I get the same error as before:
>
> {
>"error": {
> "type": "OAuthException",
> "message": "Invalid redirect_uri: Given URL is not allowed by the
>
On Jun 14, 6:01 am, ra3don wrote:
> I assume most of you have heard about Node.js by now. If
> not,http://nodejs.org/
>
> What are everyone's thoughts/feelings about Node.js?
See
http://groups.google.com/group/web2py/browse_thread/thread/bdcbb16593902050/51a63bfd1313a77d?lnk=gst&q=erlang#
web2py is adding so many functionalities that it is difficult to understand
what the book is documenting.
It would be great to have a changelog... or at least a web2py version that
the book is referring to
On Sat, Jun 11, 2011 at 2:19 AM, niknok wrote:
>
> Is there like a change log for the
On Jun 13, 10:20 am, Anthony wrote:
> On Monday, June 13, 2011 11:14:23 AM UTC-4, dspiteself wrote:
>
> > 1. You could modify massimo's commet_messaging.py to use
> >https://github.com/kmike/tornadio. It also uses tornado but is based
> > on socket.io and gives you the choice of the following tr
It depends on the page imagine the case of a page with a lot of
comments... each comment has a like component... if you load each like via
ajax you will need to do a lot of ajax calls and the page would
take several seconds to load and you will be loading your webserver with
resou
Hi
I have jquery driven dynamic form with many fields, Is it possible to
POST them to web2py controller.
This is pseudo-code. I want to know is it doable. Can I make simple
form in web2py and POST some raw data fields and get them in
controller side and manually insert them to the database.
In my c
I will try fix this today or tomorrow. Yet the new "current" object
opened a can of worms with ajax_trap and I am consideringming making
ajax_trap equivalent to simply ajax=True.
On Jun 13, 5:02 pm, "Sebastian E. Ovide"
wrote:
> Hi All,
>
> just wondering if there are plans of supporting ajax_tra
Make sure to update to the latest stable version. At this time that would
be:
hg update R-1.96.4
On Monday, June 13, 2011 6:21:01 PM UTC-4, sebastian wrote:
>
> anyway I would suggest to use ajax=true until
> http://code.google.com/p/web2py/issues/detail?id=286 is fixed
>
I'm not sure issue 286 is really a problem. ajax_trap is for trapping forms
within components, not for trapping links
SHould be doable. For Ajax form submission:
http://web2py.com/book/default/chapter/10#Ajax-Form-Submission
The "Voting & Rating" shows an example of manual DB insertions:
http://web2py.com/book/default/chapter/10#Voting-and-Rating
Right, you would not load each individual comment via individual LOADs
(except I think the new Google Groups does something similar). But you might
have individual components for Top 10 Comments, 10 Newest Comments, etc.
Note, I have added a comment to issue 286 on Google Code with the
explanation below.
On Monday, June 13, 2011 7:00:39 PM UTC-4, Anthony wrote:
> On Monday, June 13, 2011 6:21:01 PM UTC-4, sebastian wrote:
>>
>> anyway I would suggest to use ajax=true until
>> http://code.google.com/p/web2py/is
Please see the comment I just added to issue 286 -- I don't think there's a
problem with ajax_trap (at least not with regard to that particular issue,
which has to do with trapping links, not forms).
Anthony
On Monday, June 13, 2011 6:52:07 PM UTC-4, Massimo Di Pierro wrote:
> I will try fix
Thanks for all you input.
pardon, me, what's cid used for? is it mandatory to use trap?
thank you so much.
I have verified SMTP works and sent email from server is received AND
I have used same mail object in db.py to send a test message using:
mail.send(to=['b...@bla.com'],
subject='hello',
message='hi there')
HOWEVER. Error messages are not being sent. I know it is probably
something SUPER simpl
I am trying to provide an editor for auth_user using SQLFORM. I also am
trying to add a checkbox to the bottom of the form to set whether or not the
user is an administrator. If so, then the user gets added to an
Administrators group when calling form.accepts().
The strange part is, the code wo
there are many variations and combined functionality that we can do
with these dicts with attribute like functionality... below is an
example of one that lets you do the dot thing on copies of a dict
(comes in vary handy at times) and uses cPickle (can send usage if
unclear)
something else very us
It looks like there are at least three problems with autocomplete in IE.
First, by default, apparently IE caches Ajax responses. That means if you
add a new item and then do a subsequent entry in the same browser session,
the new item will not appear in the autocomplete list because the list is
What's your code for sending error emails?
On Monday, June 13, 2011 9:06:07 PM UTC-4, LarryEitel wrote:
> I have verified SMTP works and sent email from server is received AND
> I have used same mail object in db.py to send a test message using:
>
> mail.send(to=['b...@bla.com'],
> subject='he
I am under the impression that production errors are automatically
sent.
On Monday, June 13, 2011 9:00:55 PM UTC-4, 黄祥 wrote:
>
> pardon, me, what's cid used for? is it mandatory to use trap?
> thank you so much.
>
All components (with or without ajax=True) are wrapped in a DIV, which is
given an id. You can specify the id via the 'target' argument to LOAD() --
if
On Monday, June 13, 2011 9:43:12 PM UTC-4, LarryEitel wrote:
>
> I am under the impression that production errors are automatically
> sent.
No, production errors are not emailed. Where would they be sent?
They are not emailed by default (in fact I'm not even sure exactly how to
have them emailed). They are always available
at: http://127.0.0.1:8001/admin/errors/MYAPP
Note, error tickets are stored in the application's 'errors' folder and are
viewable via the 'admin' application. See
http://web2py.com/book/default/chapter/03#errors.
On Monday, June 13, 2011 9:45:53 PM UTC-4, Anthony wrote:
> On Monday, June 13, 2011 9:43:12 PM UTC-4, LarryEitel wrote:
>>
>>
I'd be curious to see your XML processing code. Manipulating XML in Python
is pretty lame form what' I've seen so far.
be glad to... and I will freely admit to being dense :), but... I
don't know how to attach it here ;) Is there a trick? or if you send
me your email, I'll send with a usage sample.
Mart :)
On Jun 13, 9:48 pm, pbreit wrote:
> I'd be curious to see your XML processing code. Manipulating XML in Py
On Monday, June 13, 2011 10:16:15 PM UTC-4, mart wrote:
>
> be glad to... and I will freely admit to being dense :), but... I
> don't know how to attach it here ;) Is there a trick? or if you send
> me your email, I'll send with a usage sample.
If you use the newer "forum" interface at
http
well, well,... look at this! this is new to me! :)
so, you can dump the 3 attached files somewhere and run dfoTest.py and check
the output (a few comments in the script and some in the _dfo module). I
through in an xml file just for quick testing.
I have quite a few variations on this (some ha
My model file :
db.define_table('image',
Field('title'),
Field('file', 'upload'),
Field('description', 'text'),
Field('date', 'datetime', default=request.now),
Field('user', db.auth_user, default=auth.user_id),
Field('rating', default=0))
db.define_table('comment',
Field('ima
Ah, ok. I think you need to put your tables at the bottom, after
auth.define_tables()
so that the auth_user table is created before your tables.
I know I should change the title of this post.
I'm after Apache virtualhost config to handle multiple domains.
Googled quite-a-bit, haven't found an ideal solution. Anyone w/ an
example?
On Jun 13, 3:58 pm, pbreit wrote:
> Make sure to update to the latest stable version. At this time that would
Just to clarify: I'm after Apache virtualhost config to handle
multiple domains for web2py apps.
On Jun 13, 10:10 pm, Jason Schmidt wrote:
> I know I should change the title of this post.
>
> I'm after Apache virtualhost config to handle multiple domains.
> Googled quite-a-bit, haven't found an i
2011/6/13 davidrsmorris :
> The patched package only produces "deposit" in web2py folder.
> I then get the following fatal error message:
>
> Traceback (most recent call last):
> File "/usr/bin/web2py", line 87, in
> if not
> os.path.exists(module_web2py_applications):open(module_web2py_applic
web2py debian packages available in sid work perfectly in squeeze and
Ubuntu Lucid. You can use other manual methods to install web2py, but
using package management has obvious advantages in a Debian
distribution. You can download the packages manually and install them
using dpkg or gdebi.
2011/6
98 matches
Mail list logo