Hi,
Have you been able to solve this problem? I had the same problem:
http://groups.google.com/group/web2py/browse_thread/thread/b7c4b87444718e59/6cf267534775f128?q=#6cf267534775f128
I eventually solved it by using a third party auto complete widget,
apparently it's a naming issue.
Kind regards
Hi everybody!
I'm trying to start a cron job, which fails:
2011-05-24 10:40:00,517 - web2py.cron - WARNING - WEB2PY CRON Call
returned code 1:
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.95.1 (2011-04-25 15:04:14)
Database drivers available: SQLite3
This is so embarrassing...!
Sorry for the last post - I found the problem:
I changed the name of the script slighly before the deployment to the
server.
Now it works perfectly. ;-)
Have a nice day.
Marcel
On 24 Mai, 10:52, Marcel Luethi wrote:
> Hi everybody!
>
> I'm trying to start a cron j
Truncated model:
db.define_table('akb_doccenter',
Field('doc_nr', type='string', length=50,
requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr')),
Field('location'))
db.akb_doccenter.doc_nr.widget =SQLFORM.widgets.autocomplete(
request, db.akb_do
Sorry if I didn't explain this well...
Imagine a scenario of a web company..
The company website is in the main app
The clients sites are in different apps like client1, client2, etc
In routes.py you redirect the domain to the respective app (ex.
client1.com -> client1)
The problem is that from
Here's an abstraction from my code. There may be better ways to do it,
but it works.
Let's say you wanted to start a miner to watch the system log...
from subprocess import *
from multiprocessing import Process, Queue
def doSomething(self, q):
p1 = Popen([ 'tail', '-f', '/var/log/messages'),
On 24 May 2011 11:54, Johann Spies wrote:
> Truncated model:
>
> db.define_table('akb_doccenter',
> Field('doc_nr', type='string', length=50,
> requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr')),
>
>
Copy and paste mistake:
This line should refer to akb_doccente
Yes, I got the latest last night
On Mon, May 23, 2011 at 11:41 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> This should be fixed in plugin wiki. Do you have the latest?
>
> Mind that I do not promise backward compatibility for plugin-wiki but
> I try to update it as web2py core ch
Thanks for your answers. I've tried running the app locally but when I try
to access these URL
http://localhost:8080/admin
https://localhost:8080/admin
I receive error messages ("Insecure channel" and "SSL received a record that
exceeded the maximum permissible length.(Error code:
ssl_error_rx_r
Hi,
For anyone else that might be wondering this issue,
I tried Ross Peoples solution:
db_thread = DAL(db._uri)
for k, v in db.items():
db_thread[k] = v
And it did not work properly (it did feel a bit hack anyway).
One pretty bad solution to this issue is to use threading.Lock() in
every s
I get this error message when trying to connect to an MYSQL database
dbp = DAL('mysql://admin:password@localhost:3306/postcodes2')
File "/opt/web-apps/web2py/gluon/dal.py", line 3720, in __init__
raise
RuntimeError, "Failure to connect, tried 5 times:\n%s" %
errorRuntimeError:
Failure to con
Hello
I have a web application (third party) in php. I can not even get into
php or touch anything of this application.
I need to implement access control to php app:
Profile o Role A -> http://mydomain.com/index.php?config=A
Profile o Role B -> http://mydomain.com/index.php?config=B
The idea i
Use the python * operator to unpack the list, like this:
item_summary_fields = [db.item.id, db.item.title, db.item.image_thumb,
db.item.currency, db.item.shipping_method, db.item.start_price,
db.item.drops, db.item.duration, db.item.price_change, db.item.created_on]
rows = db(db.item.id>0).sel
Please try download it again. I think I fixed it.
In any case there will be a new version of plugin wiki next week. The
current one has a vulnerability in jqgrid.
On May 24, 7:23 am, Tito Garrido wrote:
> Yes, I got the latest last night
>
> On Mon, May 23, 2011 at 11:41 PM, Massimo Di Pierro <
>
What is this supposed to do? Because I do not think it does it
anyway. :-)
On May 24, 1:02 am, Kimmo wrote:
> Hi,
>
> For anyone else that might be wondering this issue,
> I tried Ross Peoples solution:
>
> db_thread = DAL(db._uri)
> for k, v in db.items():
> db_thread[k] = v
>
> And it did n
The error is clear: Unknown database 'postcodes2'
did you create the database?
On May 24, 4:52 am, peter wrote:
> I get this error message when trying to connect to an MYSQL database
>
> dbp = DAL('mysql://admin:password@localhost:3306/postcodes2')
> File "/opt/web-apps/web2py/gluon/dal.py"
I am using the youtube api to try and show the most rated videos from
the feed and i have concerted it to json and i can display the json
for such feed on my page but how do i convert this into the video
itself n displays videos from this feed on my page
the database I use (GAE) has a big overhead for long field names.
So I want to change Field('my_descriptive_field_name') to Field('a') and use
an alias to keep accessing with 'my_descriptive_field_name'.
Can this be done?
How about
my_descriptive_field_name = db.a
On May 24, 9:06 am, Plumo wrote:
> the database I use (GAE) has a big overhead for long field names.
> So I want to change Field('my_descriptive_field_name') to Field('a') and use
> an alias to keep accessing with 'my_descriptive_field_name'.
> Can this
would this work?
db.table_name.my_descriptive_field_name = db.table_name.a
I would rather avoid extra global variables and changing my database
queries.
On Wed, May 25, 2011 at 12:21 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> How about
>
> my_descriptive_field_name = db.a
>
>
I think he is talking about this, if it would be SQL:
SELECT my_descriptive_name as a FROM my_table
In web2py, something near:
Field('my_descriptive_field_name', 'string', alias='a')
And, in code:
print db.my_table.a
--
Vinicius Assef.
On Tue, May 24, 2011 at 11:21 AM, Massimo Di Pierro
wrot
Hello,
I would like to know if there is a built vars to know what was the last page
a user had visited?
I would like to build a basic navigation bar that will contain a back button
and I would like to know what was the last visited page so I could write
rule for different view depending from wher
For space reasons I want the database to internally store 'a', but be able
to use the longer name in code for readability.
So I think your example should instead be:
Field('a', 'string', alias='my_descriptive_field_name')
But does that alias parameter exist? Not according to docs:
http://web2py.c
Richard,
I didn't understand your "space reasons", but alias param does not exist today.
Massimo can tell us if it will be implemented.
IMHO it is a good idea, mainly for legacy tables, with legacy names.
--
Vinicius Assef.
On Tue, May 24, 2011 at 12:36 PM, Richard Baron Penman
wrote:
> For s
I found out the DAEMON_ARGS change should not be applied. The start branch
of the script needs both pid file options.
The --pidfile option prevents start-stop-daemon from behaving like killall
as mentioned in the Description section of the start-stop-daemon man page.
This will allow start-stop-
Request.ENV.referer but it's not super reliable.
Massimo's example gets you roughly the same result. Having a constant or an
alias is pretty much the same.
Is the back track contained to inside the app or including sites
external to your app?
On May 24, 10:34 am, Richard Vézina
wrote:
> Hello,
>
> I would like to know if there is a built vars to know what was the last page
> a user had visited?
>
> I would like to build a basic navigation bar that w
I thougth this :
In view I can get active url or function or what ever... :
{{session.last_visited_url=request.url}}
Last visited url : {{=session.last_visited_url}}
But then I would need to actualize these session variables on any events
that when the user make action... But I am blocked if t
Just inside tracking is enough.
Richard
On Tue, May 24, 2011 at 12:21 PM, Mathew Grabau wrote:
> Is the back track contained to inside the app or including sites
> external to your app?
>
> On May 24, 10:34 am, Richard Vézina
> wrote:
> > Hello,
> >
> > I would like to know if there is a built
puts an image link that simulates the back button on the page. You could
convert it to button and use the jQuery alternative
Too much of a hack? The web2py framework is very good with history
integration.
You could put this at the top of your controller files (outside a def():)
and it would happen on every page visit:
session.last_visited_url=request.url
Ah, cool, thanks. I always wondered what * and ** were for. Since my only
formal computer education was C I was frightened they were pointers!
If your PHP code has no access control then, yes, people will just be able
to copy/paste URLs to gain access and I'm not sure Web2py can help you out.
But you should be able to set up passwords on the web server. For example,
Cherokee: http://www.cherokee-project.com/doc/modules_validators.html
Thanks for the hint pbreit!
I think the : javascript:void(history.go(-1)) will do it for now...
Thanks all for your help.
Richard
On Tue, May 24, 2011 at 12:42 PM, pbreit wrote:
> You could put this at the top of your controller files (outside a def():)
> and it would happen on every page vis
Hi List,
I was wondering why I see the css 'hidden' elements flash quickly on the
page when the page is reloaded; then do the animation?
For example when I submit an invalid form I see the hidden form error
fields flash quickly then disappear then do the normal animation.
I was wondering if
For whatever reason, after running for 24 hours, web2py throws an exception
when trying to log in. I have to stop web2py, and restart it, then the error
goes away and my application starts working again. Any ideas?
Traceback (most recent call last):
File "/media/psf/Python/web2py/gluon/main.py
Some elements are set to display: none, like the .flash and .hidden CSS
classs. The reason for this is to prevent exactly what you are describing.
You don't want those elements to be displayed before JavaScript has a chance
to load. Once the page is fully loaded, then JavaScript makes these elem
Thanks Ross;
So I suspect because I changed it to 'block' its flashing quickly;
But I made the element a block so perhaps I have to write another div
around the element to make it display correctly.
Thanks.
On 5/24/11 1:16 PM, Ross Peoples wrote:
Some elements are set to display: none, like
I am trying to make a user editor and running into trouble. I have the
standard auth_user table, and I also have an auth_user_extended table that
stores a bunch of other information, using auth_user as the reference
between the two tables. I set my controller up like this:
def update():
id
I use like this: http://web2pyslices.com/main/slices/take_slice/133
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
2011/5/24 Ross Peoples
> I am trying to make a user editor and running into trouble. I have the
> standard auth_user table, and
So you basically do:
form = SQLFORM(db.auth_user, id)
form2 = SQLFORM(db.auth_user_extended, row.auth_user_extended.id)
form.append(form2)
Interesting. I'll have to give this a shot...thanks!
Hi,
The 'reset_password' option is missing in tools.py, line # 1048 in
Auth.__call__.
Carlos
I don't understand. Show me the code.
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
2011/5/24 Carlos
> Hi,
>
> The 'reset_password' option is missing in tools.py, line # 1048 in
> Auth.__call__.
>
>Carlos
>
>
Hi,
The missing 'reset_password' option is shown in the below code ...
def __call__(self):
"""
usage:
def authentication(): return dict(form=auth())
"""
request = current.request
args = request.args
if not args:
redirect(se
This is the code I have:
form = SQLFORM(db.auth_user, row.auth_user)
form.append(SQLFORM(db.auth_user_extended, row.auth_user_extended))
My view requires that I manually build the form, and for some reason, when I
look at the resulting form object via PDB, the form object has two
I've gotten much closer with this, however, I am still hitting a snag:
One of the fields in my auth_user_extended is set to
requires=IS_NOT_IN_DB(). And when form.accepts is called, I'm still getting
a "value already in database" error.
Is this the right comparison?
db.auth_user.id==db.auth_user_extended.id
In another post you have:
db.define_table('auth_user_extended',
Field('auth_user', db.auth_user),
Which means the relation is db.auth_user.id==db.auth_user_extended.auth_user
reset_password is deprecated:
http://code.google.com/p/web2py/source/browse/gluon/tools.py#1929
Do you have any logs running, background processes, cron jobs? Are you doing
any caching to disk?
Also, check your sessions folder to see if it's getting filled up.
ok, good to know - thanks!
Wait, immediately after reset_password_deprecated, there's a reset_password:
http://code.google.com/p/web2py/source/browse/gluon/tools.py#2010
Also, if reset_password is effectively deprecated, then what should I use to
replace the behavior in /user/request_reset_password ?.
Please clarify - th
Possibly for backwards compatibility? Are you getting some sort of error or
experiencing a problem?
Another interesting NoSQL DB: ThriftDB. Especially for search.
http://www.thriftdb.com/
Does this seem like a reasonable way to handle the
auth.messages.verify_email/reset_password links?
if request.env.https == 'on':
url_prefix = 'https'
else:
url_prefix = 'http'
auth.messages.verify_email = 'Click on the link
'+url_prefix+'://'+request.env.http_host+URL(r=request,c='default'
Does "request.env.https" exist? I don't see it in my environment.
I don't think https is necessary for those links. And if it is, your web
server or code should be enforcing SSL on the URLs.
Yes, I'm getting errors.
When I go to the "lost password?" link, user/request_reset_password is
called, which on submit sends an email message with the following link:
... user/reset_password/*
And when this link is clicked, I get a 404 (Not Found) error.
This can be fixed by adding 'reset_pas
Yeah, you might be right. It looks like it was dropped in this changeset:
http://code.google.com/p/web2py/source/detail?r=f2c246ff0367b235d3e057c42a9cdf743c5ee3ba&path=/gluon/tools.py
Not sure if by accident or on purpose. Massimo may need to weigh in.
On 5/24/2011 5:02 PM, pbreit wrote:
Does " request.env.https" exist? I don't see it in my environment.
It does for me, running web2py behind lighttpd.
I also found a reference to request.env.wsgi_url_scheme, but I wasn't
sure if it's content could be 99+% predicted.
http://comments.gmane.or
Reading this makes my head hurt, but I wonder if it might not also apply to
web2py:
http://code.google.com/p/modwsgi/wiki/IssuesWithPickleModule
If so, I can think of some ugly workarounds.
On May 24, 2011, at 12:13 PM, Ross Peoples wrote:
> For whatever reason, after running for 24 hours, w
This does apply to web2py. In fact I believe the book says something
like this quote from the article
"In order to ensure that no strange problems at all are likely to
occur, it is suggested that only basic builtin Python types, ie.,
scalars, tuples, lists and dictionaries, be stored using the "pi
In trunk we have
request.is_https
Massimo
On May 24, 4:33 pm, Andrew Thompson wrote:
> On 5/24/2011 5:02 PM, pbreit wrote:
>
> > Does " request.env.https" exist? I don't see it in my environment.
>
> It does for me, running web2py behind lighttpd.
>
> I also found a reference to request.env.wsg
On Tuesday, May 24, 2011 6:34:15 PM UTC-4, Massimo Di Pierro wrote:
>
> In trunk we have
>
> request.is_https
Which checks whether request.env.wsgi_url_scheme is https (or HTTPS) or
request.env.https is "on".
Yes, in http://web2py.com/book/default/chapter/09#Custom-Formats, the book
says:
"Not all objects are pickleable, and not all pickled objects can be un-
pickled. It is safe to stick to primitive Python objects and combinations of
them. Objects that do not contain references to file streams or
Specifically i have data that is in XML (grade) in my controller and i
wanted to parse it. eg grade.find(".").. however this would clearly
not work.. are there any suggestions as to how i can convert this XML
data in the controller to a format that is parse-able
Right, pbreit.
But if it could be addressed by the DAL, it would demand less
programmer's effort and DRY would be an ally.
I vote for an "alias" param in Field(). Who is in?
Just a suggestion.
--
Vinicius Assef.
On Tue, May 24, 2011 at 1:13 PM, pbreit wrote:
> Massimo's example gets you roug
On Wed, May 25, 2011 at 1:50 AM, Vinicius Assef wrote:
>
> I didn't understand your "space reasons"
>
see first post
On Wed, May 25, 2011 at 2:13 AM, pbreit wrote:
> Massimo's example gets you roughly the same result.
so are you saying this would work too?
db.table_name.my_descriptive_field_name = db.table_name.a
Having a constant or an alias is pretty much the same.
main drawback is additional global v
"Currently, ThriftDB is offered as a hosted service at
api.thriftdb.com but we are working on a way for developers to run
ThriftDB locally."
but otherwise looks good.
On May 24, 4:48 pm, pbreit wrote:
> Another interesting NoSQL DB: ThriftDB. Especially for search.
>
> http://www.thriftdb.com/
Hi everyone, I'm trying to make an app where a user can create its own
tables bases in some attributes, I have this:
View:
{{extend 'layout.html'}}
Project Name:
Number Of Fields:
Name of Fields:
Submitted variables
{{=BEAUTIFY(request.vars)}}
Controller:
def config():
if request.v
elementTree is an option, available in Python itself, depending on
your version.
On May 24, 7:03 pm, Resa wrote:
> Specifically i have data that is in XML (grade) in my controller and i
> wanted to parse it. eg grade.find(".").. however this would clearly
> not work.. are there any suggestions a
The problem is that you are not saving your model (the table
definitions) and web2py starts from scratch on every request, so your
table is being created in the DB but web2py does not know about it.
That is what models do, they define the tables that are visible in
web2py.
Save that db.define_tab
It's working now... thanks!
On Tue, May 24, 2011 at 10:20 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Please try download it again. I think I fixed it.
> In any case there will be a new version of plugin wiki next week. The
> current one has a vulnerability in jqgrid.
>
> On May
I've tried:
``
name: mediaplayer
src: http://127.0.0.1:8000/secmon/plugin_wiki/attachment/2
width: 400
height: 250
``:widget
``
name: mediaplayer
src: attachment:2.flv
width: 400
height: 250
``:widget
but neither worked... what am I doing wrong?
--
Linux User #387870
.
_/_õ|_
How to install it?
On Tue, May 10, 2011 at 12:12 PM, Pablo Angulo wrote:
> I'm attaching the web2py code for the two widgets, and a zip file that
> may not pass the mailing list filter. It contains the javascript and css
> libraries. You can also find it at:
>
> http://web.uam.es/personal_pdi/ci
I was wondering how I can update 2 targets with reponse.js?
I tried this
response.js =
'web2py_component(url,target);web2py_component(other_url,other_target);'
Seems only the first updated.
Any ideas?
i think the logic is same like wizard, have you tried it?
On Wed, May 25, 2011 at 7:39 AM, Ialejandro wrote:
> Hi everyone, I'm trying to make an app where a user can create its own
> tables bases in some attributes, I have this:
>
> View:
>
> {{extend 'layout.html'}}
>
> action="{{=URL()}
I just found what might be a bug, when using db.table.insert(field = value)
it appears that the type of value isn't checked against the declared type of
field. So for example you can declare a field to be of the date type, but
then insert a record with a non-date value (at least in sqlite). I w
CUBRID Python 8.4.0 driver for Python 2.7, 2.6 are also uploaded. Like I
said, the API docs and release notes will be ready at the beginning of June.
insert NEVER validates data types. FORMs and SQLFORMs validate input.
That is for speed.
You can call
r = db.table.validate_and_insert(**fields)
which returns r.id and r.errors
On May 24, 8:47 pm, Brian M wrote:
> I just found what might be a bug, when using db.table.insert(field = value)
There is no reason why it should not work. Are you using trunk? There
was in bug in stable about response.js.
On May 24, 8:25 pm, "David J." wrote:
> I was wondering how I can update 2 targets with reponse.js?
>
> I tried this
>
> response.js =
> 'web2py_component(url,target);web2py_component(oth
On May 24, 2011, at 5:58 PM, Anthony wrote:
> Yes, in http://web2py.com/book/default/chapter/09#Custom-Formats, the book
> says:
>
> "Not all objects are pickleable, and not all pickled objects can be
> un-pickled. It is safe to stick to primitive Python objects and combinations
> of them. Obj
On May 24, 2011, at 5:47 PM, Anthony wrote:
> On Tuesday, May 24, 2011 6:34:15 PM UTC-4, Massimo Di Pierro wrote:
> In trunk we have
>
> request.is_https
>
> Which checks whether request.env.wsgi_url_scheme is https (or HTTPS) or
> request.env.https is "on".
>
...and of course doesn't necess
It might not be 100%. For example, on Nginx, you have to include this
config:
uwsgi_param UWSGI_SCHEME $scheme;
But I still don't really understand why you need this.
An alias would be global too?
I don't think this would work:
db.table_name.my_descriptive_field_name = db.table_name.a
But these would:
db_table_name_my_descriptive_field_name = db.table_name.a
db_table_name = Storage()
db_table_name.my_descriptive_field_name = db.table_name.a
I am using Trunk;
Is my syntax correct?
should it be a ',' instead of a ';'
response.js =
'web2py_component(url,target),web2py_component(other_url,other_target);'
On 5/24/11 11:40 PM, Massimo Di Pierro wrote:
There is no reason why it should not work. Are you using trunk? There
was in bug
Ah C, pointers and pointers to pointers for **
I used to like pointers in C but then I used to work on operating systems
written in assembler during my early years in computers (70s, early 80s).
Results in a different mindset.
On Tuesday, May 24, 2011 11:57:00 PM UTC-4, pbreit wrote:
>
> An alias would be global too?
>
> I don't think this would work:
> db.table_name.my_descriptive_field_name = db.table_name.a
>
As far as I can tell, the above does appear to work, at least for some
purposes.
Anthony
Dear Friends of Web2Py,
I am just getting started and need an example application using a
relational database. A possible example:
1) with customers, items, purchases tables So the purchases table
would use customerId and itemId numbers from their related tables. So
a customer can select an item in
Ok i found some appliances on the Appliances web page and that is very
helpful. Which ones are considered good coding standards/practices to
follow?? Which would you advise to get started with??
Any recommendations or suggestions would be appreciated. Thanks again,
Markandeya
had already checked web2py appliances? http://web2py.com/appliances
On Wed, May 25, 2011 at 1:19 PM, Markandeya wrote:
> Dear Friends of Web2Py,
> I am just getting started and need an example application using a
> relational database. A possible example:
> 1) with customers, items, purchases ta
92 matches
Mail list logo