Re: [web2py] Re: REF: Upload of Files

2013-03-21 Thread Teddy Nyambe
Ok great and thanks for all your help, the file is being saved and all works as expected!!! code that works below: def index(): form = SQLFORM.factory(Field("first_name"),Field("quotes_file", "upload", uploadfolder=os.path.join(request.folder, 'uploads'))) test = '' first_name = ''

Re: [web2py] Re: Pythonanywhere down today?

2013-03-21 Thread Roberto De Ioris
> i still can access it both of web2py.com and my own > All fine from both Italy and Germany -- Roberto De Ioris http://unbit.it -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails f

[web2py] Re: Pythonanywhere down today?

2013-03-21 Thread 黄祥
i still can access it both of web2py.com and my own -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: record representation format that refer to another table and that table is refer to another table

2013-03-21 Thread 黄祥
thank you so much for your hint, anthony, but when i test it both of it return an error, any idea about this? IS_IN_DB(db(db.room.status=='Available'), db.room.id, label=lambda r: '%s %s' % (r.room.branch.address, r.room.room_no)) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14

[web2py] Re: postgres error

2013-03-21 Thread yashar
thank you, very helpful. On Thursday, March 21, 2013 11:57:40 PM UTC+3:30, Niphlod wrote: > > just to clear out doubts. > a field 'reference sometable' gets: > - a foreign key to the id of sometable > - a validator that by default builds up on the format argument of > sometable > > you CAN'

[web2py] Re: record representation format that refer to another table and that table is refer to another table

