[web2py] Re: Better record deletion in SQLFORM

2010-05-28 Thread Iceberg
Hi tiger, Sqlite is typeless. So as long as your app works fine with your latest adjustment, I think it is ok. By the way, please don't hijack a thread. It easily makes subsequent readers distracted from the original post. Thanks for cooperation. On May29, 7:28am, GoldenTiger wrote: > Another

[web2py] Question about the wiki

2010-05-28 Thread Doug Warren
I'm not sure if the group is the correct place to ask questions about the wiki or not, so if it's not the right place please let me know what is... I've used python a bit in the past but needed a refresher so I started going through the tutorial in the web2py book and ran across the following: htt

[web2py] Re: Question on IS_IN_DB and sort order

2010-05-28 Thread Candid
db.your_table.your_field.requires = IS_IN_DB(db, 'person.id', '% (name)s', orderby='person.name')) On May 28, 9:38 am, David Marko wrote: > Is there a way, how to specify order(sorting) in IS_IN_DB ? Its easy > to use it for validator and let web2py to generate combobox. How can I > specifiy 'ord

[web2py] Re: Plugin_jqgrid problem

2010-05-28 Thread GoldenTiger
did you insert any record? On 28 mayo, 15:28, leo wrote: > Hi,everyone, i'm a newbie for web2py,I'm in trouble  when I use the > plugin_jqgrid. this is  my code: > > my dbmodel: > > db.define_table("data", >       SQLField("name", notnull=True, default=None), >       SQLField("date",notnull=True)

[web2py] Re: Better record deletion in SQLFORM

2010-05-28 Thread GoldenTiger
Another extrange behaviour I noted is in T3. 1) I defined a table and I inserted a value in a int record. 2) I noted I was worng with the type field, I wanted a string, so I deleted the record and redefined type field in define_table 3) I changed the type of record from int to string, web2py r

[web2py] Re: Complicated Join...

2010-05-28 Thread howesc
check out www.tenthrow.com, click on a concert and you will see an "other concerts" box. those are generated following several rules, the first if finding concerts that share tags with this concert. My tags have a "magnitude" or a weighting, so some are more valued than others. hence the magnitu

[web2py] Complicated Join...

2010-05-28 Thread Jason Brower
I tried doing this last year and I was close and couldn't figure it out. I need to complete implementing it and wondered if you could help out. Using the attatched model I want to do the following: I need to have a list of all the users that have similar tags to the user that is logged in. I need t

[web2py] Re: New to web app development -- is web2py a good choice

2010-05-28 Thread Anthony
On May 6, 6:01 pm, mdipierro wrote: > I have not done a good job at keep track. These are two outdated > lists: > > http://www.appliedstacks.com/PoweredBy/web2py > http://web2py.com/poweredby > Note, the Powered By list on web2py.com includes a link to www.sahanapy.org (which now redirects to ede

[web2py] Filter records based on Subdomain value when running on GAE

2010-05-28 Thread Hala
Here is the code to print a certain record to match a subdomain or print all -- in case someone asks: try: appname = request.env.http_host.split('.')[0] app_id = db(db.app.name ==str.lower(appname)).select().first().id apps=db(db.app.id==app_id).select() return dict(

[web2py] Better record deletion in SQLFORM

2010-05-28 Thread Iceberg
Hello Massimo, This proposal tries to address the last point mentioned in [1], quoted below. ".. when deleting a record, form variables should be cleared which is not the case here. In my openion this’s not a good idea in fact, and needs to be fixed because it’s really tempting to see the

Re: [web2py] How to duplicate a record

2010-05-28 Thread Thadeus Burgess
myrecord = db.table[5] db.table.insert(a = myrecord.a, b = myrecord.b, c = myrecord.c) Are you looking for an audit logging ability? http://www.web2pyslices.com/main/slices/take_slice/35 -- Thadeus On Fri, May 28, 2010 at 7:13 AM, ceriox wrote: > Hi all, > how i can duplicate a record ? >

[web2py] Re: Autoincrement field

2010-05-28 Thread mdipierro
yes On May 28, 3:44 am, Mathieu Clabaut wrote: > I guess that one may want some more constraints on the autoincrement field. > For example, it shall begin at 100  for ecample. > It may be because for example, before the application exists some paper > records where made which were referenced by n

Re: [web2py] where is : scripts/web2py-wsgi.conf

2010-05-28 Thread Jean Guy
I got it! I miss the setup script!!! God. I am going to test it right now. Thanks. Jonhy 2010/5/27 Alexandre Andrade > 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

Re: [web2py] where is : scripts/web2py-wsgi.conf

2010-05-28 Thread Jean Guy
I start getting to the point... I mean, it seems that Deny from all Deny from all As to be to Allow from all Is that correct? But it's not working so far. Jonhy 2010/5/28 Jean Guy > Hi Alexandre, > > Ok! > > What I understand so far is... > > I have to create a file cal

[web2py] Question on IS_IN_DB and sort order

2010-05-28 Thread David Marko
Is there a way, how to specify order(sorting) in IS_IN_DB ? Its easy to use it for validator and let web2py to generate combobox. How can I specifiy 'order' form db query, so dropdown items are in good order? Something like db().select(db.person.ALL, orderby=db.person.name) ? Thank you, David

[web2py] Re: Plugin_jqgrid problem

2010-05-28 Thread zeng leo
> Hi,everyone, i'm a newbie for web2py,I'm in trouble when I use the > plugin_jqgrid. this is my code: > > my dbmodel: > > db.define_table("data", > SQLField("name", notnull=True, default=None), > SQLField("date",notnull=True), > SQLField("number", notnull=True, default=None), >

[web2py] Plugin_jqgrid problem

2010-05-28 Thread leo
Hi,everyone, i'm a newbie for web2py,I'm in trouble when I use the plugin_jqgrid. this is my code: my dbmodel: db.define_table("data", SQLField("name", notnull=True, default=None), SQLField("date",notnull=True), SQLField("number", notnull=True, default=None), SQLField("l

[web2py] Re: Storing API credentials

2010-05-28 Thread selecta
you cold do it the following way: add this to models/db.py import os.path from ConfigParser import ConfigParser class Config: ''' to configure please use the config file that is created with this class under unix systems you will find it under /home/YOURNAME/.pyMantis/plugin_maili

[web2py] How to duplicate a record

2010-05-28 Thread ceriox
Hi all, how i can duplicate a record ?

[web2py] Storing API credentials

2010-05-28 Thread scausten
I'm implementing PayPal on my site and would like to know the best practice for securely storing my API credentials (user, pass, signature). Can this go in the database (say in a 'credentials' table), or should it be elsewhere?

Re: [web2py] where is : scripts/web2py-wsgi.conf

2010-05-28 Thread Jean Guy
Hi Alexandre, Ok! What I understand so far is... I have to create a file call web2py.pid in /users/www-data/web2py Do I am right? Still have the "admin disabled because unable to access password file" message. Thanks Jonhy 2010/5/27 Alexandre Andrade > using the script setup***ubuntu.sh w

[web2py] Re: Moving apps outside /applications

2010-05-28 Thread biesiad
Thanks guys, I think symlinking will work perfectly. cheers

Re: [web2py] Re: Group some fields into a

2010-05-28 Thread Mathieu Clabaut
Ok... I'll try with that. On Fri, May 28, 2010 at 03:11, Candid wrote: > 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

Re: [web2py] Re: Autoincrement field

2010-05-28 Thread Mathieu Clabaut
I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number < 100) For such a problem, I've set up with: Fiel

[web2py] Re: Dependent drop downs

2010-05-28 Thread Iceberg
On May28, 2:38pm, Neveen Adel wrote: > 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

[web2py] Re: Autoincrement field

2010-05-28 Thread Iceberg
I guess the point here is, generally speaking, what is a secure way to make two or more subsequent DAL operations are performed without race condition. Is a kind of lock needed? An example to describe the problem (but not solving it): def index(): with a_lock_to_prevent_concurrent_requests: #

[web2py] Re: uploads problem

2010-05-28 Thread annet
The update_image(): function resides here: .../cms/homepage/update_image where cms is the application. Whereas I would like the image to be uploaded to this folder: .../init/uploads/company_xxx where init is the application How do I have to adjust this line of code to get it to work. db.ima