What's the quickest way to get a count of users that are members of a
group?
OK I downloaded the trunk and tested this mod.
myParent = db.ParentTable.insert(name='Bill')
myParentNativeRef = myParent._table._last_reference
works
Thanks again.
On Jun 27, 3:28 pm, mdipierro wrote:
> > Maybe just add a new property dynamically to the row
> > We could call it 'nati
Correction upon actually testing code in trunk:
myParentNativeRef = myParent._last_reference # This uses
Massimo's mod in the trunk...
should be:
myParentNativeRef = myParent._table._last_reference # This uses
Massimo's mod in the trunk...
On Jun 27, 6:03 pm, dlypka wrote:
> # NOTE: I have *
On Sun, Jun 27, 2010 at 23:51, dlin wrote:
> About the Q1, I know that web interface. But, I'm wonder why not
> provide direct file edit? That's will let my version control system
> easier to track and view the differences. And I can use my editor to
> global replace.
>
> About the Q2, if the s
About the Q1, I know that web interface. But, I'm wonder why not
provide direct file edit? That's will let my version control system
easier to track and view the differences. And I can use my editor to
global replace.
About the Q2, if the sentences is similar, why not reduce them?
Q3: Sometime
whatever condition you choose, and however you decide to implement
what you want, the readable attributes will help you accomplish what
you want. You can search for more information here:
http://web2py.com/book/default/section/6/4?search=readable
On Jun 27, 7:59 pm, Giuseppe Luca Scrofani
wrote
thx
I do this know and it is much better than from appadmin:
auth.settings.register_onaccept=lambda
form:auth.add_permission(auth.user_group(form.vars.id),'create','ctm_table1')
maybe this is why no one encountered this so far - everyone is doing
all this stuff automatically
although the workarou
I don't have a profile controller, just the default user():
I have to create a profile(): def in default.py and set this option in
this new def?
Thanks for answering :)
> db.auth.myfield.readable = False
>
> In your profile controller, set it to True;
db.auth.myfield.readable = False
In your profile controller, set it to True;
On Jun 27, 6:34 pm, Giuseppe Luca Scrofani
wrote:
> Hi all, as subject I have to make a custom field of auth.user visible
> only in profile form but not in register form. There is an option to
> make this happen?
Hi all, as subject I have to make a custom field of auth.user visible
only in profile form but not in register form. There is an option to
make this happen?
Thanks for the detailed instructions - will do.
On Jun 27, 6:19 pm, Yarko Tymciurak
wrote:
> On Jun 27, 4:36 pm, dlypka wrote:
>
> > Great. Thanks so much!
>
> > However, I've never accessed the 'trunk' before.
>
> > I don't think I have access.
>
> You do - it's distributed SCM - you have read-
On Sun, Jun 27, 2010 at 12:23 PM, Massimo Di Pierro wrote:
> hmm... I think no but you can edit web2py.py and add options to sys.args
>
That will work -- thanks!
-- Pat
> On Jun 27, 2010, at 12:32 PM, ptressel wrote:
>
> I'd like to disable cron without use of a command line option. This is
On Jun 27, 4:36 pm, dlypka wrote:
> Great. Thanks so much!
>
> However, I've never accessed the 'trunk' before.
>
> I don't think I have access.
You do - it's distributed SCM - you have read-only access
>
> Do I need to do a get from Mercurial source control?
>
> I have WING IDE, which I believe
# NOTE: I have *NOT* tested the following code
# because this is greatly simplified from my actual code,
# so some debugging may be necessary to get it to work
#
# The following assumes that gql.py has been modified to add a
statement to method
# insert():
# add a new statemtent b
Great. Thanks so much!
However, I've never accessed the 'trunk' before.
I don't think I have access.
Do I need to do a get from Mercurial source control?
I have WING IDE, which I believe supports Mercurial.
On Jun 27, 3:28 pm, mdipierro wrote:
> > Maybe just add a new property dynamically to
Tomorrow I'll try it out with the standard port on a non-SMP system
and with a manually compiled non-threaded version of Python on a SMP
system. I think the problem lies with the standard threaded version
and the SMP host.
On Jun 27, 9:29 pm, mdipierro wrote:
> thanks for letting us know. If you
It is not a migration issue. Your tables are created and I am sure
they do appear in appadmin. The problem is that the line
table.table_name.requires = IS_IN_SET(self.db.tables)
is wrong because self.db.tables it is evaluated BEFORE web2py sees
that your tables are defined. A temporar
THE PROBLEM IS ABOUT APPADMIN AND RENDERING DEFAULT CRUD ON
AUTH_PERMISSION TABLE.
to reproduce:
1: initialize new app
2: add a table in db.py
3: go here: http://127.0.0.1:8001/app/appadmin/insert/db/auth_permission
and check whether you can assign permissions to your new table in
dropbox(table na
Anybody opposed to this change?
Massimo
On Jun 27, 12:33 pm, Jose wrote:
> Replacing this:
> self._db._execute('SELECT @@IDENTITY;')
>
> whit:
> self._db._execute("SELECT IDENT_CURRENT('%s');"%self._tablename)
>
> for me it worked in a SQLServer 2000 server I do not know for other
> versions of
thanks for letting us know. If you find a solution keep up posted.
On Jun 27, 12:30 pm, ScOut3R wrote:
> Dear mdipierro,
>
> I think it's an error related to OpenBSD or OpenBSD's port of python.
> I've tested the app on Debian and it handles the ajax() function well,
> without any problem.
>
> On
> Maybe just add a new property dynamically to the row
> We could call it 'nativeRef'
>
> Would it be something like:
> self.nativeRef = tmp # Python can add new properties 'on-the-fly',
> right?
>
> as the new 2nd last statement of insert()?
If that is useful we can do it. I just did it
Ah that makes a lot more sense, I should not code tired. I also tried
out IS_EQUAL_TO() and works like a charm. Thanks.
On Jun 27, 3:31 am, mdipierro wrote:
> IS_EXPR('value==repr(request.vars.password)',
>
> should be
>
> IS_EXPR('value==%s' % repr(request.vars.password),
>
> Anyway, this seem
Replacing this:
self._db._execute('SELECT @@IDENTITY;')
whit:
self._db._execute("SELECT IDENT_CURRENT('%s');"%self._tablename)
for me it worked in a SQLServer 2000 server I do not know for other
versions of SQLServer.
With SELECT SCOPE_IDENTITY() there was an error because it was not
recognized
Dear mdipierro,
I think it's an error related to OpenBSD or OpenBSD's port of python.
I've tested the app on Debian and it handles the ajax() function well,
without any problem.
On Jun 25, 11:56 am, mdipierro wrote:
> can you try 1.79.2?
>
> Massimo
>
> On Jun 25, 4:52 am, ScOut3R wrote:
>
>
>
I thought that IS_IN_DB() could do all the heavy lifting, searching by
gae keys instead of integers and updating references. That way we
wouldn't lose SQLFORM and the api would be the same on both on SQL and
GQL.
But i'm drifting, your explanations are great and when you tell us the
last part of t
Thanks this little dirty trick its exactly what I needed :D
I am not sure what functionality is being requested to add GAE
specific support to
IS_IN_DB.
My discussion has been about high performance links from parent to
children.
What native GAE object(s) would you need to check in IS_IN_DB ?
Anyway, one nice to have patch would be to have insert() return
yes
nocron = True
On Jun 27, 11:05 am, ptressel wrote:
> I'd like to disable cron without use of a command line option. This
> is for testing -- I'm running with pychecker and am not starting
> web2py from the command line. So I can't use -N...but I also can't
> use --config. Is there any ot
On 27 jun, 12:51, mdipierro wrote:
> should we consider this a bug and use
>
> SELECT SCOPE_INDETITY()
>
> ?
I do not know MSSQLServer, especially regarding the different
versions. Here [1] there is another alternative: SELECT IDENT_CURRENT
('tablename');.
Someone who knows more about you can
I'd like to disable cron without use of a command line option. This
is for testing -- I'm running with pychecker and am not starting
web2py from the command line. So I can't use -N...but I also can't
use --config. Is there any other way to specify options, or an
options file? Thanks!
-- Pat Tr
I will wait for a patch from Dave. He knows more than I know about
this.
Massimo
On Jun 27, 10:44 am, Carles Gonzalez wrote:
> One word: WOW!
>
> I look forward to the next message, this way gae is really appeling.
> And your way of teaching is fun, really!.
>
> Moreover, Massimo, can't this met
should we consider this a bug and use
SELECT SCOPE_INDETITY()
?
On Jun 27, 9:39 am, Jose wrote:
> On 27 jun, 09:42, mdipierro wrote:
>
> > Those errors are fine. request.vars.id is a Reference field to the
> > newly created record. It can be converted to int and treated as a int
> > but it is
One word: WOW!
I look forward to the next message, this way gae is really appeling.
And your way of teaching is fun, really!.
Moreover, Massimo, can't this method be the default behaviour to
IS_IN_DB when running on gae?
I't seems a good fit. Just my 2 cents.
On Sun, Jun 27, 2010 at 4:36 PM, dl
On 27 jun, 09:42, mdipierro wrote:
> Those errors are fine. request.vars.id is a Reference field to the
> newly created record. It can be converted to int and treated as a int
> but it is not a int. response.flash should be a string or a helper. If
> you pass a Reference without converting to in
Assuming you have
try:
from gluon.contrib.gql import * # if running on Google App
Engine
except:
db=SQLDB('sqlite://storage.db') # if not, use SQLite or
other DB - Used by T2
datastoretype = 'SQL'
else:
db=GQLDB() # connect to Googl
d
On Jun 27, 7:55 am, dlin wrote:
> Q1. Languages file is not easy to edit by editor directly, because it
> translate the utf-8 into backslash numbers. I think the translate
> application should write out directly code instead of blackslash
> number.
Update the translation using the admin / web i
Q1. Languages file is not easy to edit by editor directly, because it
translate the utf-8 into backslash numbers. I think the translate
application should write out directly code instead of blackslash
number.
I've translated some zh-tw language sentences of welcome, could anyone
help me to check
Those errors are fine. request.vars.id is a Reference field to the
newly created record. It can be converted to int and treated as a int
but it is not a int. response.flash should be a string or a helper. If
you pass a Reference without converting to int, it will cause the
problems below.
The trig
On 27 jun, 06:23, mdipierro wrote:
> web2py does not generate those numbers, the database does. Check what
> is in record 263227
Thank Massimo
Yes, I know. But if I look from the database administrator of web2py,
the IDs are correct.
Let's see if the following helps.
I tried another table an
something like this
def youraction():
import shutil
if form.vars:
filename=request.vars.upload.filename
file=request.vars.upload.file
shutil.copyfileobj(file,open('path/'+filename,'wb'))
return dict()
but mind that open('path/'+filename,'wb') is vulnerable to
Hi,
how do I upload a file in web2py without using SQLFORM ?
So far, I've got my view with a HTML form:
Now, how do I write a controller, which uploads the file and save's it
to a specified folder?
But everytime I select a file and upload it, request.vars.upload is
None. How d
IS_EXPR('value==repr(request.vars.password)',
should be
IS_EXPR('value==%s' % repr(request.vars.password),
Anyway, this seems to come up a lot, so I added a new validator in
trunk:
IS_EQUAL_TO(request.vars.password)
Please give it a try.
On Jun 27, 1:52 am, Alastair Medford
wrote:
> Alri
web2py does not generate those numbers, the database does. Check what
is in record 263227
On Jun 26, 9:09 pm, Jose wrote:
> The id returned in the testing are:
> 263226
> 263228
> 263230
> 263232
> 263234
> ...
>
> It is seen that increase in twos. If I go from the admin, the IDs are
> correct.
form generates a ... so you should insert an empty row,
not a BR You can try this:
form= SQLFORM(db.example)
form.append(SCRIPT("jQuery('#example_three__row').after('')"))
On Jun 26, 6:16 pm, Giuseppe Luca Scrofani
wrote:
> Hi, something like this is possible? Automatic generation of forms by
>
44 matches
Mail list logo