I follow this guide http://www.web2py.com/book/default/chapter/11,
trying to set up web2py on my test VPS server, however, I got problem
when trying to start it by running ./web2py.fedora.sh start in web2py/
scripts folder via SSH. Below is the error message:
Starting Web2py Daemon (web2pyd):
[roo
I get a "KeyError: 'doccenter' " when I add an autocomplete widget in the
following situation:
db.define_table('doccenter',
Field('doc_nr', type='string', length=50,
requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr'),
widget =SQLFORM.widgets.autocomplete(
As far as I understand their "hub" is only a front-end to Amazon's
EC2: "Deploy in seconds 45+ free server apps to Amazon EC2".
And it's free as well. From their web site:
- Your TurnKey Hub account is free
- Pay Amazon directly for the cloud resources you use
- No setup, cancellation or monthly f
I have comments form with ckeditor and custom button "Paste python
code".
Pasted (or typed) code is sending to server via Ajax POST and from
server
is returned html code:
def code_py():
raw = request.vars['content']
return CODE(raw, language='python').xml()
The returned html is inserted to
Hi Bruno,
Is there any possibility to edit only one column?
cumps,
Tiago
Solved...
I've added:
div.comment table tbody tr td pre {
white-space: pre !important;
}
I think it should be in inline styles in CODE helper.
Best Regards.
On 9 Maj, 10:35, rixder wrote:
> I have comments form with ckeditor and custom button "Paste python
> code".
> Pasted (or typed) code
My web app will be used by different companies. Defining roles and
permissions for the application works well for one company. With more
companies there are problems. Defining application table in db.py
seems to make the table available to all the companies. This demands
permissions defined at rec
hi everybody I need your help!
I have a problem that is tormenting me and driving me to madness, my
application suddenly stopped working, and gives me this error (changed
names and passwords for security reasons):
-
> please help!! any suggestion will be very appreciated!
>
>
Have you checked whether the Postgresql-server accepts your connections?
Test it with psql with the same database, user and password you have used in
Web2py.
Regards
Johann
--
May grace and peace be yours in abundance through the ful
Thanks Massimo!
Glad to see this made it into the trunk!
Long shot, and I know it's obvious (like the old help desk starting
question - 'is it plugged in?'), but are you sure that the port is
available?...
with my DB connection probs I always start with telnet to the host/
port and make sure something connects. I often discover that the
problem is wit
I once set something up with this kind of functionality. Simplified
concept was:
1. Two tables, e.g.:
Messages: subject, body
MessQueue: to_id, from_id, message_id, dest, stat, sent_on
note: dest is either an email address or mobile tel no.
2. A message is created and multiple recipients
Just wanted to give an update:
I moved one of my projects with about 10 modules over to the new import
method, and so far it's working perfectly. I should also mention that the
new method has greatly simplified the way I write modules. I used to have a
z_import_modules.py model that should run
You should also make sure your pg_hba.conf is set up to accept remote
connections and that your user account can log in from remote connections. I
once had a development PostgreSQL server that had its config reverted to
factory settings one day for no apparent reason. I banged my head against
t
Thank you all for your help!!
turn out the problem was in the psycopg2 module!
when I tried:
import psycopg2
dir(psycopg2)
I got only 4-5 functions, and no 'connect' function!
re-installed pstcopg2 and re-launched web2py and it worked like magic!
now when I do dir(psycopg2) I get all the funct
I don't know if there would be a good way to do this with any DAL/ORM. The
best and most reliable way to handle this (and I hate to say it) might be
using triggers in your database server. So that any change would trigger an
audit action by the SQL server, which would write the change to an audi
The widget take as argument the table itself which is not yet defined.
you have to do it in two steps:
db.define_table('doccenter', Field('doc_nr', type='string',
length=50,
requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr'),
)
db.doccenter.doc_nr.widget =SQ
In trunk, please check it.
On May 9, 4:29 am, rixder wrote:
> Solved...
> I've added:
> div.comment table tbody tr td pre {
> white-space: pre !important;
>
> }
>
> I think it should be in inline styles in CODE helper.
> Best Regards.
>
> On 9 Maj, 10:35, rixder wrote:
>
>
>
>
>
>
>
> > I h
On May 9, 7:41 am, Ross Peoples wrote:
> Just wanted to give an update:
>
> I moved one of my projects with about 10 modules over to the new import
> method, and so far it's working perfectly. I should also mention that the
> new method has greatly simplified the way I write modules. I used to h
On Monday, May 9, 2011 5:34:28 AM UTC-4, james c. wrote:
>
> accounts = my_customers_name + '_collections_' + str(auth.user_id)
> db.define_table( accounts ,
> Field('name'))
> #which created the expected accounts tables in the db folder.
>
> # This approach falls apar
On May 9, 2011, at 6:24 AM, Massimo Di Pierro wrote:
>
>> Jonathan actually mentioned having a current.application Storage that would
>> store things like auth and db that are created in models. I would REALLY
>> like to see this. I still need to have my z_import_modules.py in order to to
>> set t
I agree. But should be call it application? Fir of all the settings
are request level, not app level. And it may create confusion between
current.application
current.request.application
how about one of the following:
current.info
current.settings
current.parameters
current.storage
and we set it
On May 9, 2011, at 6:52 AM, Massimo Di Pierro wrote:
>
> I agree. But should be call it application? Fir of all the settings
> are request level, not app level. And it may create confusion between
>
> current.application
> current.request.application
>
> how about one of the following:
> current
You should send a copy of this directly to Massimo's email and include
'patch' in subject..
On Fri, May 6, 2011 at 4:27 PM, Jim Karsten wrote:
> Ross Peoples and I created a new version of sessions2trash.py. Features
> include:
>
>- Deletes expired sessions files only based on sessions act
I did, deleting 'add_links' to grid.enabled_rows
On 29 abr, 11:11, luifran wrote:
> I'm usingWebGrid, but sometimes I just want to use it to
> show records, not to edit, delete,view,add ...
> With this line: grid.action_links = [ ],I remove
> edit, delete, and view but not add records.
> Can I re
On Monday, May 9, 2011 10:15:33 AM UTC-4, rochacbruno wrote:
>
> You should send a copy of this directly to Massimo's email and include
> 'patch' in subject..
It's already in trunk.
I tried:
form=SQLFORM.factory(
Field('card_number','string'
,label='Enter a card number to verify'
,requires=CRYPT(auth.settings.hmac_key))
But instead I found form.vars.card_number unencrypted. This is on w2p
v1.94.5.
/r
Nik
I have these lines that is supposed to update a record but it doesn't:
db.card.validated.writable=True
db.card.modified_by.writable=True
db.card(db.card.alnum==c_hash).update(validated=True,modified_by=auth.user.id)
Is there anything I missed? I tried to include a manual db.commit()
pbreit, config is a Storage() object and member_status a Dictionary,
and the python get() function.
Ross, you're right. That's how I'm using it. I went back to re-check
my definition file and everything appears to be in order. Note that
it's only in jqgrid that it's not showing up, it works corre
I've never seen "db.card(db". Does that work? I usually see
"db(db.card..."
On Monday, May 9, 2011 10:37:02 AM UTC-4, niknok wrote:
>
> I tried:
>
> form=SQLFORM.factory(
> Field('card_number','string'
> ,label='Enter a card number to verify'
> ,requires=CRYPT(auth.settings.hmac_key))
>
> But instead I found form.vars.card_numb
On Monday, May 9, 2011 10:45:36 AM UTC-4, niknok wrote:
>
> I have these lines that is supposed to update a record but it doesn't:
>
> db.card.validated.writable=True
> db.card.modified_by.writable=True
>
> db.card(db.card.alnum==c_hash).update(validated=True,modified_by=auth.user.id
That solved it. Thanks!
vars:
datum_dobave:
2011-04-03
datum_racuna:
2011-04-03
id:
1
opomba:
placnik:
2
sklic:
1
sporocilo_kupcu:
stevilka_racuna:
1
zapadlost:
get_vars is empty
Hi,
I have an app at production environment wit migrate_enabled set to
False, so I´m creating some new tables from meta-code page from the
Wiki, it doesn't return any error when i save the code, so after add a
create Widget for this new table I´m having errors.
So, I having these errors because t
Assuming current.app ...
why
current.plugins
instead of
current.app.plugins
but yes to
current.app.auth
I think we need a policy before we decide on a case by case basis but
I have not given much thought to the matter.
On May 9, 9:07 am, Jonathan Lundell wrote:
> On May 9, 2011, at 6:52 AM, M
I am puzzled. This does not seem to be consistent with your error:
Traceback (most recent call last):
File "...\gluon\restricted.py", line 181, in restricted
exec ccode in environment
File ".../controllers/izobrazevanje.py", line 98, in
File "...\gluon\globals.py", line 133, in
sel
Solved:
http://groups.google.com/group/google-appengine-python/browse_thread/thread/87d838f61490f003/b71581d3e142694e
2011/5/8 Martin Weissenboeck
> Hi,
> I want to try web2py together with the GAE.
>
> At first I have installed GoogleAppEngine-1.4.3.msi and I got the
> following log-file (Googl
On May 9, 2011, at 9:50 AM, Massimo Di Pierro wrote:
>
> Assuming current.app ...
>
> why
> current.plugins
> instead of
> current.app.plugins
That would be better, I suppose.
>
> but yes to
>
> current.app.auth
>
> I think we need a policy before we decide on a case by case basis but
> I h
I started to rewrite powerpack :S to make use of this. Just to clarify, this
is ok?, this is something that I don't want to change again :P:
current.app = Storage()
current.app.settings = Storage() #settings of the current app
current.db = DAL(..)
current.app.auth = Auth(..)
current.app.plugins =
It is the traceback info:
Traceback (most recent call last):
File "/Users/ra/Documents/Desarrollo/web2py/gluon/restricted.py",
line 181, in restricted
exec ccode in environment
File "/Users/ra/Documents/Desarrollo/wiki/applications/init/views/
plugin_wiki/page.html", line 111, in
File "
On Mon, May 9, 2011 at 3:46 PM, Martín Mulone wrote:
> current.db = DAL(..)
>
The db doesn't belongs to app?
current.app.db = DAL(...)
On May 9, 2011, at 12:57 PM, Bruno Rocha wrote:
> On Mon, May 9, 2011 at 3:46 PM, Martín Mulone wrote:
> current.db = DAL(..)
>
> The db doesn't belongs to app?
>
> current.app.db = DAL(...)
>
Yes, I think that's better.
I have not used web2py for a while, so I am upgrading to the latest
version 1.95.1
Everything seems OK on Windows.
But there are formatting problems on my linux server. It looks to me
like CSS is not working. For example, http://66.199.140.183:8000/examples
shows plain text on a white backgroun
turns out codemirror is broken for me under chrome. The cursor gets
stuck 100% of the times.
On May 8, 6:21 pm, Massimo Di Pierro
wrote:
> If you send me a patch with search/replace/full-screen/save buttons +
> {ctrl}+S, I will include codemirror.
> You need trunk since stable codemirror has no p
Hi,
is there any way to get the current domain in routes.py? The request
object is not defined in routes.py.
The reason for this is that I want to build some links over https with
routes_out. Since you have to give a full URL as the second parameter
I need to prepend the domain.
Thanks a lot for
Instead of using a database table as an intermediary you should take a
look at using an actual message queue. I'm personally using
BeanstalkD with the BeanstalkC python module.
When a new message is created, you could create a bit of JSON that
contains the message and the list of recipients. The
This work fine:
def combo():
usuarios=db(db.auth_user.registration_key=='pending').select()
form = (SELECT([OPTION(usuarios[0].username,
_value=usuarios[0].id) for texto in
usuarios],_name='combo'))
return dict(form=form)
This not work fine, does not appear the form:
def combo():
Hi
seems, I can not update table that has multi-select widgetas one of
the fields unless that is specifically updated... . I'm using the
audit trail code and multi-select widget, both from web2pyslices.
Anybody know of a work around? My only idea is to have a selectable
"update/no_update" to tog
I usually see it like this: "form = FORM(SELECT..."
http://web2py.com/book/default/chapter/07#FORM
On Monday, May 9, 2011 6:22:12 PM UTC-4, luifran wrote:
>
> This work fine:
> def combo():
> usuarios=db(db.auth_user.registration_key=='pending').select()
> form = (SELECT([OPTION(usuarios[0].username,
> _value=usuarios[0].id) for texto in
> usuarios],_name='combo'))
> retur
It depends. You can do
http://web2py.com/book/default/chapter/04?search=routes#Pattern-Based-System
routes_in = (
('140\.191\.\d+\.\d+:https://www.web2py.com:POST /(?P.*)\.php',
'/test/default/index?vars=\g'),
)
You can have regex in pattern for hostname
On May 9, 3:45 pm, Dan wrote:
> Hi,
>
Please post the relevant code so we can reproduce the problem.
On May 9, 5:47 pm, mart wrote:
> Hi
>
> seems, I can not update table that has multi-select widgetas one of
> the fields unless that is specifically updated... . I'm using the
> audit trail code and multi-select widget, both from web
On 9 mayo, 11:29, rixder wrote:
> Solved...
> I've added:
> div.comment table tbody tr td pre {
> white-space: pre !important;
>
> }
>
I don't know if this is related, but I had the same problem using the
code widget in plugin_wiki
``
...
``:code
and solved it removing two lines from base.cs
Hi
Do you guys know what is really happening if I use multiprocessing
code in side controller.
http://docs.python.org/library/multiprocessing.html
I plan to install the application finally in web2py with wsgi -
apache . What type of risk I am taking? It is really giving me a
headache to try to un
Hello!
I have written two extra plugins for plugin-wiki, one for using Gallery:
http://galleria.aino.se/
and another for using videojs (html5 video with flash fallback):
http://videojs.com/
Are you interested? Then how should I ship them: isolated or as a
patch to plugin_wiki? They are ve
it can be done but what problem are you trying to solve?
there are lots counterindications. For start you introduce a serious
DoS vulnerability.
queue your tasks in a database table and have a background process
deal with them.
On May 9, 3:58 pm, frasse wrote:
> Hi
> Do you guys know what is rea
Please post them. I am interested in including them in plugin_wiki.
On May 9, 4:59 pm, Pablo Angulo wrote:
> Hello!
> I have written two extra plugins for plugin-wiki, one for using Gallery:
>
> http://galleria.aino.se/
>
> and another for using videojs (html5 video with flash fallback):
>
>
I was trying to process it inside onvalidation= ...
On May 9, 10:53 pm, Anthony wrote:
> On Monday, May 9, 2011 10:37:02 AM UTC-4, niknok wrote:
>
> > I tried:
>
> > form=SQLFORM.factory(
> > Field('card_number','string'
> > ,label='Enter a card number to verify'
> >
Yes, guys thanks. I realized that that was the culprit this morning.
Hard to decode with beer fogging your thoughts... :P
Reverted to the original and all is working again. I forgot I was
testing that line from a code in the book.
On May 9, 11:01 pm, Anthony wrote:
> On Monday, May 9, 2011 10:45
Do filters work with SQLFORM.factory? I'm not sure CRYPT returns an
encrypted string so much as it causes the string to be encrypted when
SQLFORM puts it in the DB. I could be wrong.
I can't seem to get any of my model changes to migrate to Postgres. I've
tried various combinations of turning migrate and fake_migrate on and off.
Deleting and re-adding Fields(). I'm not sure what else to try or where to
look. I still have no idea what the .table or sql.log files do. Should I
On Monday, May 9, 2011 10:32:13 PM UTC-4, niknok wrote:
>
> I was trying to process it inside onvalidation= ...
Note sure I understand. Can you show your full code (including where/how you
are finding form.vars.card_number unencrypted)?
On Monday, May 9, 2011 10:59:46 PM UTC-4, pbreit wrote:
>
> Do filters work with SQLFORM.factory? I'm not sure CRYPT returns an
> encrypted string so much as it causes the string to be encrypted when
> SQLFORM puts it in the DB. I could be wrong.
When I create a SQLFORM.factory with a require
Hello!
How can I fill a drop box widget with content depends of another drop
box? I'll explain better: I have 3 tables:
db.define_table('categoria',
SQLField('nombre', notnull=True),
format='%(nombre)s')
db.define_table('subcategoria',
SQLField('ca
Hi Massimo,
thanks a lot for your quick reply. I need the domain/hostname in the
second part of routes_in. I can't hard code the domain name because of
out build system. routes_in have to use the current domain or some
kind of wildcard.
Is there any way?
Thanks again.
On May 10, 3:57 am, Massim
search "cascading select" or "cascading dropdowns"
On May 10, 1:24 pm, pepe_eloy wrote:
> Hello!
>
> How can I fill a drop box widget with content depends of another drop
> box? I'll explain better: I have 3 tables:
>
> db.define_table('categoria',
> SQLField('nombre', notnull=Tru
Anthony, sorry for the typo. I meant calling onvalidation=, and not
onaccept
That is the behavior I'm expecting, since I've seen that work like so
before. Here's a stripped-down version of the function:
def cnv():
c_hash=request.args(0)
form=SQLFORM.factory(
Field('card_number','s
i'm sorry. my mistake
here is the whole thing:
in db.py
+
db.define_table('racun',
Field('stevilka_racuna','integer',label='številka računa'),
Field('datum_racuna','date',label='datum računa'),
Field('datum_dobave','date',label='datum
70 matches
Mail list logo