[web2py] Re: auto_import + folder

2015-01-19 Thread Dmitry Ermolaev
solved: folder='applications/bs3b/databases', # it work! понедельник, 19 января 2015 г., 15:31:29 UTC+3 пользователь Dmitry Ermolaev написал: how connet to app bs3b databese without absulute path? db = DAL(sqlite://storage.sqlite, # -- in web2py\applications\bs3b\databases\

[web2py] Re: Stripe - Create a customer.

2015-01-19 Thread Massimo Di Pierro
this is nice and clean! :-) On Sunday, 18 January 2015 20:03:56 UTC-6, UG wrote: Thanks for the pointer. It was quite easy but as a beginner it took me a while to figure this out, so i thought i would write what i did in the hope it helps someone else. I followed the instructions in the

[web2py] Re: WebSockets, AMQP, Where to Place Code

2015-01-19 Thread Massimo Di Pierro
2 (in your app modules) is the right thing to do. Not sure why it does not work on GAE. What web2py version are you using? Can you try the latest? Another option is put the libraries is web2py/site-packages which is added on sys.path by default. Please keep us updated about your progress. This

[web2py] Re: Troubleshooting represent

2015-01-19 Thread Anthony
The represent attribute is used for read-only forms, SQLTABLE, SQLFORM.grid, and when calling rows.render() -- it does not apply to update forms (in that case, the field's widget controls what is displayed). Anthony On Monday, January 19, 2015 at 10:26:26 PM UTC-5, americandewd wrote: How

[web2py] Re: SQLFORM - field_id - not work

2015-01-19 Thread Dmitry Ermolaev
I need that ID become URL on view info of this record - same as View field понедельник, 25 августа 2014 г., 14:56:25 UTC+3 пользователь Anthony написал: What do you expect it to do, and what is happening instead? On Monday, August 25, 2014 3:00:47 AM UTC-4, Dmitry Ermolaev wrote:

Re: [web2py] Re: web3py status

2015-01-19 Thread Massimo Di Pierro
I never liked the name either. The original name was Gluon but somebody threatened to sue me for trademark infringement (which was not the case) and I had to change it in a hurry. Not a joke. Massimo On Monday, 19 January 2015 12:17:44 UTC-6, Ramos wrote: i personally hate the name. In

[web2py] Bug? IS_IN_SET used with items removed does not show existing DB value

2015-01-19 Thread americandewd
I have a dropdown list of categories I have created for users to select from, when I remove formcontrol.category.requires = IS_IN_SET(catwanted,zero=None) it shows the existing data the user has already chosen, when I put back the formcontrol.category.requires = IS_IN_SET(catwanted,zero=None)

Re: [web2py] Re: web3py status

2015-01-19 Thread JorgeH
I don't have any problem with the name whatsoever. I like it. On Monday, January 19, 2015 at 5:54:58 PM UTC-5, Massimo Di Pierro wrote: I never liked the name either. The original name was Gluon but somebody threatened to sue me for trademark infringement (which was not the case) and I had

[web2py] Re: Troubleshooting represent

2015-01-19 Thread americandewd
Thanks for your reply, I am a little confused still though. In the book http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=widget it states for a field constructor I can set Widget=... however I did not set any widget for the field. Since I did not do that,

[web2py] Troubleshooting represent

2015-01-19 Thread americandewd
How would one go about troubleshooting represent? I am at the point where the ID matches the data I am looking for however it is not showing the title for the matching ID. Specifically I have categories held in this table: db.define_table('category', Field('title'),

[web2py] Re: Bug? IS_IN_SET used with items removed does not show existing DB value

2015-01-19 Thread americandewd
I have tried adding directly to the model: represent = lambda f: db.category[f].title this did not work either, (also ignored) Any one have any ideas? OR how I can troubleshoot this? On Monday, January 19, 2015 at 8:08:45 PM UTC-6, americandewd wrote: I noticed that in the places where I

[web2py] Re: Troubleshooting represent

2015-01-19 Thread americandewd
I tried this: Field('category', 'reference category', requires=IS_IN_SET(catwanted,zero= None),represent=lambda catwanted, r: db.category[catwanted].title if catwanted else ) from what I saw in one of your posts, however it only still shows me the id and not the name being held in the field for

[web2py] Re: Bug? IS_IN_SET used with items removed does not show existing DB value

2015-01-19 Thread americandewd
Ok I noticed partly where my error is: row.title needs to be row.id. I have used represent before and attempted it again here. However it is being completely ignored. Specifically what I tried is not working and I have used this many times before without problem. The only difference using

[web2py] Re: models: markmin.py

2015-01-19 Thread Dmitry Ermolaev
in app/examples there are C:\web2py\applications\examples\private\content\en\default\documentation folder fith markmin files понедельник, 5 января 2015 г., 22:47:23 UTC+3 пользователь Massimo Di Pierro написал: what app are you talking about? Please post the files and we can tell you what

[web2py] Bootstrap modal for insert, update and delete

2015-01-19 Thread M.C. Botha
Creating new records and updating the component to show the newly created record works. What does not work is to load a new record into the bootstrap modal form. What am I doing wrong in the post.load views and then in the comments.py.get_comment code? *models/tables.py*

[web2py] Ubuntu Software-Center contains web2py 1.99

2015-01-19 Thread Y
Hello It would be great if you could update web2py in the Ubuntu Software-Center to the current release. Cheers -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

[web2py] Re: Mixing pydal with web2py - how to manage the non-web2py setup

2015-01-19 Thread Tom Stratton
Hi - Thanks for the response. I did find the documentation and set migrate=False and was able to get it working. However, the follow up question is, what to do if I do want to change the tables? EG: What if I want to add a new field. It seems that I'm now locked out of making changes on both

[web2py] pre filled fields SQLFORM for new entry in db

2015-01-19 Thread MAbeeTT
I am making some functions which presents SQLFORMS, and I need the forms with prefilled fields, the info for the fields is generated from some ad-hoc python functions. The app workflow is similar to this: * The user puts a server information, if the server offers the validated services a new

[web2py] Ubuntu: python-web2py 1.99.7-1

2015-01-19 Thread Y
Hello There only seems to be available a very old version of web2py in the Ubuntu Software-Center. Could you update it? Kind regards -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: request.now - one day

2015-01-19 Thread Mark Anderson
I found the answer. yesterday = request.now - datetime.timedelta( days=1) I'm loving web2py and about to complete a major project. Thanks to Massimo and crew! On Sunday, January 18, 2015 at 12:48:03 AM UTC-6, Mark Anderson wrote: Should be an easy one... How do I subtract one day from a

[web2py] web2py + maps. Any sugestion?

2015-01-19 Thread Carlos A. Armenta Castro
Im trying to work with maps for a vehicle tracking system. I found several js libraries like google maps api, leaflet, gmaps.js, openstreet, mapbox and too many more like that. Would you recommend any library? Sugestions to work with web2py and maps (gis)? Thank you and sorry for my english.

[web2py] how to select the last row in sql database using dal

2015-01-19 Thread chuan
I would like to access last row of any database table in a general way, do I have to first count all the rows, then access the last row? This is effectively 2 qureies. Is there a way to do the job in one single query? Thanks -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Bug? IS_IN_SET used with items removed does not show existing DB value

2015-01-19 Thread americandewd
I noticed that in the places where I used represent it wasn't a dropdown selection plus I also made the field non-writable. I cannot follow these conditions because it needs to be a list the user can select. Any ideas? On Monday, January 19, 2015 at 7:57:22 PM UTC-6, americandewd wrote: Ok

[web2py] Re: Bug? IS_IN_SET used with items removed does not show existing DB value

2015-01-19 Thread americandewd
Does anyone know what would cause represent to be ignored? On Monday, January 19, 2015 at 8:33:15 PM UTC-6, americandewd wrote: I have tried adding directly to the model: represent = lambda f: db.category[f].title this did not work either, (also ignored) Any one have any ideas? OR how

[web2py] Re: helper function BUTTON - insert in documentation

2015-01-19 Thread Dmitry Ermolaev
print BUTTON (_name='btn', '_value=123) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the

[web2py] Re: models - session.py

2015-01-19 Thread Dmitry Ermolaev
I found it in C:\web2py\applications\examples\\models воскресенье, 4 января 2015 г., 20:33:36 UTC+3 пользователь Niphlod написал: don't know. it's not a file shipped with the scaffolding app On Sunday, January 4, 2015 2:26:54 PM UTC+1, Dmitry Ermolaev wrote: What does session.py

[web2py] Re: request.now - one day

2015-01-19 Thread Paolo Valleri
Hi, from datetime import timedelta request.now - datetime.timedelta(days=1) Paolo On Sunday, January 18, 2015 at 7:48:03 AM UTC+1, Mark Anderson wrote: Should be an easy one... How do I subtract one day from a request.now? Seems like it should be easy but I can't find clear documentation.

Re: [web2py] request.now - one day

2015-01-19 Thread Manuele Pesenti
Il 18/01/15 07:48, Mark Anderson ha scritto: Should be an easy one... How do I subtract one day from a request.now? Seems like it should be easy but I can't find clear documentation. I tried subtracting 86400 but request.now is in a datetime format. Thanks in advance. only timedelta and

[web2py] Re: forum by web2py - freelance work

2015-01-19 Thread Dmitry Ermolaev
I found pyforum https://groups.google.com/forum/#!searchin/web2py/pyforum/web2py/jHraS3OYRZY/wtRdirtCphoJ пятница, 1 августа 2014 г., 21:51:28 UTC+3 пользователь Derek написал: Sorry I don't understand what you are asking. Perhaps you can ask it in your native language? pyForum is built

[web2py] Re: Mixing pydal with web2py - how to manage the non-web2py setup

2015-01-19 Thread Niphlod
On Monday, January 19, 2015 at 6:23:24 PM UTC+1, Tom Stratton wrote: Hi - Thanks for the response. I did find the documentation and set migrate=False and was able to get it working. However, the follow up question is, what to do if I do want to change the tables? EG: What if I want to

[web2py] Re: how to select the last row in sql database using dal

2015-01-19 Thread Niphlod
db(db.table.id 0).select(orderby=~db.table.id, limitby=(0,1)).first() On Monday, January 19, 2015 at 10:35:19 PM UTC+1, chuan wrote: I would like to access last row of any database table in a general way, do I have to first count all the rows, then access the last row? This is effectively 2

[web2py] Re: Decimal( error )

2015-01-19 Thread Dmitry Ermolaev
Yes, I use: Field('balance', 'decimal(17,8)', readable=False, default = Decimal('0.0')), четверг, 24 июля 2014 г., 14:36:21 UTC+3 пользователь Massimo Di Pierro написал: This 'Decimal(16.8' is not a valid field type. Did you mean 'decimal(16,8)' ? On Thursday, 24 July 2014

[web2py] Apache + web2py.exe as daemon or servise + nssm

2015-01-19 Thread Dmitry Ermolaev
Apache 2.2 + wsgi_mod in http.conf:: LoadModule wsgi_module modules\mod_wsgi.so if I use web2py/wsgihandler.py in apache config: VirtualHost *:80 ServerName dom1 ServerAlias www.dom1 DocumentRootC:/web2py-m Directory C:/web2py-m AllowOverride All Order allow,deny allow from all

[web2py] Re: advice on creating multi purpose table

2015-01-19 Thread Limedrop
Hi Leonel, I like your suggestion, but I always wonder with these sorts of solutions whether or not you need a separate field in the person_meta table for each data type? For example: db.define_table('person_meta', Field('person', 'reference person'), Field('name'),

[web2py] Windows \ 2.9.12 \ Error3 \ cache

2015-01-19 Thread Kiran Subbaraman
Downloaded web2py src, 2.9.12, and extracted to a folder. Am on Windows 8.1 Added an existing application in it to check if it works. I see this error. Have cleared up the cache, sessions, etc. web2py™Version 2.9.12-stable+timestamp.2015.01.17.06.11.03PythonPython 2.7.9 :

[web2py] Re: Windows \ 2.9.12 \ Error3 \ cache

2015-01-19 Thread Kiran Subbaraman
I'll create an app with db support, and also one that uses disk based cache. Will see if the issue is re-creatable there, and share here. On Monday, January 19, 2015 at 6:18:34 PM UTC+5:30, Leonel Câmara wrote: Hey, This is weird, can you get me a minimal application that reproduces the

[web2py] Re: Windows \ 2.9.12 \ Error3 \ cache

2015-01-19 Thread Leonel Câmara
Hey, This is weird, can you get me a minimal application that reproduces the issue on windows 8.1? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You

[web2py] auto_import + folder

2015-01-19 Thread Dmitry Ermolaev
how connet to app bs3b databese without absulute path? db = DAL(sqlite://storage.sqlite, # -- in web2py\applications\bs3b\databases\ folder='../../bs3b/databases', # auto_import=True, pool_size=0, migrate=True, check_reserved=['all'], ) print

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-01-19 Thread Pankaj Pathak
*Thanks to leonel Camara, * i have clean all session and clear compiled then it runs properly .. On Friday, January 16, 2015 at 11:57:48 PM UTC+5:30, Pankaj Pathak wrote: Ok i will defiantly try. Thanks On Friday, January 16, 2015 at 11:24:50 PM UTC+5:30, Leonel Câmara wrote: No don't

Re: [web2py] Re: Windows \ 2.9.12 \ Error3 \ cache

2015-01-19 Thread Kiran Subbaraman
Weird. I downloaded a fresh copy of web2py-src, and copied an existing app into it. Started web2py, then using the windows explorer I deleted the contents of the application's cache folder. I had to resort to a manual delete, because when I used the admin to clean the application, I

[web2py] Re: request.now - one day

2015-01-19 Thread Niphlod
slightly incorrect ... either from datetime import timedelta yesterday = request.now - timedelta(days=1) or import datetime yesterday = request.now - datetime.timedelta(days=1) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

Re: [web2py] Re: web3py status

2015-01-19 Thread Tito Garrido
I wouldn't change the name at all... Because it is not related to python version lets just stay with web2py :) On Mon, Jan 19, 2015 at 1:03 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: py4web? On Sunday, 18 January 2015 15:22:10 UTC-6, Michele Comitini wrote: the 3 in web3py is

[web2py] Re: Windows \ 2.9.12 \ Error3 \ cache

2015-01-19 Thread Leonel Câmara
Humm that test application gave no error for me. Are you sure you cleared everything in the cache folder before upgrading? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Windows \ 2.9.12 \ Error3 \ cache

2015-01-19 Thread Leonel Câmara
You did spot a bug in admin has that needs to be changed from os.unlink to recursive_unlink I will make a pull request with the fix. However, manually deleting the cache folder should have solved your problem. I will keep trying to reproduce your problem as it's hard to solve it if I can't.

[web2py] Using Central Authentication Service I cannot add a membership

2015-01-19 Thread wanderer
I am using Central Authentication Service in my app and it works OK. But I cannot add any membership which worked when I did not use CAS. So I have a provider at http://127.0.0.1:8000/provider/default/user. My consumer contains: auth = Auth(db,cas_provider =

Re: [web2py] Re: web3py status

2015-01-19 Thread António Ramos
i personally hate the name. In contrast with how much i like the framework. Its a phrase compacted in a single word. People are confusing its name with python versions. Now for a one million dollar question: what does it mean: Web2py3 ? web3py2 ? Regards António 2015-01-19 17:05

[web2py] How to display number of friend requests at top of nav bar

2015-01-19 Thread Alex Glaros
How to display small envelope image and number of friend requests in top nav bar for logged in members of social network? Currently, friend requests are displayed in member's profile page, but would like to move them to nav bar so are continuously displayed. Assume I don't know how to put

[web2py] Re: Routes for 2 domains and 2 apps

2015-01-19 Thread cem
Hi, Try to use separate wsgi processes for each ssl site. Please see my example below. one process for all non ssl sites and separate process for each ssl site. VirtualHost *:80 DocumentRoot /var/sites/web2py WSGIDaemonProcess web2py user=www-data group=www-data \

[web2py] Re: Why can I peek but not edit some existing files?

2015-01-19 Thread Dave S
On Thursday, January 15, 2015 at 3:43:59 PM UTC-8, Dave S wrote: On Thursday, January 15, 2015 at 2:42:39 PM UTC-8, Tom Campbell wrote: I created a file called default/view.html using the web interface. It looks as expected when I peek at it: {{extend 'layout.html'}} h1This is the

[web2py] Re: FORM factors (controlling input box size)

2015-01-19 Thread Dave S
On Sunday, January 18, 2015 at 7:37:59 PM UTC-8, Wes H wrote: Any issues with using jQuery? Lack of experience :-} Thanks for the suggestions to try: In your controller: INPUT(_name='left', requires=[IS_NOT_EMPTY(), IS_HEXSTR()], _id= 'activation_left'), And in your view: