How about postgresql mysql? Can you quantify slower - by what %?
On Jun 30, 3:21 am, mdipierro mdipie...@cs.depaul.edu wrote:
I have done some tests in the past. On sqlite the like operator is
slow, slower then the join.
On 30 Giu, 01:38, weheh richard_gor...@verizon.net wrote:
I have
If the statement test=session.test is within a controller and
outside all defs, then it is global to that controller, but that's
all. It's not accessible to other controllers. It probably is visible
to the controller's views -- you'll have to check to be sure. However,
session.test is accessible
I built a comprehensive voice-controlled home automation system in
python a few years ago. I believe I could easily connect it to web2py
if I were so inclined.
On Jun 30, 9:14 am, mdipierro mdipie...@cs.depaul.edu wrote:
yes. Some people here use it to control robots. Do you have already
python
I'm able to access the web2py group no problem on IE (ugh). But
starting just recently, on Mozilla, I'm getting stuck in an infinite
loop. The tab displays, Redirecting constantly. The URL is:
I have a multilist that I want to populate from db.table:
rows=db(query).select(db.table.id,db.table.name)
db.table.multilist_field.requires=IS_IN_SET(
[r.id for r in rows],
labels=[r.name for r in rows],
)
Is there a better, more efficient way to do this rather
.
On Jun 28, 3:31 am, mdipierro mdipie...@cs.depaul.edu wrote:
db(db.auth_membership.group_id==group_id).count()
On 28 Giu, 00:42, weheh richard_gor...@verizon.net wrote:
What's the quickest way to get a count of users that are members of a
group?- Hide quoted text -
- Show quoted text -
In the appadmin/update/db/table form, if a field is an upload and an
image, then next to the upload field will be displayed [file|[]delete]
and below that the image will be displayed.
Is there a simple way to get SQLFORM to do this?
Obviously, I can insert the image into the form from within the
, Jun 28, 2010 at 10:49 AM, weheh richard_gor...@verizon.net wrote:
I have a multilist that I want to populate from db.table:
rows=db(query).select(db.table.id,db.table.name)
db.table.multilist_field.requires=IS_IN_SET(
[r.id for r in rows],
labels=[r.name for r
On Mon, Jun 28, 2010 at 10:32 AM, weheh richard_gor...@verizon.net wrote:
I'm able to access the web2py group no problem on IE (ugh). But
starting just recently, on Mozilla, I'm getting stuck in an infinite
loop. The tab displays, Redirecting constantly. The URL is:
https://www.google.com
What's the quickest way to get a count of users that are members of a
group?
if it receives a range
request from the client.
On Jun 24, 3:35 pm, weheh richard_gor...@verizon.net wrote:
Thanks! Makes sense. What method would you use to stream an mp3, ogg,
wav ... or other audio file? Also, could you clarify what the
filename argument represents -- is it the name you want
pm, weheh richard_gor...@verizon.net wrote:
Massimo, thanks for the app. I'm studying it.
From the doc, I'm not sure I get a crystal clear understanding of what
the web2py convention is.
Let's say my app lets you upload a music mp3 file, a file with a
description (liner notes
am, weheh richard_gor...@verizon.net wrote:
So where would I put text and mp3 files that are created by my system
(not uploaded) and available to end users subject to access control:
static or uploads? That doesn't seem to fall into any of your
conventional categories.
On Jun 24, 8:30
to embed a file, but it should be used to embed a
plugin. I have used a flash plugin for this purpose.
Here is an app to manage music files that you can use as example:
http://web2py.com/examples/static/web2py.app.music.w2p
Massimo
On Jun 22, 10:50 pm, weheh richard_gor...@verizon.net wrote
Yarko - if you are moderating this group, would you mind striking this
last post because it shows my raw email. Don't want to be spammed to
death.
On Jun 22, 11:34 pm, richard_gor...@verizon.net
richard_gor...@verizon.net wrote:
Continuing this old
On Jun 22, 11:34 pm, richard_gor...@verizon.net
richard_gor...@verizon.net wrote:
Continuing this old
thread:http://groups.google.com/group/web2py/browse_thread/thread/59b66b3a24...
Anybody know why the following code isn't working? I'm trying to
implement almost exactly what Massimo
Continuing this old thread:
http://groups.google.com/group/web2py/browse_thread/thread/59b66b3a24...
I'm having trouble getting an embedded mp3 from showing up in my web
page. I'm trying to implement this almost exactly as Massimo suggested
in the above thread. Anybody know why my code below
You can try custom forms, which gives you total control over the form.
Here's a link to the doc:
http://web2py.com/book/default/section/7/7?search=custom+form
On Jun 19, 8:05 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
use HTML Form ,
Check in Web2py Book , Section SQLForms near the end.
I'm uploading an image field using
Field('image','upload',label=T('Image'),autodelete=True,
uploadseparate=True,
requires=(IS_NULL_OR(IS_IMAGE()),IS_NULL_OR(IS_LENGTH(128000,10,
The field is uploaded using a factory, so the filename starts with
no_table.image...jpg
The file is
(
request.vars.name.file,request.vars.name.filename),
)
On Jun 16, 1:29 am, weheh richard_gor...@verizon.net wrote:
I don't think this will work since my factory is using multiple
tables.
I don't mean to digress, but another question is, how to open the file
during the onvalidation? I
='file_form'): # no
upload
check_file_in(file_form) # same as onvalidation
if not file_form.errors:
db.srcfile.insert(
name=db.srcfile.name.store(
request.vars.name.file,request.vars.name.filename),
)
On Jun 16, 1:29 am, weheh richard_gor
Find out the id or class of the radio buttons. Use firebug to see, or
look at the CSS Conventions section of the doc. You may need to
resort to a custom form, but I doubt it. Then set the css attribute:
display: inline; should probably do it. You may need to float the
first one ... not sure about
I find myself mostly defaulting to custom forms for anything that an
end user sees. For internal app admin stuff, I am usually happy with
whatever web2py produces automatically.
On Jun 16, 10:53 am, Johann Spies johann.sp...@gmail.com wrote:
On 16 June 2010 16:44, weheh richard_gor
# model
db.define_table('srcfile',
Field('name','upload',length=50,label=T('Upload
file'),autodelete=True,
uploadseparate=True,
requires=(
IS_UPLOAD_FILENAME(extension='pdf|txt|doc|htm|html|xml|ppt'),
IS_LENGTH(500,10))
),
)
# controller
...
Annet: just to be sure you understand ... to do a custom auth you
need:
from gluon.tools import *
auth=Auth(globals(),db)
auth_table=db.define_table(
auth.settings.table_user_name,
# required fields
Field('email',length=128,label=T('Email'),default='',unique=True),
,request.vars.name.filename),
)
On Jun 15, 11:02 am, weheh richard_gor...@verizon.net wrote:
# model
db.define_table('srcfile',
Field('name','upload',length=50,label=T('Upload
file'),autodelete=True,
uploadseparate=True,
requires=(
IS_UPLOAD_FILENAME(extension='pdf
):
request.vars.name.file.seek(0) ### add this line
db.srcfile.insert(
name=db.srcfile.name.store(
request.vars.name.file,request.vars.name.filename),
)
On Jun 15, 11:02 am, weheh richard_gor...@verizon.net wrote:
# model
db.define_table('srcfile',
Field('name
So I'm back to
filename=db.book.filename.store(request.vars.filename.file,request.vars.filename.filename).
Now it runs without errors, the destination file is properly created,
but it's contents are blank.
I believe you ought to be able to do that by setting labels in your
models and possibly using the XML() helper to encapsulate the labels
that have BR() in them.
On Jun 14, 2:14 am, Johann Spies johann.sp...@gmail.com wrote:
I would like to have multiline labels for fields in input forms. Is
it
+1 regarding Yarko's suggestion. Putting common code into modules is
probably the easiest way to have it visible to all controllers. It
seems a little kludgy at first, but you get used to it. The one thing
to be aware of is that models get executed in alphabetic order. So you
may want to stick a
equivalent) would be awesome.
On Jun 12, 4:20 pm, szimszon szims...@gmail.com wrote:
No because you can specify the location of uploaded material so it can
be on any filesystem, and uploadseparate work under uploadfolder to...
On jún. 12, 21:57, weheh richard_gor...@verizon.net wrote:
One more
I have a multiple form submission with a custom form.
#controller
form1=SQLFORM.factory(db.table,...)
form2=SQLFORM.factory(db.table,...)
...
if form1.accepts(request.vars,formname='form1',onvalidation=xyz):
... do something ...
if
I'm using the latest trunk stuff with the new uploadseparate
capability.
# model
db.define_table('book',
Field('filename','upload',autodelete=True,
uploadseparate=2,
requires=(
IS_UPLOAD_FILENAME(extension='pdf|txt|doc'),
IS_LENGTH(500,10))
)
#controller
You're right, uploadeseparate is True or False, but this has no impact
on what I'm having trouble with.
I tried this:
db.book[book_id.update(filename=db.book.filename.store(request.vars.filename))
This causes the no_table.filename/8a/no_table.name.8ae28bb9335txt
to attempt to be copied to
Yah, just typing here in this little box, not real cut and paste.
Original code was an INPUT helper, hence the commas.
One more thing is that after I copy the no_table.filename file to the
book.filename file, I want to delete the full path to the
no_table.filename file. Is there a convenient attribute somewhere with
the path to the original no_table.filename or do I have to reconstruct
it myself from the
I also came to the same conclusion that 2 chars, each in the range
[0-9][a-z][A-Z], is probably sufficient.
On Jun 10, 1:54 am, szimszon szims...@gmail.com wrote:
Patch sent with
path/table.field/uuid_key[:self.uploadseparate] in use where
self.uploadseparate == 2 :)
On jún. 9, 22:11,
OK, now that I've read thru szimson's code closely I think this is an
excellent general solution. It eliminates the need for what I used to
do, which was to add a user_id layer. The only additional thought I
have is that it might be nice to have a way to specify which
filesystem to store on, in
One more question -- doesn't this eliminate the need for
Field(...uploadfolder=pathname,...)? I suppose keeping the
uploadfolder parameter is a good thing to keep for anyone who wants to
use it for their own special purpose. But if the issue is about
storing a gazillion upload files for efficient
. That is ok until the database changes and
somebody edits the user_id. Than you can no longer locate the file.
On Jun 10, 7:36 am, weheh richard_gor...@verizon.net wrote:
I think I'm dealing with the same situation, however, I'm going about
it a little differently. I'm storing files
Massimo, Thadeus:
I'm need to study this carefully, but it sounds really great! I
already implemented a system months ago as per what I wrote above.
However, it seems like there is more native support, now, so I want to
re-implement. Is this thread the only documentation, or is there
something
I think I'm dealing with the same situation, however, I'm going about
it a little differently. I'm storing files in
uploads/users/user_id/filename
My user_id is a cypher of characters [A-Z][a-z][0-9] with a length
anywhere from 8 to 12 characters or so. The filename is another cypher
created
auth.user table
On Jun 4, 1:43 am, mdipierro mdipie...@cs.depaul.edu wrote:
which table?
On Jun 1, 1:42 am, weheh richard_gor...@verizon.net wrote:
I got the following ticket when trying to upload an image via the
appadmin:
Traceback (most recent call last):
File C:\web2py\gluon
Curious - I tried something like this earlier and had trouble with it.
For now, I like hamdy's solution.
On Jun 3, 4:33 am, annet annet.verm...@gmail.com wrote:
It's probably not the most elegant of solutions, but in db.py I simply
set:
if auth.is_logged_in():
Annet, as I state in my previous post, I had tried your approach
before first posting this thread and discovered it didn't work for
exactly the reasons that hamdy lists.
Massimo, thanks for the response, too. Looks like you are suggesting
exactly hamdy's solution, which I have implemented, and it
This is still an open issue for me. Please disregard my 2nd post as,
obviously, jQuery has nothing to do with it (just delirious at 4:55am)
as it is showing up in appadmin, which has no jQuery to speak of. In
my app, the upload field is embedded in a jQuery UI accordion, but I
can think of no
if web2py could run native on the Droid? Then, give me a foldup
keyboard and who would need a laptop any more?
I suppose there's no easy way to get your login message to say
something like this:
auth.messages.logged_in=T('Welcome ')+auth.user.username
Without fully customizing the login controller. Right?
Same goes for logout.
@hamdy.a.farag: swet. One of these days I have to memorize the
bazillion or so auth.settings.
On Jun 2, 12:53 pm, hamdy.a.farag hamdy.a.fa...@inbox.com wrote:
in your model add something like
def set_message(form):
session.flash = T('hello %(name)s', dict(name=auth.user and
sqlite
On Jun 2, 9:25 am, mdipierro mdipie...@cs.depaul.edu wrote:
what database system?
On Jun 2, 12:13 am, weheh richard_gor...@verizon.net wrote:
Massimo, now we're getting somewhere. Thanks. However, I ran into this
error:
Traceback (most recent call last):
File C:\web2py\gluon
I got the following ticket when trying to upload an image via the
appadmin:
Traceback (most recent call last):
File C:\web2py\gluon\restricted.py, line 178, in restricted
exec ccode in environment
File C:/web2py/applications/myapp/controllers/appadmin.py, line
410, in module
File
FWIW, the upload field is embedded in a jQuery accordion div. I was
researching some other threads about image upload problems and noticed
there was a jdiv problem. Could this be the same thing?
I'm trying to get the retrieve_password functionality working. I've
done all the mail setup, but when I select the retrieve_password link,
I get a flash Invalid reset password. I expected to get a form to
let me specify the target email account. Any ideas what's going on?
Nice shiny new download page. Also, I just tried the new install
script from within the web2py admin app and it works great! Thanks for
that -- makes upgrading installations much, much easier. That along
will surely save your user base a lot of time, cumulatively.
I see in gluon/tools.py that reset_password has been deprecated and
that retrieve_password will normally point to request_reset_password.
Should I consider retrieve_password to be deprecated?
Massimo, now we're getting somewhere. Thanks. However, I ran into this
error:
Traceback (most recent call last):
File C:\web2py\gluon\restricted.py, line 178, in restricted
exec ccode in environment
File C:/web2py/applications/myapp/controllers/user.py, line 144,
in module
File
I have Field('freq','integer',requires=IS_IN_SET(FREQS,zero=None)) as
part of a table.
FREQS={
0:'never',
900:'15 minutes',
1800:'30 minutes',
...etc.
}
I want to force the drop down to order ascending by the keys of FREQS.
Anyone know the syntax to do this in the Field declaration?
Things were going great with my new app, but then I seem to have
corrupted something and now I can't get my app running again. I'm
hitting this error:
Traceback (most recent call last):
File C:\web2py\gluon\restricted.py, line 178, in restricted
exec ccode in environment
File
Yah. I got it running, thanks. Had to go in thru the admin interface
to restart.
I think it's related, but I'm using your code from the custom
auth.login example. You wrote:
user=db.auth_user.insert(...)
session.auth=Storage(user=user,last_visit=request.now,expiration=auth.settings.expiration)
Excellent ... much cleaner.
On May 30, 5:59 pm, Thadeus Burgess thade...@thadeusb.com wrote:
oh... yes.
Your right... Storage(user=db.auth_user[user]... should fix it.
--
Thadeus
On Sun, May 30, 2010 at 4:56 PM, weheh richard_gor...@verizon.net wrote:
Yah. I got it running, thanks. Had
Closed
OK Thadeus Massimo,
I agree now that you're right that the way to do it is as you showed
using SQLFORM.factory and then a custom form. Then do my own form
validation etc. and forget using the default registration code.
Doing the custom controller is the same as any other controller and
gives
OK, this is reopened. It doesn't seem to matter whether the passwords
are the same or different. If different, no error message is flashed.
If same and the other fields entered correctly, the form doesn't seem
to submit, the db isn't updated, and the page redirects right back to
register again.
@mdp: It isn't obvious to me how to mix the auth code with
SQLFORM.factory and accept. The problem is that auth is such a black
box that I don't know where to break into the flow of it.
I believe this issue has come up enough times and been such a
consistent stumbling block that I suggest you or
@Thadeus: Thanks buddy. Appreciate it. As I suspected, it's got some
complexity behind it and the total solution, including emailing, etc.
takes a little doing.
I'm going to rethink how I'm approaching this. I think the right thing
to do is to leverage the underlying web2py infrastructure for
@mdp: Consider me in.
I agree with the toolset. I am moving from YUI to jQuery and the move
has gone well. I still use YUI to reset the grid.
I've already worked with a chosen few web2py-ers on various consulting
gigs. I thought the interactions were very positive and would like to
work with
Yes, I know this thread has bounced around here before. But I'm still
stuck ...
I'm building a custom registration page. I think I'm getting hung up
on the password_two field, like everyone else.
Here's my code:
#controller
def register():
active for a long time (at least one day). But now
that you mention this, I should check this behaviour thoroughly.
On May 21, 5:13 pm, weheh richard_gor...@verizon.net wrote:
Why don't you just keep a last_activity date? Also, the auth event log
keeps track of the last login automatically
There used to be a way to delete a post. I don't see it anymore.
Gr.
Anyway, ignore this message. I think I found the problem:
INPUT(_type='password',name='password_two',_id='password_two'),
should really be:
INPUT(_type='password',_name='password_two',_id='password_two'),
Anyway,
Why don't you just keep a last_activity date? Also, the auth event log
keeps track of the last login automatically. Why not check it to see
what it's doing regarding last login when user has the remember
checkbox checked? Technically, if it's checked, they're not logging
in, right? Can you better
LOL ... holy cr-p! That's great MDP! There is so much new stuff, I
can't keep up.
On May 21, 12:32 am, mdipierro mdipie...@cs.depaul.edu wrote:
yes.
from gluon.sqlhtml import AutocompleteWidget
db.define_table('mytable',
Field('person',db.person,requires=IS_IN_DB(db,db.person.id,'%
@mdp: thanks for the clarification. I like having 1 way of doing
things, which is why I dumped perl years ago. Perhaps IS_NULL_OR
should be officially deprecated?
My point with the book is that the information is already there, but
scattered and hard to find.
+1
Jonathan: Is this something new? Isn't this the way to do it?
IS_NULL_OR(IS_URL())
OK, I'm seeing IS_EMPTY_OR in the online doc. Sorry, I've been away
from my desk for a few weeks. Is IS_NULL_OR deprecated? (Or does it
depend on what the meaning of IS is? ;^)
On May 13, 12:00 am, weheh richard_gor...@verizon.net wrote:
Jonathan: Is this something new? Isn't this the way to do
Interesting observation, Thadeus. Who knows how accurate, but it
resonates with me. According to one of the Django developers, Django
was designed with the notion that designers and engineers don't mix,
so the templating language and syntax are different from the server-
side db interface and
Have you tried
table.field.readable=table.field.writable=False
prior to form=crud...?
This should disable the display and update of the specified fields.
On May 2, 12:17 pm, Sverre sverreodeg...@gmail.com wrote:
Is it possible to generate a form with crud only with some fields of a
table?
@mdmcginn: you are correct in stating that hidden fields, if used to
try to trick the webcrawler, can lead to a web ranking penalty. Thanks
for clarifying.
I believe I read somewhere that web crawlers ignore hidden fields.
I also believe I read somewhere that having a URL that says something
in plain English is up there with the title in terms of SEO. In other
words, use a RESTful URL with the various parts including your
keywords so that it is
Seems like a lot of really nice stuff, but are the browser ready for
it, yet? A lot of the presentation didn't display properly or work
properly in Firefox, from what I could tell. And IE 8 couldn't display
it at all. What do you think, Massimo -- is it ready for prime time?
On Apr 17, 3:47 pm,
Good stuff, Thadeus. Thanks.
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com.
For more options, visit
You need a left outer join. Here are a couple of examples that I think
should work (caveat: I didn't test them):
#way1
qry1=((db.t2.f22==db.t1.id) (db.t1.f12==10))
rows = db(qry1).select(db.t2.ALL)
#way2
qry1=(db.t1.f12==10)
leftjoin=db.t2.on(db.t2.f22==db.t1.id)
Thadeus, it's 6 of one, half-dozen of the other to me. I use both. So
in theory, it doesn't really matter which is the default. Therefore, I
prefer that the default remain whatever it currently is so that I
don't have to change any of my code.
--
You received this message because you are
OK. As a matter of fact, I've already done that, Massimo. The issue
that I'm facing is a semantic one.
auth_group now stands for 2 things. In one case, it's roles for
administrators and other users. In another case, it stands for a CIG.
So let's say a CIG has a physical address and telephone
.
On Mar 18, 9:48 am, weheh richard_gor...@verizon.net wrote:
OK. As a matter of fact, I've already done that, Massimo. The issue
that I'm facing is a semantic one.
auth_group now stands for 2 things. In one case, it's roles for
administrators and other users. In another case
Sorry, hamdy, but I don't think you answered the question. I have read
the doc many times and understand how to operate groups, memberships,
and permissions. The question is about structure.
Consider the following situation. Users can register with the site.
Users can create common interest
I'd like to build an app that has typical social networking
capabilities. It seems as though auth_group and auth_membership have
exactly the kind of functionality that one would like to apply to such
things as making a user a member of a common interest group. In such a
case, referring to the
The approach is sound. Devil is in the details, as usual. As for the
rest of your question, it is a python, and not a web2py, issue. Read
carefully the python doc on datetime. datetimes can be compared and
you can add and subtract them. You can also create a datetime variable
and set it to a
- Scheduling and resource allocation
- Membership management
- Website CMS
- CRM
- Photo gallery
- Some secret stuff ...
Web2py rocks. But please don't say too many good things about it. It's
our secret weapon and we want it all for ourselves. ;^)
--
You received this message because you are
Alright, forget the cron job. Whenever a vote comes in, compute
percentage, check to see if voting is done and set permissions.
On Mar 8, 2:43 am, Álvaro Justen [Turicas] alvarojus...@gmail.com
wrote:
On Mon, Mar 8, 2010 at 02:31, weheh richard_gor...@verizon.net wrote:
Seems like a straight
Why does this work:
db.auth_membership.user_id.readable=db.auth_membership.user_id.writable=False
but this doesn't?
db.auth_membership.user_id.writable=False
-
Also, why doesn't this work?
#controller
user=db(db.auth_user.id==int(request.args(2))).select().first()
...
return
Also, why doesn't this work?
#controller
user=db(db.auth_user.id==int(request.args(2))).select().first()
...
return dict(user=user, ...)
#view
{{=user.id}}
If I change the variable user to name, then the statements above
seems to work. Is user a keyword?
--
You received
Thanks, Mr. Freeze. I'll check it out. I'm still relatively naive, so
I'm curious how a jquery multi-select is different from the plugin
multi-select and why would it be better?
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this
OMG, if this is what I think it is, this is awesome. I have been
telling all my doctor and government friends that the Obama admin is
making a mistake in spending $B to subsidize EMR since, with web2py, I
think EMR can be practically for free. Privacy becomes a non-issue
because you can put
I'm building an admin interface to auth_membership. With
auth_membership, a user can belong to multiple groups. The standard
form made by crud.update from the auth_membership table is a 2
pulldown affair. This is cumbersome to use when there are many users
and many groups. It takes too many user
Has anyone done a drag and drop plugin for web2py? Or can anyone
recommend a drag and drop jQuery that works well?
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from
Is there a problem with web2py's postgresql implementation of like?
I'm using Mr. Freeze's excellent autocompletion code, which uses a
query with like: db(db.table.field.like('xyz%'). It works with sqlite,
but not with postgresql. I'm not familiar enough with postgresql or
the web2py
Mr. Freeze's code says ...
q = request.vars.q
f = request.vars.field
t = request.vars.table
rows = db(db[t][f].like(q+%)).select(db[t]
[f],distinct=True,orderby=db[t][f])
The problem is this works with sqlite but not with postgresql. Yarko,
I'd read the postgreql doc before and
Hi Mr. Freeze, this seems to work, now. Thanks!
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com.
For
+1
On Mar 5, 11:19 pm, mr.freeze nat...@freezable.com wrote:
Idea: tweak 10 (or more) of the best gpl css templates we can find to
work with web2py and give people a choice of templates when they
create an app. Also, change admin to use one of these. I think the
welcome and admin apps look
801 - 900 of 1400 matches
Mail list logo