Hello
div>
World
this will work because the code is executed onclick and not on ajax
load.
M
The problem is that add_team is not an action. The other problem is
the order of decorators.
In this case
@auth.requires_login()
@service.jsonrpc
def add_team(name, cap):
#function uses auth.user.id
You register the service (jsonrpc) before requiring_login therefore
login would not be used.
I do not want to go in and clean up "trash" if there is a way to
prevent it from getting there in the first place.
--
Thadeus
On Fri, May 7, 2010 at 4:16 PM, Patrick wrote:
>
>
> On May 7, 12:32 pm, waTR wrote:
>> I was just wondering if there are plans to open the book wiki to
>> editing t
Yes but in a different way. Your VPS.net server probably can already
receive emails (assuming there is account with the name of the
receiver).
You just need a script that uses pop to fetch emails from the inbox of
that user account. It should actually be simpler. Somewhere I have
that script for IM
On May 7, 12:32 pm, waTR wrote:
> I was just wondering if there are plans to open the book wiki to
> editing to everyone (even if you don't create an account). There is no
> danger in doing that...there are plenty of people who will clean up
> any garbage...
You would be surprised. Many sites t
oops. WIll fix this tonight
On May 7, 11:30 am, Iceberg wrote:
> Hi Massimo,
>
> Right now, IS_DATE_IN_RANGE(minimum=foo, maximum=bar) does NOT accept
> the given minimum nor maximum value. That is not the design intention
> according to error message. Please get rid off the two equal marks in
>
If this is the URL you want:
http://127.0.0.1:8000/myapp/sysd/users
than you need
controllers/sysd.py
and views like
views/sysd/users.html
On May 7, 11:26 am, Sverre wrote:
> I'm trying to get a more clean file structure and made controller like
> this
>
> sysdata/user.py
>
> with the views
Can you try
from gluon.sql import Query
print db(Query(" '%' || NEW.field_1 || '%' LIKE table_1.field_1
"))._select(db.table_1.field_1)
Do you get the query you want?
On May 7, 10:48 am, AsmanCom wrote:
> It returns nothing... even if I write in the exact value and it should
> work like a fuzz
> Massimo already answered this. But I've been using web2py from the
> beginning, have a site running on it with absolutely no problems. Upgrading
> to a new release is as simple as (well just import you old app in a new
> release) -
No. It is simpler. There is a button in admin on the right [upgr
Yes, vanilla hardware (some dual core Intel). I'm running the latest
web2py now, but it was crashing even with about half year old version
(1.73 or so), so the issue is probably not webserver specific. The
process is in ps ax no more when crashes. Currently the server is
being accessed through Apac
I was just wondering if there are plans to open the book wiki to
editing to everyone (even if you don't create an account). There is no
danger in doing that...there are plenty of people who will clean up
any garbage...
Hello,
First of all, I think I should say sorry because probably this is not
the correct place to post the following problem but I'm getting crazy.
My problem with jquery is as follows:
On a view I have a form that is submited via web2py ajax method.
Something like this
[]
.
Massimo,
Could you please elaborate a bit further? Is this restriction
something peculiar to auth.requires_login? or service.jsonrpc? or
both? Or is it something that applies to any use of multiple
decorators in web2py?
Thanks,
Mike
On May 7, 10:32 am, mdipierro wrote:
> You cannot do this:
>
Thanks Massimo,
I will try that.
only one question more: how can I implement (if is possible) this:
http://code.google.com/appengine/docs/python/mail/receivingmail.html
in my server? (a vps.net account)
is that possible?
thinking in a CRM (other idea, not the original "post via mail") I
think th
Hi Massimo,
Right now, IS_DATE_IN_RANGE(minimum=foo, maximum=bar) does NOT accept
the given minimum nor maximum value. That is not the design intention
according to error message. Please get rid off the two equal marks in
IS_DATE_IN_RANGE.__call__().
Same applies to IS_DATETIME_IN_RANGE.
Thanks.
I'm trying to get a more clean file structure and made controller like
this
sysdata/user.py
with the views like this
sysdata/user/change.html
sysdata/user/new.html
sysdata/user/users.html
The files on the harddisk are ok.
But if I edit the controller get I a link for "users.html" like this
ht
I´ll try to explain, I need check if any record of a given field is
contained in a string. Is there any solution?
On 7 Mai, 17:03, mdipierro wrote:
> This should work
>
> db("'%' || NEW.field_1 || '%' LIKE
> table_1.field_1").select(db.table_1.field_1)
>
> On May 7, 9:35 am, AsmanCom wrote:
>
>
On Fri, May 7, 2010 at 3:42 PM, Miguel Lopes wrote:
>
>
> On Fri, May 7, 2010 at 3:29 PM, mdipierro wrote:
>
>> Errors in form.errors (which is a Storage object and extends a dict).
>> Perhaps they can be displayed somewhere else?
>>
>>
> Yes of course. But the point is that if the extension mec
It returns nothing... even if I write in the exact value and it should
work like a fuzzy logic..
like that:
find_value= request.vars.value
db('%' + table_1.field_1 +
'%').lower().like(find_value).select(db.table_1.field_1)
or
db('%' + table_1.field_1 + '%').lower().like('%' + find_value +
'%').
Excellent... thanks
On 7 May 2010, at 15:32, mdipierro wrote:
> You cannot do this:
>
> @auth.requires_login()
> @service.jsonrpc
> def add_team(name, cap):
>#function uses auth.user.id
>
> but you can do
>
> @service.jsonrpc
> def add_team(name, cap):
>#function uses auth.user.id
>
> @a
Also, models can be included in sub folders and the folder will be
executed in apha order, and then its models underneath the folder
executed in alpha order
A_plugin_comments ->
init.py
db.py
query.py
B_plugin_ratings ->
..etcetc..
This might help clean things up a bit =?
--
T
It would be very nice if we could control the order, alas it is alphabetical.
So we must resort to craziness such as
A_config.py
B_settings.py
C_db.py
D_auth.py
E_crud.py
F_other_mode.py
etc etc.
=)
--
Thadeus
On Fri, May 7, 2010 at 10:08 AM, Miguel Lopes wrote:
> On Fri, May 7, 2010 at
On Fri, May 7, 2010 at 4:06 PM, blackthorne wrote:
> Is it possible to customize the order by which models are loaded/
> imported in a web2py application?
> Are they loaded by alphabetical order?
>
>
Yes. They are loaded alphabetically.
> It comes to my mind an idea of an interface for this bas
Is it possible to customize the order by which models are loaded/
imported in a web2py application?
Are they loaded by alphabetical order?
It comes to my mind an idea of an interface for this based on dragging
options like this http://tool-man.org/examples/sorting.html .
Thanks,
Best Regards
This should work
db("'%' || NEW.field_1 || '%' LIKE
table_1.field_1").select(db.table_1.field_1)
On May 7, 9:35 am, AsmanCom wrote:
> Hi,
>
> here is the important Code from an Sqlite trigger i use very often, is
> this possible with web2py to?
>
> Sqlite:
> (SELECT table_1.field_1 FROM table_1
I use:
web2py_no_console.exe --ip=0.0.0.0 --port=8080 --password=111 --
ssl_certificate=ssl_certificate.key --ssl_private_key=ssl_private.key
Put ssl_certificate.key and ssl_private.key into web2py folder.
On 6 май, 22:28, greenpoise wrote:
> I had removed the post thinking that I got it worki
The || operator is "concatenate", its like + in python.
On 7 Mai, 16:48, Mengu wrote:
> is || just a string or have any purpose?
>
> On 7 Mayıs, 17:35, AsmanCom wrote:
>
> > Hi,
>
> > here is the important Code from an Sqlite trigger i use very often, is
> > this possible with web2py to?
>
> > S
is || just a string or have any purpose?
On 7 Mayıs, 17:35, AsmanCom wrote:
> Hi,
>
> here is the important Code from an Sqlite trigger i use very often, is
> this possible with web2py to?
>
> Sqlite:
> (SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
> LIKE table_1.field_1 )
On Fri, May 7, 2010 at 3:29 PM, mdipierro wrote:
> Errors in form.errors (which is a Storage object and extends a dict).
> Perhaps they can be displayed somewhere else?
>
>
Yes of course. But the point is that if the extension mechanism for widgets
could perhaps be polished so that it is not limi
On Thu, May 6, 2010 at 6:37 AM, Anthony wrote:
> I am brand new to web application development, and I'm looking for a
> good web framework to learn in order to build a new web application
> (sort of a personal task/project management system). I want it to look
> (and act) like a serious, polished
Hi,
here is the important Code from an Sqlite trigger i use very often, is
this possible with web2py to?
Sqlite:
(SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
LIKE table_1.field_1 )
or i can even do:
(SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
LIK
You cannot do this:
@auth.requires_login()
@service.jsonrpc
def add_team(name, cap):
#function uses auth.user.id
but you can do
@service.jsonrpc
def add_team(name, cap):
#function uses auth.user.id
@auth.requires_login()
def call(): return service()
On May 7, 9:17 am, Carl wrote:
>
It seems like the best approach, for my app at least, is to define a
decorator to handle the serializing and unserializing of objects
stored in session, e.g.
@sessionobjects
def mycontroller():
...
This seems to be working, but I'm wondering if it has any known
gotchas relative to the under-t
Errors in form.errors (which is a Storage object and extends a dict).
Perhaps they can be displayed somewhere else?
On May 7, 7:26 am, Miguel Lopes wrote:
> Encapsulating javascript code within some widgets is a good solution when
> the functionality is generic. This widgets act like drop-in comp
What is the setup on the hosted server? The fact is that if - for
example - you use mod_wsgi there is no persistent python process to
run cron. You would have to run another web2py instance on localhost
just for the purpose of cron.
On May 7, 6:28 am, Adi wrote:
> Hi all,
>
> I'm on 1.77.3. I hav
You can define tables in module but you need something like
#in module
def define_tables(db,request,T,auth):
db.define_table('sometable,Field('blablabla',default=auth.user_id,requires=IS_NOT_EMPTY(error_message=T("cannot
be emtpy"
#in controller
module=local_import('module')
module.define_t
1.
In this Example i need to take the input string from table_1.field_1
and get_or_create a record in table_2 with table_1.field_1 value in
table_2.field_1 and insert the table_2.field_2 refernce in
table_1.field_2:
def get_or_create(table, fields):
logic=reduce(lambda a,b:a&b,[table[k]==field
I'd like to use several decorators on a function
e.g.,
@auth.requires_login()
@service.jsonrpc
def add_team(name, cap):
#function uses auth.user.id
In testing I've realised that service.jsonrpc is working but
auth.requires_login isn't.
ie if a user is not logged in then service.jsonrpc is c
Is this standard hardware? The only place I've seen Python crash is on
non-standard hardware (AS400) with a non-supported build of Python.
Web2py recent switched from Cherrypy's wsgiserver to Rocket (which I
wrote) as of version 1.77.2 (I think). Which version are you running?
With built-in
ok, next week I will try to make something out of this.
If anyone likes this idea and wants to suggest something, now is the
time.
Massimo, your idea is really interesting but probably requires some
kind of "sync", so that the user can change things in the HTML and see
it reflected in the YAML tree
AFAIK web2py uses cherrypy webserver, which listens as a daemon on
certain port. With crashing I mean that the listening process (web2py
with cherrypy at the background) suddenly terminates. I use standard
Python v 2.5.2 as packaged for Debian.
David
On May 7, 2:52 pm, Timothy Farrell wrote:
> C
Can you be more specific on what you mean by "crashing"? Interpreted
languages shouldn't crash and generally if they do it's something wrong
with the interpreter. Are you using cPython?
On 5/7/2010 1:48 AM, David Zejda wrote:
Hi,
my web2py instance (about 1 pageviews, 30+ ajax requ
+1 * (Works out of the box) All in one packages with no dependencies and no
config files
+1 * Backward compatibility
* Very easy to extend (like Python fits my brain)
Miguel
On Thu, May 6, 2010 at 4:18 PM, Álvaro Justen [Turicas] <
alvarojus...@gmail.com> wrote:
> Hi folks,
> I'm writing an ar
Encapsulating javascript code within some widgets is a good solution when
the functionality is generic. This widgets act like drop-in components.
Two examples by mr.freeze are (txs for the nice concept mr.freeze):
http://www.web2pyslices.com/main/slices/take_slice/24
http://www.web2pyslices.com/ma
On May 6, 3:53 am, Yarko Tymciurak
wrote:
> On May 5, 2:46 pm, ScOut3R wrote:
>
>
>
>
>
> > On May 5, 6:02 am, Yarko Tymciurak
> > wrote:
>
> > > On May 4, 4:19 pm, ScOut3R wrote:
>
> > > > Here it goes. First of all, I'm not a developer by profession, not
> > > > even a web developer. You'll
Thanks Mr.Freeze! Yes, it works now!!
Regards,
Zhe
On May 7, 9:48 am, "mr.freeze" wrote:
> I think you want your pattern to be:
> pattern = '%' + request.vars.keyword.lower() + '%'
>
> instead of :
> pattern = '+ request.vars.keyword.lower() + '
>
> On May 7, 2:23 am, Zhe Li wrote:
>
>
>
> > Hi
I did delete it accidentally. Thank you for the quick spot.
On May 7, 12:12 am, mdipierro wrote:
> works for me with 1.77.3
>
> did you delete
>
> def call(): return service()
>
> On May 6, 11:08 pm, Matthew wrote:
>
> > I have a simple service running in web2py 1.74.6 and 1.77.3. In the
> > old
Hi all,
I'm on 1.77.3. I have setup web2py with apache2 using Massimo's
recipe. I have a background process defined in my app/cron/crontab
like this:
*/2 * * * * root *applications/init/modules/myprocess.py
Now this runs fine on my local machine, but on the hosted server cron
is not running. How
Thank you.
On 7 Mai, 10:08, "mr.freeze" wrote:
> A quick and dirty way is timestamping your CSS link:
>
> {{ts = str(request.now).replace(':','')}}
>
>
> On May 7, 1:29 am, Sverre wrote:
>
> > I changed my css files in the static section but there are cached, so
> > the results were the same as
As Mengu, but with different flavor:
1) easy as possible (you can write many details: DAL, forms, CRUD,
templates etc.)
2) secure (web is dangerous, because of its openness, but with web2py
easy to avoid many security problems)
3) fast and scalable (every part: the DAL, the core, the templates)
I read this post in the group:
http://groups.google.com/group/web2py/browse_thread/thread/6201f9f56bdb16d6,
and I am facing a similar problem.
I have one web2py installation in which I have a base application
which contains all shared files i.e .js and .css files. Within this
application I also d
A quick and dirty way is timestamping your CSS link:
{{ts = str(request.now).replace(':','')}}
On May 7, 1:29 am, Sverre wrote:
> I changed my css files in the static section but there are cached, so
> the results were the same as before. I examined this with firebug. How
> can I solve this ?
I have never had to deal wtih python for windows. You may want to ask
the python guys themselves, or the pyserial guys. If you have access to
irc you can talk to them and they answer very quickly. Sorry I can't
help you more there.
BR,
Jason
On Thu, 2010-05-06 at 06:06 -0700, frankz wrote:
> Pa
I think you want your pattern to be:
pattern = '%' + request.vars.keyword.lower() + '%'
instead of :
pattern = '+ request.vars.keyword.lower() + '
On May 7, 2:23 am, Zhe Li wrote:
> Hi Massimo,
>
> the only message I got from firebug is:
>
> The 'charCode' property of a keyup event should not
Hi Massimo,
the only message I got from firebug is:
The 'charCode' property of a keyup event should not be used. The value
is meaningless.
when typing in the field. Is there any other ways to debug it?
Cheers,
Zhe
On May 6, 5:18 pm, mdipierro wrote:
> To help us debug this... can you try wit