Hello,
I have
db.define_table('type',
SQLField('name','string',length=2)
SQLField('parent','reference db.type')
)
db.define_table('member',
SQLField('name','string'),
SQLField('type',db.type),
SQLField('subtype',db.ty
On May 27, 9:57 pm, Julius Minka wrote:
> I found something in the archive.
> This seems to be multiple python versions issue, but still do not have a
> solution. Unfortunately, this server is preinstalled with python2.4 and
> I am trying to use 2.6, which can't be probably found undermod_wsgi
>
Use form.custom.widget. See http://web2py.com/book/default/section/7/7
for details.
On May 27, 4:48 pm, Mathieu Clabaut wrote:
> Hello
> In my model, I've a table defined as
>
> STATUS_TYPE = ('identification','analyse')
>
> db.define_table('faq',
> Field('status', 'string', requires=[IS_IN_S
using the script setup***ubuntu.sh will work fine.
2010/5/27 Jean Guy
> Hi dear web2py crew,
>
> I was trying to deploy web2py in production with apache2 under ubuntu
> server. I follow those informations in the web2py book :
> http://web2py.com/book/default/section/11/2
>
> I got : admin disa
Hi dear web2py crew,
I was trying to deploy web2py in production with apache2 under ubuntu
server. I follow those informations in the web2py book :
http://web2py.com/book/default/section/11/2
I got : admin disabled because unable to access password file
What do I have to do...
scripts/web2py-ws
What is wrong with the default id field that web2py creates for every
table?
On May 27, 3:16 pm, matclab wrote:
> Hello,
> I'm finding this message in a thread from February...
>
> I thought that autoincremented field would guaranty unicity in the
> table.
> I'm afraid the provided solution wo
You are right. We can do this better but the only improvement would be
speed.
On May 27, 2:06 pm, Iceberg wrote:
> > > > On May 11, 1:08 pm,Iceberg wrote:
>
> > > > > Hi Massimo,
>
> > > > > Right now validators are triggered even when a record is successfully
> > > > > being deleted. This can be
folder has to exist.
On May 27, 1:16 pm, annet wrote:
> Massimo,
>
> > if field is the upload field you can set
>
> > db.table.field.uploadfolder =
>
> This is my image table:
>
> db.define_table('image',
>
> Field('company_id',db.company,default='',notnull=True,ondelete='CASCADE',writable=F
yes.
On May 27, 12:54 pm, David Marko wrote:
> Well, it was my fault as description I provided was misleading. I just
> realised that permissions are being assigned to groups, so it means
> that it is assigned not to user id directly but to his group id? Do I
> understand it correctly?
>
> So fo
Now I understand. Add this at the end of your db.py
db.auth_permission.table_name.requires = IS_IN_SET(db.tables)
You can specify the list of tables you want to give permissions on.
On May 27, 12:48 pm, David Marko wrote:
> Yes, I just created a new app in web2py and added my model at the end
>
Oh... OK...
I thought I've missed another great feature of web2py... :-)
On Thu, May 27, 2010 at 21:48, Thadeus Burgess wrote:
> Me and my displaced mind... =)
>
> I ment "all of my controller functions are decorated with..."
>
>
>
> --
> Thadeus
>
>
>
>
>
> On Thu, May 27, 2010 at 2:31 PM, Mathi
Hello
In my model, I've a table defined as
STATUS_TYPE = ('identification','analyse')
db.define_table('faq',
Field('status', 'string', requires=[IS_IN_SET(STATUS_TYPE,
multiple=True),
IS_NOT_EMPTY(), IS_ORDERED(STATUS_TYPE)],
default=STATUS_TYPE[0],
widget=SQLFORM.widg
Well was affraid you would ask that.
And there're two very good reasons why I should not be me.
No expirence
No time at all, full time student with three jobs to pay it.
But since we have here at least three expirenced debian packagers.
I'll guess we could arange something there.
But before we
Hello,
I'm finding this message in a thread from February...
I thought that autoincremented field would guaranty unicity in the
table.
I'm afraid the provided solution would allow two record to have the
same autonumber field (think about an access from two users at the
same time).
I guess the
Me and my displaced mind... =)
I ment "all of my controller functions are decorated with..."
--
Thadeus
On Thu, May 27, 2010 at 2:31 PM, Mathieu Clabaut
wrote:
> Thank you for sharing !
> On Thu, May 27, 2010 at 19:16, Thadeus Burgess
> wrote:
>>
>> This is what I settled with:
>
>
>
Thank you for sharing !
On Thu, May 27, 2010 at 19:16, Thadeus Burgess wrote:
> This is what I settled with:
So obviously if they are admin, it leaves it alone and they see all tables.
>
> Also all tables are decorated with @auth.reuquires_membership('Operations')
>
> What do you mean by "ta
> > > On May 11, 1:08 pm,Iceberg wrote:
>
> > > > Hi Massimo,
>
> > > > Right now validators are triggered even when a record is successfully
> > > > being deleted. This can be annoying in case I am deleting old records
> > > > as below:
>
> > > > db.define_table('my_table',
> > > > Field('toda
Patch :
diff -r 9802a87428fa gluon/sqlhtml.py
--- a/gluon/sqlhtml.py Wed May 26 17:17:46 2010 +0200
+++ b/gluon/sqlhtml.py Thu May 27 20:37:56 2010 +0200
@@ -223,10 +223,15 @@
attr = OptionsWidget._attributes(field, {}, **attributes)
-if hasattr(field.requires, 'options'):
-
Reported as http://code.google.com/p/web2py/issues/detail?id=80
Hello,
I've met a problem with checkboxes and rzdio widgets:
The following works:
Field('status', 'string', requires=IS_IN_SET(STATUS_TYPE, multiple=True),
widget=SQLFORM.widgets.checkboxes.widget)
However if I add another
Massimo,
> if field is the upload field you can set
>
> db.table.field.uploadfolder =
This is my image table:
db.define_table('image',
Field('company_id',db.company,default='',notnull=True,ondelete='CASCADE',writable=False,readable=False),
Field('image_filename',writable=False,readabl
The bullet-proof solution should be setting twin-field primary key in
db level, I believe. Hope somebody can show us how to do that in
web2py db.define_table(...), if not using db.executesql('set up the
primary key blah blah').
On the other hand, in a non-db level, inside web2py, perhaps Massimo
w
Well, it was my fault as description I provided was misleading. I just
realised that permissions are being assigned to groups, so it means
that it is assigned not to user id directly but to his group id? Do I
understand it correctly?
So for example, when having two records in database, one have r
Yes, I just created a new app in web2py and added my model at the end
of db.py . I can see my table in list of tables in database admin, I
can even create new records. I cant see this table name in list of
tables when adding the new auth_permission usin appadmin. Combo box
with tables names contai
thanks Iceberg.
your approach is pretty much what I have right now. I'm looking for a
bullet-proof approach.
otherwise I'm running code with "fingers crossed two users don't use
the system at the same time"
and I want to encourage usage :)
C
On May 27, 6:09 pm, Iceberg wrote:
> On May27, 1
we can have more than one mantainer.
On May 27, 9:37 am, Luke Faraone wrote:
> Hi,
>
> On May 27, 7:38 am, Mark Breedveld wrote:
>
> > In order to set up a debian packaging proces we should have or do the
> > following
> > - The web2py community should have a maintainer (group)
> > - Whic
Not sure about the problem.
If you set crud.settings.auth=auth you have no permission on any table
(via crud) unless you explicitely say so. But this does not affect
appadmin.
The problem may be where you define the table. Is that done in a
model? Are you sure that is done after db.py?
On May 27
If you really want to give a permission to every group user A is
member of, you need to look over his/her membership and add the
permission to that group.
The problem is the opposite. If a user is no longer member of a group,
what happens to the permissions of those objects? That is why people
do
Hi,
On May 27, 7:38 am, Mark Breedveld wrote:
> In order to set up a debian packaging proces we should have or do the
> following
> - The web2py community should have a maintainer (group)
> - Which has manage the releases repo's
> - Ajust web2py for use through the repo
>
Hello,
Why I dont see my own tables in list if tables when creating
permission entry in standard app admin interface? Only 'auth_XXX'
tables are being listed here. Should I mark by tables somehow to be
able to assign permissions for them using app admin?
David
This is what I settled with:
if auth.is_logged_in() \
and auth.has_membership('Operations', auth.user.id) \
and not auth.has_membership('Admin', auth.user.id):
opdb = DAL(dal_connection, folder=folder, pool_size=pool_size,
check_reserved=check_reserved)
for table in db.ta
On May27, 11:32pm, Carl wrote:
> the flaw is in my architecture not web2py. can you help with a better
> approach? Needs to be BigTable-friendly to boot.
>
> I have two user types: Agents and Candidates
> Agents invite Candidates to Parties.
>
> I keep a Party table recording all such Party invite
I would like to hide all tables except the selected one from a user
unless they have specific privileges.
I am thinking maybe the following at the top of appadmin.py
if auth.has_permission('Operations', auth.user.id):
tables = [copy.copy(t) for t in db]
db = DAL(db._connection)
for t in
the flaw is in my architecture not web2py. can you help with a better
approach? Needs to be BigTable-friendly to boot.
I have two user types: Agents and Candidates
Agents invite Candidates to Parties.
I keep a Party table recording all such Party invites.
Candidates can be invited to the same Par
Just another method.
I symlink my projects folder into the applications so I have
~/Applications/web2py/
~/Workspace/Web/Blogitizor/
Symlink.
~/Applications/web2py/applications/blogitizor -> ~/Workspace/Web/Blogitizor/
--
Thadeus
On Thu, May 27, 2010 at 8:40 AM, Albert Abril wrote:
> What
In my app I need to maintain information who can read each item in
database and will use this criteria when fetching these items. Web2Py
built-in system seems to be very, very usefull. But there is one thing
that I dont know, how to resolve. The permissions to the items must
allow setup readers(re
Thanks, that worked.
In the meantime I also managed to install web2py as a service, and
setting the "options.py" to 0.0.0.0 and port 80 and it works fine.
Note IIS is disabled too.
Cheers for your help again..
On May 27, 2:31 pm, mdipierro wrote:
> Honestly I have never seen anybody configure w
What I do is:
· I have my ~/dev/mywebapp
· I have my /var/www/site/web2py/applications/mywebapp
· init a mercurial repositories in each one
· Sync one with other with mercurial.
With this, I have my code versioned.
got it. :-)
On May 27, 8:15 am, Nico de Groot wrote:
> Hi Massimo,
>
> Same problem exists in SQLserver (not surprising, uses the same code).
> I think that arguably the best solution would be to change the current
> JOIN X,Y ... WHERE [join condition] into X INNER JOIN Y ON [join
> condition]. T
Yes and no.
You havea couple of options:
1) symlink web2py/applications and /home/mydir/projects
2) use /home/mydir/projects/applications/myweb2pyapp1 instead of /
home/mydir/projects/myweb2pyapp1
and run web2py with
web2py.py --folder /home/mydir/projects/
In case 2) web2py will run off
Honestly I have never seen anybody configure web2py with windows
server and it may not be trivial (except in proxy mode) because it
requires this:
http://sourceforge.net/apps/trac/pyisapie
My guess is that you do not have pyisapie and you are running both the
built in web2py web server on 127.0.0
Welcome,
Is it possible to develop web2py application located in my usual
project directory?
eg.
/home/mydir/projects/myweb2pyapp1
/home/mydir/projects/myweb2pyapp2
Hello,
I had my web2py running happily on a windows 2003 server, or so I
thought, and when I went to check it to install an application it
seemed not to be running (no one's using it yet so can't tell when it
stopped). I tried stopping and starting it from the GUI, and it comes
up with "The page c
Thanks a lot Candid , it works fine with me
On May 27, 3:39 pm, Candid wrote:
> db.ticket.type.requires = IS_IN_DB(db(db.type.deleted == False),
> 'type.id', '%(name)s'))
>
> On May 27, 3:25 am, Neveen Adel wrote:
>
> > Hello,
>
> > i have table
>
> > db.define_table("type",
> > SQLField(
Yes. The system allows this and I encourage it. Still, people should
email and as to be listed.
On May 27, 6:55 am, Álvaro Justen wrote:
> On Thu, May 27, 2010 at 00:24, Alexandre Andrade
>
> wrote:
> >>or, is
> >>there any repository for web2py related application/plugins/slices?)
>
> > yes. Th
If I understand you refere to a "web2py-debian mantainer" not a mere
"web2py mantainer" which I guess I am. If I understand I nominate you
since you have spend some time on this.
On May 27, 6:38 am, Mark Breedveld wrote:
> My excuse for my late reaction, but you all landed up my spambox of my
> p
Hi Massimo,
Same problem exists in SQLserver (not surprising, uses the same code).
I think that arguably the best solution would be to change the current
JOIN X,Y ... WHERE [join condition] into X INNER JOIN Y ON [join
condition]. That would be a bigger patch...
For now I've used the patch by Ale
Posting a possible solution in trunk now.
in gluon/sqlhtml.py replace
if requested_delete:
return True
with
if requested_delete:
self.errors.clear()
return True
let me know if it works for you.
On May 27, 6:0
if field is the upload field you can set
db.table.field.uploadfolder =
It can be anything. If you make this user dependent (is the
uploadfolder depends on the logged_in user) you will run into one
problem. User A uploads and image into pathA. If user B wants to
download the image posted by u
# use this to get the count cached
def get_tbbooks_count(exp=3600):
cache.ram('tbbooks',lambda: db(db.tbbooks.id == 1).count(),exp)
# use this to create new tbbooks and update count
def increment_tbbooks_count(form=None):
cache.ram.increment('tbbooks')
form = crud.create(db.tbbooks,on
Do I understand correctly? When you submit a new db.whoelse. you want
to be redirected to a page in the list that shows it.
But messages are timestamped. When you submit a new now don't you get
redirected to page 1 which shows the last message?
Perhaps I do not understand what you mean.
Massimo
db.ticket.type.requires = IS_IN_DB(db(db.type.deleted == False),
'type.id', '%(name)s'))
On May 27, 3:25 am, Neveen Adel wrote:
> Hello,
>
> i have table
>
> db.define_table("type",
> SQLField("name", "string"),
> SQLField("deleted", "boolean",default=False),
> )
>
> and
>
> db.defi
I found something in the archive.
This seems to be multiple python versions issue, but still do not have a
solution. Unfortunately, this server is preinstalled with python2.4 and
I am trying to use 2.6, which can't be probably found under mod_wsgi
Julius
V Štvrtok, 27. máj 2010 o 12:54 +0200, Jul
On Thu, May 27, 2010 at 00:24, Alexandre Andrade
wrote:
>>or, is
>>there any repository for web2py related application/plugins/slices?)
>
> yes. The web2py.com has a place for applications (appliances)
>
> http://web2py.com/appliances
>
> Just send it to Massimo:
>
> mdipie...@cs.depaul.edu
Wow,
My excuse for my late reaction, but you all landed up my spambox of my
provider.
Which I've solved now.
Thank you both for your reaction.
You're (Jose) right on the best practices.
In order to set up a debian packaging proces we should have or do the
following
- The web2py community should have a
> On May 11, 1:08 pm,Iceberg wrote:
>
> > Hi Massimo,
>
> > Right now validators are triggered even when a record is successfully
> > being deleted. This can be annoying in case I am deleting old records
> > as below:
>
> > db.define_table('my_table',
> > Field('today', 'date',
> > requ
I was too fast.
It works when accessed on port.
It doesn't when accessed through mod_wsgi:
File "gluon/sql.py", line 3835, in DAL
migrate=migrate, fake_migrate=fake_migrate)
File "gluon/sql.py", line 959, in __init__
self._pool_connection(lambda : psycopg2.connect(msg))
File "gluon/sq
I found the reason by removing exception catching when connecting to
Postgres in gluon/sql.py.
It told me that this line
self._execute("SET standard_conforming_strings=on;")
is a problem.
I commented it out and everything is fine until now.
Can this removal have a side effect?
Julius
V Št
In web2py I have a cms application and an init application. In the cms
application I have a function in which users can upload images for a
view which contains four images, the problem is that this view is in
the init application not in the cms application, whereas the images
end up in the uploads
I did that as first thing. No luck.
I changed it to IP as I it works from command line.
Julius
V Streda, 26. máj 2010 o 19:41 -0500, Thadeus Burgess napísal(a):
> Try
>
> postgres://w2p:passw...@localhost:5432/w2p
>
> --
> Thadeus
>
>
>
>
>
> On Wed, May 26, 2010 at 5:17 PM, Julius Minka
Great thanks! Any other ideas from anyone to speed this up further?
On May 27, 3:25 am, Mr admin wrote:
> OK here's an example of counting matching records with web2py syntax.
>
> SQL version
> select count(*) from tbbooks where id = 1 group by id;
>
> Note! if you don't add the GROUP BY
Thanks all for answering friends! I've extracted some good info from
this discussion, and the solution proposed by Massimo work well :)
Hello,
i have table
db.define_table("type",
SQLField("name", "string"),
SQLField("deleted", "boolean",default=False),
)
and
db.define_table("ticket",
SQLField("name", "string"),
SQLField("type", db.type ),
)
// here in ticket will display a drop down of types, i wa
62 matches
Mail list logo