Yeah, I'm pretty sure I'm logged in. It shows "welcome" at the top and if I
click on "state" I can see auth_user.id=5.
I switch between SSL and non-SSL for /user and not-/user. I wonder if that
could be a problem?
what's the best way to define a minimal list of fields that I want to
repluicate in some tables?
I thought to define a table but as I need it only to be used inside
other tables I don't need it's really created in my db... and I don't
want it... is it possible?
thanks a lot
Manuele
Like this?
http://web2py.com/book/default/chapter/06?search=signature
On Jun 21, 8:42 am, Manuele Pesenti wrote:
> what's the best way to define a minimal list of fields that I want to
> repluicate in some tables?
> I thought to define a table but as I need it only to be used inside
> other tabl
Please let me know is it possible or not?
On Tue, Jun 21, 2011 at 11:32 AM, sagar wrote:
> i have to use group as column name in web2py.
> i am using mysql as a db.
> in mysql we can do it using `group`
> in python we can do it using group_
>
> d=db.test.insert(name=exacturl,group="")
>
> How to
My app to date has had one controller, default.py
I had multiple login methods (LinkedIn and email address) for
different sets of users.
This caused a problem: when a user wasn't logged in, my app defaulted
to prompt for a LinkedIn OAuth-style login.
So I decided to pull the code for the two sets
On 21/06/2011 10:14, apple wrote:
Like this?
http://web2py.com/book/default/chapter/06?search=signature
yes... I was looking exacly this inside the gluon code :)
M.
On Jun 21, 8:42 am, Manuele Pesenti wrote:
what's the best way to define a minimal list of fields that I want to
re
Ref. to issue 307 in google code.
http://code.google.com/p/web2py/issues/detail?id=307&sort=-id
As suggested by "Caleb", I prepared the HTML myself (in the
controller).
Then returned the generated html to the View and rendered it there.
==
My finding:---
==
Still it takes long time
after some digging I've found that creating Auth(db) is where the
controller can be set (and is, of course, "default" by default :)
I'm calling auth=Auth(db) in my db.py file
Am I heading in the right direction to change the call to Auth()
depending upon if the user is logging in via /init/defaul
if you are using RPX(janrain) you can have both methods at the same login
page:
http://web2pyslices.com/main/slices/take_slice/124
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
On Tue, Jun 21, 2011 at 6:36 AM, Carl wrote:
> after some digging I've found that creating Auth(db) is
thanks Bruno.
My UI requirements are not to give a choice to visiting users so I
specifically require the options on different pages. One page won't be
indexed by search engines and will be by-invitation only.
I'm using the LinkedIn API to access user data from LinkedIn's servers so
JanRain isn't
I have 2 modules a.py and b.py inside applications/app/tests directory
and am trying to import b.py from a.py. I find it not easy as I am
calling a.py using web2py shell, which disallows the usage of __file__
(otherwise I could append the tests directory to sys.path).
python web2py.py -S app -R ap
Hi Joe,
That report is generated because the types dictionary for that key
doesn't have a value that encodes a template for the field.length to
be written into. If you look at the types at the top of the class,
you'll notice that some types do have a template value and some do
not.
Unfortunately,
If you switch from SSL to non-SSL you may pick up a different session.
I cannot say for sure. Byt print the auth.user_id value when you do
the insert that causes trouble.
On Jun 21, 2:16 am, pbreit wrote:
> I switch between SSL and non-SSL for /user and not-/user. I wonder if that
> could be a pr
this is not supported at the moment but it is in our plans.
On Jun 21, 3:23 am, sagar nigade wrote:
> Please let me know is it possible or not?
>
>
>
>
>
>
>
> On Tue, Jun 21, 2011 at 11:32 AM, sagar wrote:
> > i have to use group as column name in web2py.
> > i am using mysql as a db.
> > in my
which web2py version? The latest version should allow __file__ in
shell executed files.
On Jun 21, 6:04 am, amit wrote:
> I have 2 modules a.py and b.py inside applications/app/tests directory
> and am trying to import b.py from a.py. I find it not easy as I am
> calling a.py using web2py shell,
Thank you. So I will make a 30 dollar donation to the project.
But it still does not work.
This is what I get when I enter an email address to invite someone :
Traceback (most recent call last):
File "gluon/restricted.py", line 181, in restricted
File "C:/Users/Coco/Downloads/web2py_win/web2
Good morning,
I realized I made a mistake in my previous post. I mistakenly added
zeros to my numbers. I just realized Lanoba quoted me a free account
at 250 unique registrations per month (not 2500) and that there first
paid package includes 500 (not 5000).
Sorry for the confusion. But in any ca
> 'friendship' is an Ajax callback defined later on.
[OFF TOPIC] Finally a concise definition of friendship that I can hope
to understand at some point in the future ;)
Hi,
What changes have there with virtual fields in the last days (in
trunk)?
I can not run something that was working correctly.
this worked:
class ElementoIncidencia(object):
def altura_es_par(self):
return not bool(self.elementos_incidencia.altura % 2)
tb_elementos_incidencias.vir
If you really need to return 10,000 records to the browser, you should be
returning json and then rending with some sort of data grid.
I've found a simple solution...
in db.py;
change auth=Auth(db)
to auth=Auth(db, controller=request.controller)
with this small addition, auth will be initialised by whatever
controller the user used to access the website.
On Jun 21, 11:10 am, Carl Roach wrote:
> thanks Bruno.
> My UI requiremen
What? No takers on this question? ;-) Could use some help here.
> Question is, which is the preferred method these days?
Hmm, preferred by whom... it's difficult for one to answer for
all.
FWIW I guess I'm happy with the plugin wiki (jQueryUI?) multi-select.
why you need to return 10k records in one go ?
--
Sebastian E. Ovide
http://socket.io/index.html#announcement
@Sebastian, @pbreit,
I understand what you mean to say.
If I get you rightly, I should fetch only a limited no. of rows
through pagination.
It makes sense for most of the situations.
But for some cases, rendering all the records on single page is
required.
e.g. consider a big automobile workshop.
How about we all write letters of recommendation to your Department Chair -
just kidding :)
LOL. Perhaps one day I will ask you something like that.
Actually my department is very open-minded, both colleagues and
administration.
We have been offering CS intro sequence in python for log time. We had
one of the first programs in security in the US certified as center of
excellence by the N
We used YUI DataTables at my last company and they worked really well but we
only got up to around 1000 records on a page (with very quick paging,
filtering and sorting). I've been wanting to hook them up to Web2py but
haven't needed it so far.
http://developer.yahoo.com/yui/datatable/
Have you tried pasring the data using your 0.078 second method into a
json format and using jQuery to parse it?
I uncommented and edited the janrain code on a freshly installed
version of cube2py with the latest web2py on ubuntu lucid. All four of
the logins work; however, all 3 but google fail after they get back to
cube2py as follows:
If I try to go here:
http://davidwatson.local/cube2py/plugin_wiki/page
Maybe check out DataTables new virtual scrolling feature:
http://datatables.net/blog/Introducing_Scroller_-_Virtual_Scrolling_for_DataTables.
I think jQgrid may have a similar feature as well.
Anthony
On Tuesday, June 21, 2011 1:26:50 PM UTC-4, Vineet wrote:
> @Sebastian, @pbreit,
> I und
Hi All,
I see globals() everywhere and even if intuitively I guess what it is, I'd
like to find more info about it...
thanks
--
Sebastian E. Ovide
On Jun 21, 2011, at 12:43 PM, Sebastian E. Ovide wrote:
> I see globals() everywhere and even if intuitively I guess what it is, I'd
> like to find more info about it...
>
http://docs.python.org/library/functions.html#globals
http://diveintopython.org/html_processing/locals_and_globals.html
I assume you created your own janrain account. Did you register the
domain "davidwatson.local" with janrain? BTW "davidwatson.local" is
not a valid domain name.
On Jun 21, 1:30 pm, David Watson wrote:
> I uncommented and edited the janrain code on a freshly installed
> version of cube2py with the
Those globals() are gone in web2py 1.96.X. Your legacy code that
passes globals() around still works but that is was not a good design
decision.
On Jun 21, 2:43 pm, "Sebastian E. Ovide"
wrote:
> Hi All,
>
> I see globals() everywhere and even if intuitively I guess what it is, I'd
> like to find
A note I forgot to add to my previous message, I've renamed the admin
application and I've found that the name is hardcoded in a lot of places...
¿shouldn't it be easier to change?
To fix the applications I've changed the admin application name on the
following files:
./app/controllers/appadmin
I've started to use web2py for a new project and I've found a couple of small
bugs on the gluon/contrib/login_methods/cas_auth.py file:
1. I'm serving the aplication using HTTPS, but the __init__ function hardcodes
'http' as scheme; to fix it I've changed the following:
@@ -57,7 +57,11 @@
Uploading your fix to trunk. Please check everything is ok. Thank you.
Massimo
On Jun 21, 12:52 pm, Sergio Talens-Oliag wrote:
> I've started to use web2py for a new project and I've found a couple of small
> bugs on the gluon/contrib/login_methods/cas_auth.py file:
>
> 1. I'm serving the aplica
I found that all(empties) does the same of reduce(lambda x, y: x and y,
empties)...
And I write this for the case when we want only one field to be filled for a
group of fields passed to the validator :
class ONLY_ONE_CAN_BE_FILLED(object):
"""Class representing a validator requiring at least
Or print it. I have had to do massive amounts of data in html and pdf
format.
BR,
Jason Brower
On 06/21/2011 08:26 PM, Vineet wrote:
@Sebastian, @pbreit,
I understand what you mean to say.
If I get you rightly, I should fetch only a limited no. of rows
through pagination.
It makes sense for mos
It can paginate data?
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
Yes you are right I made a few search in the book and there is not write no
where that you can use orderby= for IS_IN_DB validator...
More chance to make it appears in the book with a proper email title...
Richard
On Wed, May 11, 2011 at 1:51 PM, Ross Peoples wrote:
> On Sunday, December 28, 20
Hello,
I would like to know if the problem I face coming from the validator that I
write or is a IS_IN_DB behavior in case of multiple validators??
Here my validator :
class ONLY_ONE_CAN_BE_FILLED(object):
"""Class representing a validator requiring at least one non-empty field
in a set. """
When you need to use additional validators with IS_IN_DB but still want the
dropbox, you can add the additional validators to the IS_IN_DB validator via
its '_and' argument -- see
http://web2py.com/book/default/chapter/07#Database-Validators. However, I'm
not sure if that works when IS_IN_DB is
Not the answer you're looking for but if it's not absolutely critical to
change the name, I strongly suggest not changing it.
El Tue, Jun 21, 2011 at 02:41:05PM -0700, pbreit va escriure:
> Not the answer you're looking for but if it's not absolutely critical to
> change the name, I strongly suggest not changing it.
The problem is that I'm publishing the application on an https server that
gives access to more applicati
The error shows that there was an auth.user.id but no auth.user_id
Can you think of any reason why auth.user_id would not be getting set?
Anyone have suggestions for the following routes:
I want:
sr = controller
sr/1 = view record 1
sr/1/update = update
sr/1/delete = delete
sr/1/clone = clone
sr/1/ = other actions
So I am thinking of the following route:
Map sr//action ---> sr//
routes_in = (
(r'/sr/(?P\d+)(?P.*)', r
Where should I put session.secure()? And is it session.secure() or
session._secure=True?
Hi,
My virtual fields were also affected by trunk, change set # 82b607e03f09.
Can somebody please fix this?.
Thanks,
Carlos
Note, as far as I can tell, setting session.secure() doesn't restrict web2py
from sending the cookie to the browser (i.e., web2py will send the cookie
even if the connection isn't secure) -- it only tells the browser not to
send the cookie back unless over a secure connection.
Anthony
On Tues
On Tuesday, June 21, 2011 7:13:34 PM UTC-4, pbreit wrote:
>
> Where should I put session.secure()? And is it session.secure() or
> session._secure=True?
session.secure() simply does session._secure=True, so they are equivalent
(though the former seems cleaner).
It simply results in the 'Sec
Another option might be to leave the name 'admin' and use routes.py to
rewrite incoming and outgoing URLs to 'admin' using a different name.
Anthony
On Tuesday, June 21, 2011 2:11:46 PM UTC-4, Sergio Talens-Oliag wrote:
> A note I forgot to add to my previous message, I've renamed the admin
>
No. It is very strange. Is it possible it gets overwritten somewhere?
On Jun 21, 6:05 pm, pbreit wrote:
> The error shows that there was an auth.user.id but no auth.user_id
>
> Can you think of any reason why auth.user_id would not be getting set?
I reverted the change until this is better understood.
Massimo
On Jun 21, 7:14 pm, Carlos wrote:
> Hi,
>
> My virtual fields were also affected by trunk, change set # 82b607e03f09.
>
> Can somebody please fix this?.
>
> Thanks,
>
> Carlos
True.
On Jun 21, 7:35 pm, Anthony wrote:
> Note, as far as I can tell, setting session.secure() doesn't restrict web2py
> from sending the cookie to the browser (i.e., web2py will send the cookie
> even if the connection isn't secure) -- it only tells the browser not to
> send the cookie back unl
Hi Massimo,
Thanks for reverting this change.
I see (in the new change that broke virtual fields) that you are comparing
against types.InstanceType.
I believe that does not work with new style classes (which is what I use for
virtual fields)?.
Anyways, thanks for reverting this.
Carlos
Great thanks Anthony, I will try that tomorrow first time and I will report
back.
Richard
On Tue, Jun 21, 2011 at 5:35 PM, Anthony wrote:
> When you need to use additional validators with IS_IN_DB but still want the
> dropbox, you can add the additional validators to the IS_IN_DB validator via
Hi,
let's say someone gave me a dump of a mySQL DB in xml format...
something that looks like this:
CREATE TABLE `bitmap` (
`bitmap_id` int(11) NOT NULL AUTO_INCREMENT,
`filename` varchar(100) NOT NULL,
May interrested some of you : http://www.webrtc.org/home
Richard
also, I found that they gave me the equivalent data in a .sql file
would that be understood by DAL?
thanks again,
Mart :)
On Jun 21, 9:14 pm, mart wrote:
> Hi,
>
> let's say someone gave me a dump of a mySQL DB in xml format...
> something that looks like this:
>
>
> charset="
I'll have to see if my Socket.IO port of comet_messaging.py still
works with the new version.
--Greg
On Jun 21, 12:08 pm, Massimo Di Pierro
wrote:
> http://socket.io/index.html#announcement
Please tell us more
On Jun 21, 8:40 pm, Gregory Hellings wrote:
> I'll have to see if my Socket.IO port of comet_messaging.py still
> works with the new version.
>
> --Greg
>
> On Jun 21, 12:08 pm, Massimo Di Pierro
> wrote:
>
>
>
>
>
>
>
> >http://socket.io/index.html#announcement
Massimo beat me too it.
Interested as well
On Jun 21, 2011 9:49 PM, "Massimo Di Pierro"
wrote:
> Please tell us more
>
> On Jun 21, 8:40 pm, Gregory Hellings wrote:
>> I'll have to see if my Socket.IO port of comet_messaging.py still
>> works with the new version.
>>
>> --Greg
>>
>> On Jun 21, 12
The easiest way is make a web2py model that matches these fields:
db.define_table('bitmap',
Field('bitmap_id','id'),
Field('filename'),
Field('kdb_id','integer'),
Field('isDeleted','integer')) # 0 or 1
parse the XML into CSV (excel m
sounds good, will do that then.
Thanks,
Mart :)
On Jun 21, 9:53 pm, Massimo Di Pierro
wrote:
> The easiest way is make a web2py model that matches these fields:
>
> db.define_table('bitmap',
> Field('bitmap_id','id'),
> Field('filename'),
> Field('
last question... Do I really need to bother with PRIMARY KEY , KEY,
CONSTRAINT, ENGINE and UNIQUE KEY ?
thanks,
Mart :)
On Jun 21, 9:55 pm, mart wrote:
> sounds good, will do that then.
>
> Thanks,
> Mart :)
>
> On Jun 21, 9:53 pm, Massimo Di Pierro
> wrote:
>
>
>
>
>
>
>
> > The easiest way is
Hi,
can validators such as IS_IN_DB(db,'.id') be used outside of
the web context (dal stand alone) ? Maybe there is a key word or
something ? :)
thanks again,
Mart :)
Validators are evaluated when using DAL standalone, only if you use these
two methods:
db.validate_and_inset(...) instead of .insert()
and just in trunk..
db.validate_and_update(..) instead of .update()
I am working now on a new patch for Rows.validade_and_update_record(...)
BTW:
You can alwa
Some more examples:
*IS IN SET*
In [29]: IS_IN_SET([1,2,3])("1")
Out[29]: ('1', None)
In [30]: IS_IN_SET([0,2,3])("1")
Out[30]: ('1', )
*IS NOT IN DB*
In [60]: IS_NOT_IN_DB(db,'auth_user.id')('3')
Out[60]: ('3', None)
## NOTE that logic is inverse #
my_id = 5
if IS_NOT_IN_DB(db,'table.i
Hi all,
The model will be reloaded one time the each request?
In my application, it's reload one time more when using the download image?
It's correct?
How i can do for the model reload only one time?
Thanks.
Hi all,
The model will be reloaded one time on each request?
In my application, it's reload one time more when using the download image?
It's correct?
How i can do for the model reload only one time?
Thanks.
awesome! thanks for the info! i'll use validate_and_insert &
validate_and_update (i think that should do it), and I look forward to
seeing your Rows.validade_and_update_record()! :)
thanks,
Mart
On Jun 21, 11:08 pm, Bruno Rocha wrote:
> Some more examples:
>
> *IS IN SET*
> In [29]: IS_IN_SET([1
Hi again (all or nothing it seems tonight :) )
so,
I am building a model (to be used with DAL stand alone) based on some
XML dump of a mySQL DB, and they have things like _id
instead of just 'id' unless I am doing it wrong, how do I use the
value of a Field located in the same table? in this
no.
On Jun 21, 9:00 pm, mart wrote:
> last question... Do I really need to bother with PRIMARY KEY , KEY,
> CONSTRAINT, ENGINE and UNIQUE KEY ?
>
> thanks,
> Mart :)
>
> On Jun 21, 9:55 pm, mart wrote:
>
>
>
>
>
>
>
> > sounds good, will do that then.
>
> > Thanks,
> > Mart :)
>
> > On Jun 21,
Excellent! thanks :)
On Jun 21, 11:30 pm, Massimo Di Pierro
wrote:
> no.
>
> On Jun 21, 9:00 pm, mart wrote:
>
>
>
>
>
>
>
> > last question... Do I really need to bother with PRIMARY KEY , KEY,
> > CONSTRAINT, ENGINE and UNIQUE KEY ?
>
> > thanks,
> > Mart :)
>
> > On Jun 21, 9:55 pm, mart wro
Yes, all of the model files are run on every request, and when you download
an image via the download function, that will generate another request. If
you don't need to apply access controls to the image downloads, you can
upload them into the 'static' folder instead of the 'uploads' folder and
Massimo, thanks for your answer. I upgraded just yesterday to 1.96.x.
I am getting the following:
> cat applications/app/tests/a.py
print __file__
Traceback (most recent call last):
File "web2py.py", line 19, in
gluon.widget.start(cron=True)
File "/home/.../web2py/gluon/widget.py", line
ok. Thanks for your reply Massimo
On Tue, Jun 21, 2011 at 7:40 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> this is not supported at the moment but it is in our plans.
>
> On Jun 21, 3:23 am, sagar nigade wrote:
> > Please let me know is it possible or not?
> >
> >
> >
> >
> >
>
Thank Anthony. It was clear to me.
I find it takes longer to create the many data table (db.define_table). It
will work if I put the define_table to modules? You have an example?
On Wednesday, June 22, 2011 12:28:39 AM UTC-4, toan75 wrote:
>
> Thank Anthony. It was clear to me.
> I find it takes longer to create the many data table (db.define_table). It
> will work if I put the define_table to modules? You have an example?
Others may have suggestions, but there are at
Oh, I see. I guess a dumb mistake on my part but I thought it worked
differently.
It ends up that *I* have to fill in the "Modified by" field manually. I
thought it was automatically picking up the logged in user. (this is in
appadmin)
I've investigated more and it seems like auth.signature sets
modified_by.update=lazy_user but I can't see that is happening. I guess I'll
keep looking.
85 matches
Mail list logo