2013-03-21 Thread Anthony
No, IS_IN_DB does not take a "represent" argument, but it does take a "label" argument that works similarly (though the lambda takes only a single argument -- the record): IS_IN_DB(db(db.room.status=='Available'), db.room.id, label=lambda r: '%s %s' % (r.room.branch.address, r.room.roo

[web2py] Re: record representation format that refer to another table and that table is refer to another table

2013-03-21 Thread 黄祥
it's work well, thank you very much anthony. it seems the 'represent' can't work in validators : requires. actually i'm also want the represent format in the form too. when i try to use the represent in requires an error is occured. did you know how to do it in requires field? when using : db.b

[web2py] Re: Access data in PUT request for @request.restful()

2013-03-21 Thread Massimo Di Pierro
if request.env.request_method=='POST': put_vars = request.post_vars basically request.post_vars are the variables in body whether it is PUT or POST or other. On Thursday, 21 March 2013 19:10:27 UTC-5, Daniel Gonzalez wrote: > > Hi, > > How can I access the data in the PUT request? (in the

[web2py] Pythonanywhere down today?

2013-03-21 Thread Cliff Kachinske
The Python anywhere web site was down earlier today. Were the hosted apps down at the same time? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un

[web2py] Any Apache wizard - another dumb question

2013-03-21 Thread Cliff Kachinske
My Webfaction account uses Apache with workers for MPM. It seems that any memory allocated to a process spawned by an Apache worker actually clings to that worker after the process finishes. That's why there is a maximum_requests_per_worker directive. Could it be that big database migrations c

[web2py] Re: record representation format that refer to another table and that table is refer to another table

2013-03-21 Thread Anthony
The "format" attribute does propagate, so you'll have to write your own "represent" function for the "room" field (not tested): Field('room', 'reference room', represent=lambda id, r: '%s %s' % (r.room. branch.address, r.room.room_no)) The above represent function uses recursive selects, which I

[web2py] record representation format that refer to another table and that table is refer to another table

2013-03-21 Thread 黄祥
hi, did anyone know how to show record representation format that refer to another table and that table is refer to another table? e.g. *db.py* db.define_table('branch', Field('address', 'text'), Field('zip'), Field('city'), Field('country'), Field('phone'), Field('fax'),

[web2py] Access data in PUT request for @request.restful()

2013-03-21 Thread Daniel Gonzalez
Hi, How can I access the data in the PUT request? (in the body of the request) Can this be automatically parsed (my data is JSON) Thanks, Daniel -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop rece

Re: [web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Anthony
No, there is no onlogout function in web2py (either in globals or in the Auth class). Rather, the logout() function takes an "onlogout" argument, which is a callable -- so this code: if onlogout: onlogout(self.user) is inside the logout() function, and the "onlogout" referenced ther

[web2py] Re: Doing validation using sqlform grid onupdate or ondelete callbacks

2013-03-21 Thread luismurciano
Hi There are some easy ways to do it. If the owner reference is in the row you can use before and after callbacks something like: db.mytable._before_update.append(lambda s,r: True if r.owner == auth.user_id else Fa

[web2py] Embed MP3 audio player in HTML via web2py

2013-03-21 Thread wwwgong
Check out my app at wwwgong.pythonanywhere.com/rpad I embed video mp3 and img I can share the code if interested -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: [web2py] Re: REF: Upload of Files

2013-03-21 Thread Anthony
Recall that the suggestions to forego calling form.process() and instead just check for and directly manipulate request.vars.quotes_file was assuming you did not want to permanently store the file. If you do want to keep the file, then you should call form.process() (or include code to manually

Re: [web2py] Webfaction out of memory? Hardly seems possible

2013-03-21 Thread Tito Garrido
I am also having memory issues on dreamhost VPS... only 3 people accessing it... On Thu, Mar 21, 2013 at 4:46 PM, Cliff Kachinske wrote: > Can anyone shed light on this? > > Webfaction shut me down this morning at a very inconvenient time, claiming > that I had exceeded my 256 Meg of memory. >

[web2py] Re: postgres error

2013-03-21 Thread Cliff Kachinske
My bad. How could I not remember that? On Thursday, March 21, 2013 4:27:40 PM UTC-4, Niphlod wrote: > > just to clear out doubts. > a field 'reference sometable' gets: > - a foreign key to the id of sometable > - a validator that by default builds up on the format argument of > sometable

Re: [web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Richard Vézina
Forgot! Sorry for the noise... So with w2p 2.3.2 get onlogout and logout_onlogout So Annet must have a mistake in his code or the on_logout change for onlogout I guess... Richard On Thu, Mar 21, 2013 at 4:16 PM, Niphlod wrote: > if you search with grep you should do it recursively > >

[web2py] Re: postgres error

2013-03-21 Thread Niphlod
just to clear out doubts. a field 'reference sometable' gets: - a foreign key to the id of sometable - a validator that by default builds up on the format argument of sometable you CAN'T have a foreign key to a table and have the requires parameter with is_in_db() building a string value. S

Re: [web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Niphlod
if you search with grep you should do it recursively grep -nR 'onlogout' * R for recursively, n for the line number. On Thursday, March 21, 2013 9:03:55 PM UTC+1, Richard wrote: > > :~/version_232/web2py$ grep 'onlogout' * > > Return nothing!! > > Richard > > > On Thu, Mar 21, 2013 at 3:43

[web2py] Re: Doing validation using sqlform grid onupdate or ondelete callbacks

2013-03-21 Thread Cliff Kachinske
I would do onvalidate. Then you can redirect before damage is done or you can do something like: form.errors['the_restricted_field'] = "Gotcha!! What were you thinking? You cannot edit this record. Go away." You may wish to use a less abusive error message. On Thursday, March 21, 2013 2:26

Re: [web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Richard Vézina
:~/version_232/web2py$ grep 'onlogout' * Return nothing!! Richard On Thu, Mar 21, 2013 at 3:43 PM, Niphlod wrote: > on trunk there is such a function, however it takes only user as a > parameter > > if onlogout: > onlogout(self.user) > > > On Thursday, March 21, 2013 6:48:40 PM UT

[web2py] Re: postgres error

2013-03-21 Thread Cliff Kachinske
The syntax may be correct per the manual, but IS_IN_DB tells Postgres to create a foreign key constraint on the field. If you look at the tables with psql or pgadmin you will see this is so. A foreign key constraint is always on the primary key of the foreign table. It has to be this way to g

[web2py] Webfaction out of memory? Hardly seems possible

2013-03-21 Thread Cliff Kachinske
Can anyone shed light on this? Webfaction shut me down this morning at a very inconvenient time, claiming that I had exceeded my 256 Meg of memory. The had an output from ps -u ... that supposedly showed my 5 Apache workers had consumed ~ 50 meg each. I don't see how this is possible. The sit

[web2py] Smartgrid: tamanho (largura) das colunas?

2013-03-21 Thread Fernando Lucas
Como posso alterar o tamanho (largura) das colunas do smartgrid? Obrigado Fernando -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@goog

Re: [web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Niphlod
on trunk there is such a function, however it takes only user as a parameter if onlogout: onlogout(self.user) On Thursday, March 21, 2013 6:48:40 PM UTC+1, Richard wrote: > > I don't see any decaration of on_logout in web2py 2.3.2, search the book > for on_logout lead to nothing eith

[web2py] Re: postgres error

2013-03-21 Thread Alan Etkin
> there is no string validator, i just use IS_IN_DB to create drop down widget Yes, sorry, I checked the api and it seems you are using the correct syntax. Does it work using IS_IN_DB (db, db.countries.country_name) instead? -- --- You received this message because you are subscribed to th

[web2py] Re: postgres error

2013-03-21 Thread yashar
there is no string validator, i just use IS_IN_DB to create drop down widget On Thursday, March 21, 2013 10:26:38 PM UTC+3:30, Alan Etkin wrote: > > the form is created by the admin app, no validation error, just i get this >> error for any insert with relation. >> > > Wait, your model has someth

[web2py] Re: postgres error

2013-03-21 Thread Alan Etkin
> > the form is created by the admin app, no validation error, just i get this > error for any insert with relation. > Wait, your model has something odd (at least for me) Since countries is a reference value, AFAIK, it must be an integer. But you are using a string validator. I don't think th

Re: [web2py] Mongodb error in appadmin

2013-03-21 Thread Mike Veltman
On 03/21/2013 08:06 PM, Alan Etkin wrote: > > I would love to have some pointers about how though define mongo in > db.py in a proper nosql way. > > > Could you open an issue at the project page? > Done :-) Issue 1401 : Mongodb error

[web2py] Re: postgres error

2013-03-21 Thread yashar
the form is created by the admin app, no validation error, just i get this error for any insert with relation. i dont understand. On Thursday, March 21, 2013 10:06:54 PM UTC+3:30, Alan Etkin wrote: > > insert or update on table "testing" >> violates foreign key constraint "sea_inquery_origin_f

[web2py] Re: postgres error

2013-03-21 Thread Alan Etkin
> > insert or update on table "testing" > violates foreign key constraint "sea_inquery_origin_fkey" DETAIL: Key > (origin)=(0) is not present in table "countries". Are you setting 0 value for the foreign key? If you are in the admin app, the insert form should not pass validation unless yo

[web2py] Doing validation using sqlform grid onupdate or ondelete callbacks

2013-03-21 Thread Jean-Baptiste Fuzier
Hi, I am having trouble finding the right way to do this : - I have a table, each row has an owner which is the only one allowed to edit or delete it - Ownership is represented thanks to auth_permission (permission 'owner') - I would like to use ondelete and onupdate callbacks to v

[web2py] Re: web2py and timezones

2013-03-21 Thread Massimo Di Pierro
:-) On Thursday, 21 March 2013 12:51:26 UTC-5, Derek wrote: > > Massimo, I think you need a new keyboard, looks like your 'o' key is > failing you. Either that, or the ring finger on your right hand has a > problem. Twice now there's a missing 'o'. > > On Thursday, March 21, 2013 8:33:42 AM UTC-

[web2py] Import MySQL module in Web2py on mac

2013-03-21 Thread Aditya Harish
I use Mac Os X Lion I open the web2py app directly for the server rather than using the terminal to open. I want to use MySQL database. SO where should I place the MySQL db module so that I can import it in the server. For a Windows System we can direclty copy the contents to site-packages fo

Re: [web2py] Re: REF: Upload of Files

2013-03-21 Thread Teddy Nyambe
But the question again is where is the file stored, its not appearing in the specified uploads directory for manipulation. What I want to do is upload an excel sheet with specific columns of data, then get the data and insert into db with similar columns On Mar 21, 2013 6:48 PM, "Anthony" wrote:

[web2py] Re: web2py and timezones

2013-03-21 Thread Derek
Massimo, I think you need a new keyboard, looks like your 'o' key is failing you. Either that, or the ring finger on your right hand has a problem. Twice now there's a missing 'o'. On Thursday, March 21, 2013 8:33:42 AM UTC-7, Massimo Di Pierro wrote: > > I have a major patch from Niphlod that r

Re: [web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Richard Vézina
I don't see any decaration of on_logout in web2py 2.3.2, search the book for on_logout lead to nothing either... Could it be your own custom function?? Richard On Thu, Mar 21, 2013 at 3:08 AM, Annet wrote: > After upgrading to web2py version 2.4.4 this no longer works: > > auth.settings.logou

[web2py] Re: How to create a loop to add multiple child records

2013-03-21 Thread Derek
I'm glad you like it, and it's interesting, but this way is not secure, since it is susceptible to double submit and CSRF. I would only recommend this way if you are building an internal only website. You should probably have a formkey to protect against it. On Wednesday, March 20, 2013 6:44:16

[web2py] postgres error

2013-03-21 Thread yashar
db.define_table('countries', Field('country_name') ) db.define_table('testing', Field('origin','reference countries',requires=IS_IN_DB(db,'countries.country_name',error_message='Choose origin country')) ) when i try to input testing from database administration, i get this error

Re: [web2py] Re: REF: Upload of Files

2013-03-21 Thread Anthony
> > if request.vars.quotes_file: Sorry, I didn't realize this, but apparently if you do "if [cgi.FieldStorage object]" you get False rather than True, so instead try: if hasattr(request.vars.quotes_file, "file"): or import cgi if isinstance(request.vars.quotes_file, cgi.FieldStorage)

[web2py] Re: package import

2013-03-21 Thread Phillipp Schmidt
Yes, I restarted a couple of times. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://gr

[web2py] how keepvalues if the page reload by the form don't even get submit?

2013-03-21 Thread Richard
Hello, I have a bizzard case where I need to set the number of input (more number of rows to be insert then inputs to be more precise) of a form... I create a bulk insert form that will insert many record at the same time but, if there is empty rows form will never submit since there is field i

[web2py] Re: package import

2013-03-21 Thread Massimo Di Pierro
Did you restart web2py after upgrade? On Thursday, 21 March 2013 10:38:47 UTC-5, Phillipp Schmidt wrote: > > I just updated to this version, but I am still getting the error. Fany > interface, though! > Do you know any working packages that I could try to see whether it has > something to do wi

[web2py] Re: How can I run multiple applications with multiple domains on nginx?

2013-03-21 Thread Massimo Di Pierro
Yes you can. From the point of nginx treat all domains as one. the use web2py routes.py to map different domains to different apps. On Monday, 18 March 2013 15:21:25 UTC-5, Tito Garrido wrote: > > Hi Folks, > > I am reading the book section: > http://web2py.com/books/default/chapter/29/13#Nginx

[web2py] Re: Why does appadmin execute conditional models?

2013-03-21 Thread Marin Pranjić
Sure, I can do that. Good idea :-) Thanks. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit ht

[web2py] Re: Why does appadmin execute conditional models?

2013-03-21 Thread Anthony
That's intentional. The idea is that appadmin needs access to all the models in order to be able to manage the whole database. If you don't want that for some reason, I think you should be able to change the name of appadmin.py and appadmin.html to something else (the model execution code speci

Re: [web2py] web2py 2.4.5 is OUT

2013-03-21 Thread Niphlod
see the other thread on web2py-developers for further details. On Thursday, March 21, 2013 4:19:22 PM UTC+1, Massimo Di Pierro wrote: > > I know they are not on travis.ci but they exist and can be extended to > include user applications. > > On Tuesday, 19 March 2013 18:07:35 UTC-5, Niphlod wrote

[web2py] Re: Backup & Restore problems

2013-03-21 Thread Niphlod
my point exactly it's a matter on how it's perceived as a one-solution-for-all-exporting-problem vs a rapid way to load fixtures/etc in your environment. On Thursday, March 21, 2013 4:41:48 PM UTC+1, Anthony wrote: > > Removing the functionality altogether seems extreme. However, perhaps we

[web2py] Re: Backup & Restore problems

2013-03-21 Thread Anthony
Removing the functionality altogether seems extreme. However, perhaps we should change the documentation to remove the backup/restore terminology (i.e., we can describe it as a way to "export" and "import" an entire db, but not recommend it as a primary backup strategy and instead recommend nat

[web2py] Re: package import

2013-03-21 Thread Phillipp Schmidt
I just updated to this version, but I am still getting the error. Fany interface, though! Do you know any working packages that I could try to see whether it has something to do with my setup? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py] Re: Ref: Problem with simple file upload

2013-03-21 Thread Massimo Di Pierro
I think the problem my be this: {{=BEAUTIFY(request.vars)}}. What if you remove it? On Thursday, 21 March 2013 08:56:44 UTC-5, software.ted wrote: > > This is a repost cause it did not receive much feedback. > > I have noticed an error in the code below. The book emphasises on upload > file stor

[web2py] Re: web2py and timezones

2013-03-21 Thread Massimo Di Pierro
I have a major patch from Niphlod that replace my naive implementation with one based on pytz. I agree this is the way to go. We have two open issues: 1) should be include pytz in web2py r make it a depencency 2) should we do the pytz import in web2py or should we pass pytz objects to validators

[web2py] Re: package import

2013-03-21 Thread Massimo Di Pierro
This was fixed in 2.4.5. What version of web2py are you using? On Wednesday, 13 March 2013 09:47:38 UTC-5, Phillipp Schmidt wrote: > > I want to use the tablib package. https://github.com/kennethreitz/tablib > So I put it in the modules folder of my application and use `import > tablib`. > Altho

[web2py] Re: Error Working With mysql

2013-03-21 Thread Massimo Di Pierro
What is "wkaleh_db"? Is is defined somewhere in your code? On Thursday, 21 March 2013 03:38:35 UTC-5, mqa...@gardeniatelco.com wrote: > > Dear ALL , > > i am having some problems starting my project in mysql , it was working > fine in sqlite but its not creating any tables in mysql , here is the

[web2py] Re: How to embed Google player in a web2py generated web page to play files retrieved from the database.

2013-03-21 Thread Massimo Di Pierro
Probably the problem is the nested quotes in flashvars="audioUrl="{{=URL('download', args=image.file)}}" should be flashvars="audioUrl={{=URL('download', args=image.file)}}"> On Thursday, 21 March 2013 00:25:53 UTC-5, Gennaro Kukonu wrote: > > I am new to web2py, and I am trying to get an

Re: [web2py] How can I run multiple applications with multiple domains on nginx?

2013-03-21 Thread Richard Vézina
It's not specific to web2py, but may help you maybe : http://stackoverflow.com/questions/11773544/nginx-different-domains-on-same-ip The idea is to create a other server in nginx... Richard On Mon, Mar 18, 2013 at 4:21 PM, Tito Garrido wrote: > Hi Folks, > > I am reading the book section: >

[web2py] Re: installing web2py service on Windows, passing account credentials doesn't work

2013-03-21 Thread Massimo Di Pierro
I believe there is problem in parsing options. Those options are not web2py options. They are winservice options. Please pen a ticket about this. On Wednesday, 20 March 2013 09:36:18 UTC-5, wprins wrote: > > Hi, > > I'm trying to set up web2py with alternate account credentials via the > comman

Re: [web2py] web2py 2.4.5 is OUT

2013-03-21 Thread Massimo Di Pierro
I know they are not on travis.ci but they exist and can be extended to include user applications. On Tuesday, 19 March 2013 18:07:35 UTC-5, Niphlod wrote: > > if you're referring to gluon/tests/test_web.py they aren't (at least in > travis-ci). > you're required to have a running webserver in a

[web2py] Re: Backup & Restore problems

2013-03-21 Thread dederocks
Yes - unless someone finds a good use for these two functions. It looks to me that if a record has been removed in a db (e.g. id is not continuous: 1, 2, 4, 5 for example), the restore won't work if the table is linked to another table. This is I think a sufficiently likely case to remove the fu

[web2py] Re: Backup & Restore problems

2013-03-21 Thread Niphlod
so you'd prefer to have it removed alltogether ? On Thursday, March 21, 2013 3:37:44 PM UTC+1, dederocks wrote: > > Thanks Ales, > Basically, you're confirming the native backup / restore choice. I'm > concerned though that web2py's csv solution is not reliable, and should > therefore be used wi

[web2py] Re: Backup & Restore problems

2013-03-21 Thread dederocks
Thanks Ales, Basically, you're confirming the native backup / restore choice. I'm concerned though that web2py's csv solution is not reliable, and should therefore be used with high caution -- not to say a word about how slow it is. It feels sad for me that web2py which other than that an incred

Re: [web2py] Re: How to create a loop to add multiple child records

2013-03-21 Thread 黄祥
i'll take a look and send it too you the file on the discussion that i've refer above. On Wednesday, March 20, 2013 9:36:49 PM UTC+7, Alex Glaros wrote: > > thanks for the attached full example Steve > > did you write it just to assist for this topic? > > When I go to the app page I get: > > inva

[web2py] Re: auth.has_permission(...) slow -- any way to speed this up?

2013-03-21 Thread weheh
Not exactly. The fields in rows are indices into db.my_table. len(rows) is a small variable number, say around 8. But there it is, anyway. Thank you Mr. Niphlod. Good work! bad_rows = db((db.my_table.id.belongs(rows)) & (auth.accessible_query('update', db.my_table, user_id))).select

[web2py] Re: Backup & Restore problems

2013-03-21 Thread LightDot
I solved a similar case by writing a function to a) use native postgres dump and archive the database and b) present the file to the user for download in the administrative back-end. This function is triggered by cron in my case, but it could also be executed on demand. For this I would use the

[web2py] Ref: Problem with simple file upload

2013-03-21 Thread Teddy Nyambe
This is a repost cause it did not receive much feedback. I have noticed an error in the code below. The book emphasises on upload file storage in the db, but what about simple upload and manipulation. I have created a very simple form to test the upload without using components. The code is as fo

[web2py] Re: Backup & Restore problems

2013-03-21 Thread dederocks
Indeed, or quite close: https://code.google.com/p/web2py/issues/detail?id=1387. And to be accurate, I think the issue has more to do with restore than backup. To build on your comment, there are indeed two ways to deal with backup / restore: 1- managed by the database manager using native backu

[web2py] Re: auth.has_permission(...) slow -- any way to speed this up?

2013-03-21 Thread Niphlod
So, basically you're doing "get me 150K rows, put them in a list" "for each of them, query the db for permission" "if query doesn't return True, scan the 150K list and remove this instance" Cycling 150K and removing from a list while checking surely will get your app killed. Firing one quer

[web2py] Re: Rocket server on two ports

2013-03-21 Thread Niphlod
on command-line should be, in your case web2py.py -i "0.0.0.0:80,0.0.0.0:443:keyfile.key:certfile.cer" using the options file, interfaces = [('0.0.0.0', 80), ('0.0.0.0', 443, keyfile.key, certfile.cer)] On Thursday, March 21, 2013 1:29:45 PM UTC+1, Tim Richardson wrote: > > > I'm struggling to

[web2py] Re: Backup & Restore problems

2013-03-21 Thread LightDot
Quite right, restoring from, let's say, native mysql dump to postgresql would most certainly not work. That's exactly why web2py uses csv as the export format. I don't think exporting / importing to csv is really recommended over using the native export / import functionality of your database e

[web2py] Re: Rocket server on two ports

2013-03-21 Thread Tim Richardson
I'm struggling to understand the interfaces syntax. Because I'm using this as a Windows service, I need to set up the options.py file. I see from the documentation ie python web2py.py --help that the ip option is ignored if interfaces is present. What about port (logically that should be ignored

Re: [web2py] Mongodb error in appadmin

2013-03-21 Thread Alan Etkin
> > I would love to have some pointers about how though define mongo in > db.py in a proper nosql way. > Could you open an issue at the project page? If you can, please provide: - The relevant part of the model - A possible set of data which would reproduce the error - Your mongodb driver, da

[web2py] auth.has_permission(...) slow -- any way to speed this up?

2013-03-21 Thread weheh
I have a table that represents a group, which has permissions on a row-by-row basis. User belongs to certain number of groups, and the rows into the table are kept for convenience sake. I would like to screen that list of rows for a specific permission and exclude those rows from the list. The

[web2py] Embed MP3 audio player in HTML via web2py

2013-03-21 Thread Gennaro Kukonu
I am new to using web2py, and I was wondering how to embed an MP3 player into a webpage using web2py. I have made a page with the embedded player, with the MP3 file in a SQL Lite DB, but I cannot get the file to play with the embedded player. I am not sure if this is relevant, but I have jpg an

[web2py] How to embed Google player in a web2py generated web page to play files retrieved from the database.

2013-03-21 Thread Gennaro Kukonu
I am new to web2py, and I am trying to get an embedded mp3 player to play audio files stored in a database locally. I am using Google player, and I got the following to work on my webpage developed in web2py: http://www.google.com/reader/ui/3523697345-audio-player.swf"; quality="best" flashv

[web2py] Error Working With mysql

2013-03-21 Thread mqadomi
Dear ALL , i am having some problems starting my project in mysql , it was working fine in sqlite but its not creating any tables in mysql , here is the error : Ticket ID 127.0.0.1.2013-03-21.11-35-49.b053e9f1-2194-47ee-b635-b00b1c370b0c (1146, u"Table 'wkaleh_db.news' doesn't exist") Ve

[web2py] Re: Why does appadmin execute conditional models?

2013-03-21 Thread Niphlod
uhm. I'm not familiar with the implementation, but appadmin needs to be a "global" management solution What if in your conditional model you defined a table and you want to manage that table from appadmin ? On Thursday, March 21, 2013 11:40:09 AM UTC+1, Marin Pranjić wrote: > > If I put a co

[web2py] Why does appadmin execute conditional models?

2013-03-21 Thread Marin Pranjić
If I put a code inside models/controller_name/something.py, it gets executed when running appadmin. Tested in 2.2.1 and trunk. Marin -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails

[web2py] Re: web2py and timezones

2013-03-21 Thread mart
hum... I use this and solves pretty much the bulk of the DLST issues that were problematic for me. http://pytz.sourceforge.net (its the Olsen TZ DB wrapped in python) I found it a little tricky at first, but once i got my head wrapped around the different permutations of dates (past, presents

[web2py] Re: package import

2013-03-21 Thread Phillipp Schmidt
Thanks for the advice! I checked all the folders and removed some example and doc folders that didn't include code. All the other folders contain inits. Still not working. I wonder if it is intended that way? Can you just put packages in modules that make global imports? -- --- You received

[web2py] Backup & Restore problems

2013-03-21 Thread dederocks
I'm concerned with the lack of reliability and speed of the recommended backup / restore functions: db.export_to_csv_file and db.import_from_csv_file. They failed in my case, and apparently I'm not alone (https://groups.google.com/forum/?fromgroups=#!newtopic/web2py/web2py/reOzXobYNgE). Would it

Re: [web2py] Mongodb error in appadmin

2013-03-21 Thread Mike Veltman
Op 21-03-13 17:50, Niphlod schreef: > seems to me that a lot of people are interested in using mongodb but > really few are contributing back with tests and patches. > > BTW: you DO know that Mongo generally doesn't play well with joins, > right ? Using references in mongodb is not a smart des

Re: [web2py] Mongodb error in appadmin

2013-03-21 Thread Niphlod
seems to me that a lot of people are interested in using mongodb but really few are contributing back with tests and patches. BTW: you DO know that Mongo generally doesn't play well with joins, right ? Using references in mongodb is not a smart design. -- --- You received this message be

[web2py] Mongodb error in appadmin

2013-03-21 Thread Mike Veltman
Created the following table mdb.define_table('syscommands', Field('commandname', type='string', unique=True, label=T('Commandname')), Field('commandline', type='string', label=T('Command')), Field('host_id', mdb.hoststable, comment="Like nim or

Re: [web2py] Re: bootstrap's modal and web2py's LOAD

2013-03-21 Thread Vincenzo Ampolo
On 03/20/2013 08:33 AM, Martín Miranda wrote: Here ... http://linuxapuntes.blogspot.com.ar/2013/03/plugin-modal-bootstrap-web2py.html Hi Marti'n, Richard, Thank for your time. Actually I think I solved it in another way allowing: 1) Load modal by an ajax call 2) use template system for modal

[web2py] Re: Send email with link to SQLFORM.grid edit form

2013-03-21 Thread Niphlod
there's a logic step that you are missing the grid is - usually - protected with signed urls, if you want to access the "edit" form of the grid itself. First of all, you should embed in the mail the signed url, otherwise a "not authorized" is expected. but, since the signature depends on the

[web2py] Mongodb error in appadmin

2013-03-21 Thread Mike Veltman
The action I have a table/collection with 3 objects In the table this is reverenced as Field('host_id', mdb.hoststable, comment="Like nim or hmc server.", label=T('Destination Host ID')), But when in appadmin I select a other object to change then it throws a error. The err

[web2py] MySQL Error

2013-03-21 Thread Relsi Hur Maron
I have this action that verify is a group exist, if not, it create this group: verify_install = db(db.auth_group.role == 'admin').select() if not verify_install: auth.add_group('admin', 'Administrative Group') redirect

[web2py] auth.settings.logout_onlogout = lambda user: on_logout(auth,session)

2013-03-21 Thread Annet
After upgrading to web2py version 2.4.4 this no longer works: auth.settings.logout_onlogout = lambda user: on_logout(auth,session) I get the following error: global name 'on_logout' is not defined. on_logout(auth,session) is a function in a module which clears all the settings of the cms part