Found the answer: orderby is supported.
IS_IN_DB(dbset, field, orderby='mytable.myfield', ...)
On Apr 24, 8:31 am, niknok wrote:
> Thanks. But I guess I did not explain myself properly.
>
> I would like the list to display the titles, but sorted by say the ID
> field, or another field.
>
> Right
My 0.01 dollar opinion.
Two weeks after trying it out, I've had it. It's actually nice except
for the crashes - which I get lots of. So, I lose the code I'm trying
out. Its auto-completion doesn't even help redeem it. I'm back to the
robust iPython shell, now with ipdb installed, it gives iPyt
I have the following:
db.profile.citizenship.requires=IS_IN_DB(gdb,'country.iso2',
'%(name)s',multiple=True,zero=None)
It works fine until I try accessing the record from appadmin (I can view
the table, it fails when I view a specific record), which dumps me this:
Traceback (most recent call
a, i c, thank you very much for your pointer, massimo.
On Sun, Apr 24, 2011 at 11:59 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> you could use
>
> default=request.client
>
> mind that it is not guaranteed because it can be spoofed when behind a
> proxy.
>
> On Apr 23, 11:42 pm, S
a, i'm quite understand right now, thank you very much for your suggestion,
massimo.
On Sun, Apr 24, 2011 at 12:00 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> You can manually set
>
> development = True or False
>
> or use any other condition you like.
>
>
> On Apr 23, 11:46 pm,
You can manually set
development = True or False
or use any other condition you like.
On Apr 23, 11:46 pm, Stifan Kristi
wrote:
> thank you so much for your pointer, massimo. a, i c, so that i must use the
> different table and different ip for the different environment, and describe
> it on t
you could use
default=request.client
mind that it is not guaranteed because it can be spoofed when behind a
proxy.
On Apr 23, 11:42 pm, Stifan Kristi
wrote:
> thank you so much for your suggestion, massimo, pardon, before, i've used
> that code (refered from the book), but, it seems, that web2p
thank you so much for your pointer, massimo. a, i c, so that i must use the
different table and different ip for the different environment, and describe
it on the models (0.py or db.py).
is it possible to use it in 1 ip? i mean for dev, testing and staging i use
1 ip (127.0.0.1:8000)
thank you ver
thank you so much for your suggestion, massimo, pardon, before, i've used
that code (refered from the book), but, it seems, that web2py had already
this function so that i used web2py function. i mean, i want to add
created_from field that have default value ip address where the user submit
the for
I usually in db.py or in 0.py
development = request.env.host_name==''127.0.0.1:8000'
if development:
db=DAL('sqllite://development.sqlite')
...
else:
db=DAL('mysql://')
On Apr 23, 11:30 pm, 黄祥 wrote:
> hi,
>
> is it possible to separate the different environment like
You can make your own
signature = db.Table(db,'auth_signature',
Field('is_active','boolean',default=True),
Field('created_on','datetime',default=request.now,
writable=False,readable=False),
Field('created_by',auth.settings.table_user,default=auth.user_id,
writ
hi,
is it possible to separate the different environment like in ruby on
rails? i mean, i want to make different environment for my dev
application, test application, staging application and live
application.
any hint, pointer, suggestion is greatly appreciate. thank you very
much before
hi,
is it possible to modified auth.signature? actually, i want to insert
created_from and update_from that contain default ip address which is
the table is inserted or updated.
any pointer, hint, or suggestion is highly appreciate, thank you very
much in advance
This should be solved in latest trunk. Can you confirm?
We are testing a new import mechanism.
On Apr 23, 12:20 am, blackthorne wrote:
> hi
>
> trying to solve a problem that emerged when I moved my app from an
> older (v1.92) installation to latest.
>
> Here is the error:
> File "/Users/blackt
I do not understand. :-(
On Apr 23, 7:32 pm, niknok wrote:
> **bump**
>
> Anyone?
>
> On Apr 23, 3:17 pm, niknok wrote:
>
>
>
>
>
>
>
> > I have a field regex which contains requires segements like "IS_MATCH('^
> > \d{3}-\d{4}-\d{4}-\d{1}?$')" in an administrative table
>
> > I store them as as
Is this the latest trunk?
On Apr 23, 9:54 pm, Jose wrote:
> Hi
>
> I edited the shell.py file add raise to see that error occurred when
> trying to use bpython
>
> if bpython:
> try:
> import bpython
> bpython.embed(locals_=_env)
>
Are you using apache as a proxy? Is rocket serving the images behind a
proxy?
On Apr 23, 10:47 pm, Bruno Rocha wrote:
> I have similar problem with Apache + Nginx running on webfaction, I did not
> figure out how to make apache serve images, I already did everything on
> apache config.
>
> I have
I have similar problem with Apache + Nginx running on webfaction, I did not
figure out how to make apache serve images, I already did everything on
apache config.
I have the same problem on CursoDePython.com.br, NatalAnimal.com.br and
SerafimNatural.com.br (which has a photoGallery). Sometimes ima
This is probably a problem with Rocket. I had a similar problem, but
it vanishes when the app is deployed with Apache2/nginx.
On Apr 23, 9:28 pm, Philip wrote:
> I'm building a photo gallery site and my images are only partially
> loading. Currently I'm just running it from my computer, and if
Try this to convert that inner tuple into a dict the row[0][0] but with a
name for your field - makes your code more readable (to me anyway):
rows = db.executesql("SELECT count(1) as the_count FROM autos WHERE
autos.out=?", ('T'), True) #moved the ='T' into a parameter
print rows[0]['the_count']
Hi
I edited the shell.py file add raise to see that error occurred when
trying to use bpython
if bpython:
try:
import bpython
bpython.embed(locals_=_env)
return
except:
raise
I'm building a photo gallery site and my images are only partially
loading. Currently I'm just running it from my computer, and if I
view the site from there the images load fine, but if I use another
computer they only load partially. Usually they load the first 128kB
and then stop, although I h
I pulled class MyAuth(Auth): def navbar(self, prefix='', action=None): into
my project so I could customize it. The make sure to: auth =
MyAuth(globals(),db)
**bump**
Anyone?
On Apr 23, 3:17 pm, niknok wrote:
> I have a field regex which contains requires segements like "IS_MATCH('^
> \d{3}-\d{4}-\d{4}-\d{1}?$')" in an administrative table
>
> I store them as as Storage types and then retrieve and apply it to a
> Form like this:
> Field('f4', req
Thanks. But I guess I did not explain myself properly.
I would like the list to display the titles, but sorted by say the ID
field, or another field.
Right now, I do it like label='%(id)s%(title)s', but I'd like to
display it without the ID. I hope this makes sense.
On Apr 23, 10:30 pm, DenesL
Thanks - they do work together; for example each ticket is linked to
one requirement. I'm just wondering how to scale it:
component is part of a project
requirement applies to one component
ticket addresses one requirement
test plan written for each ticket
multiple test steps per test plan
multip
I think I fixed this in trunk. Please give it a try.
On Apr 19, 12:40 am, Luis Díaz wrote:
> when using the autocomplete widget
>
> and the system throws me at least 2 output options,
> the list is presented so small that it is impossible to use.
>
> the solution is:
> in base.css
>
> /*
> input[
:-)
On Apr 23, 2:57 am, Bruno Rocha wrote:
> Pessoal,
>
> Desculpem a propaganda no grupo, mas gostaria de avisar a respeito do
> CursoDePython.com.br
>
> Trata-se de um programa de treinamento em Python e web2py.
>
> O treinamento acontecerá em algumas datas em SP no modelo presencial, e
> fina
On Saturday, April 23, 2011 3:47:17 PM UTC-4, Anthony wrote:
>
> Second, I would like to get read of the "Welcome " message
>> next to the logout buttons.
>> I tried looking into the auth code and couldn't see where this was
>> easily possible. For example I don't understand how to make my own
I have a virtual field attached to the auth_user table titled "name"
that renders the user's name with certain formatting based on auth
membership. I also have records in a second table that are linked to
the auth_user table. When I fetch these rows I can access the virtual
as expected:
row.spea
On Saturday, April 23, 2011 1:40:09 PM UTC-4, encompass wrote:
>
> I would like to make a drop down with the email and password option
> there... similar to the way that twitter does it. Is this easily possible?
auth.login() generates the login form -- I suppose you could return that
from yo
Looks like I could put it to work just defining the "formname" variable on
form.accepts... so I've removed this patch to test and also work...
So the solution to multiple forms using LOAD is to define a formname... I
guess...
On Sat, Apr 23, 2011 at 4:28 PM, Tito Garrido wrote:
> Hi selecta,
>
Hi selecta,
Thanks for the quick response... I was debugging with firebug and this is
what I got:
so the type is correct... but I can't see the attribute... after I click on
submit I can see the "was_clicked_to_submit" appearing on firebug and then
it disappear...
on the view I'm using a custom
what did not work? what is should do is add a click event to each
submit button and add a special property onclick
$("[type=submit],[type=image]", this).click(function(e){ $
(this).attr("was_clicked_to_submit","YES"); });
if the form is submitted it searches for that property
(was_clicked_to_submit
+1 !
On Tue, Apr 19, 2011 at 2:40 AM, Luis Díaz wrote:
> when using the autocomplete widget
>
> and the system throws me at least 2 output options,
> the list is presented so small that it is impossible to use.
>
> the solution is:
> in base.css
>
> /*
> input[type=text], input[type=password], s
Hi!
Is there a way to customize the autocomplete widget? Is there a css file?
Regards,
Tito
--
Linux User #387870
.
_/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___
I would like to make a drop down with the email and password option
there... similar to the way that twitter does it. Is this easily possible?
Second, I would like to get read of the "Welcome " message
next to the logout buttons.
I tried looking into the auth code and couldn't see where this was
and another:
[(10,)] - is a list of tuples :)
but it is nicer if you have models (you can generate them from database
tables)
print db(db.autos.out=='T').count()
rows = db.executesql("SELECT count(1) FROM autos WHERE autos.out='T'",
as_dict=False)
print rows[0][0] #first row then first column
I use a piece of code like this in controller:
ccc=db.executesql("SELECT count(*) FROM autos WHERE autos.out='T';")
And there is a result in a view:
[(10,)]
So, I want to have only digits in result without [(,)]. How can deal
with it?
Hi selecta,
I've tried your patch and didn't work for me... I'm having the same
problem... with 2 LOAD forms the submit behavior is intermitent.
Regards,
Tito
On Sat, Apr 23, 2011 at 3:57 AM, Tito Garrido wrote:
> Wow! I just posted a message about this problem... +1 !
>
> I'm using 2 forms w
Oh My god, I do not have windows for testing it on I.E, I have to put some
conditional control on CSS.
Thank you Anthony.
( Maybe I will redirect the user to Chrome page when using i.E.. LOL )
2011/4/23 Anthony
> Very nice site. Just added it to http://web2py.com/poweredby.
>
> Note, in IE8, t
Thanks you Martin,
Thats about a Python and web2py online training course.
[ Sorry, I sent a portuguese message to the English group ]
2011/4/23 Martín Mulone
> Great page, go on with this project bruno!.
>
> 2011/4/23 Bruno Rocha
>
>> Pessoal,
>>
>>
>> Desculpem a propaganda no grupo, mas
Yes, use the label parameter e.g.
IS_IN_DB(dbset, field, label='%(title)s', ...)
On Apr 23, 8:59 am, niknok wrote:
> Is there a way to sort the list generated by IS_IN_DB by another field
> other than the one formatted for display?
>
> Thanks.
>
> /r
> Nik
great site...
2011/4/23 Anthony
> Very nice site. Just added it to http://web2py.com/poweredby.
>
> Note, in IE8, there are some weird font display problems (see attached
> screenshot). Also, I'm not sure if this is intended, but the Facebook and
> Twitter buttons look like they're being cut off
Euro Python
http://ep2011.europython.eu/
I cannot go but it would be nice to submit a proposal for a web2py talk. If
needed I can help with slides.
Massimo
Is there a way to sort the list generated by IS_IN_DB by another field
other than the one formatted for display?
Thanks.
/r
Nik
Is there a way to sort the list generated by IS_IN_DB by another field
other than the one formatted for display?
Thanks.
/r
Nik
I have a field regex which contains requires segements like "IS_MATCH('^
\d{3}-\d{4}-\d{4}-\d{1}?$')" in an administrative table
I store them as as Storage types and then retrieve and apply it to a
Form like this:
Field('f4', requires=IS_EMPTY_OR(settings.regex[4]))
In a model file, it's defi
hey,
call me old fashioned guy, I was wondering if I can switch the current
theme of the web2py administration app to the old blue and orange
theme that I loved so much. Is there any control for this other than
rebuilding views in css?
Thank you
Best regards
Great page, go on with this project bruno!.
2011/4/23 Bruno Rocha
> Pessoal,
>
>
> Desculpem a propaganda no grupo, mas gostaria de avisar a respeito do
> CursoDePython.com.br
>
> Trata-se de um programa de treinamento em Python e web2py.
>
> O treinamento acontecerá em algumas datas em SP no mo
Python 2.5, MySQL 5.1, OS Windows XP, many different PC's tried both
source code version and Windows version of web2py, 1.94.6; same thing
on Debian with packed Linux installation...
I am experienced web2py user, until this week used version 1.82 all
the time and this Friday updgraded... I am stuc
Pessoal,
Desculpem a propaganda no grupo, mas gostaria de avisar a respeito do
CursoDePython.com.br
Trata-se de um programa de treinamento em Python e web2py.
O treinamento acontecerá em algumas datas em SP no modelo presencial, e
finalmente em Junho iniciaremos o curso à distância totalmente o
54 matches
Mail list logo