[web2py] How to set Reset password key programmatically?

2014-12-29 Thread wish7code
Hey everybody, I added a couple of users programmatically as suggested on the mailing list using my_crypt = CRYPT(key=auth.settings.hmac_key) crypt_pass = my_crypt(passw)[0] id_user= db.auth_user.insert(username = username, email = email, password = crypt_pass) That's perfectly fine, but... th

[web2py] Is there any way to host PHP w/ Web2py on Nginx environment? PHP noob but long time Web2py user here

2014-12-29 Thread kenny c
Hello Web2py users, My site requires a JS script library that requires a PHP file and I just don't have any idea how I should enable PHP on my Web2py site. Is there any way to host PHP w/ Web2py on Nginx environment Ubuntu? Thank you. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: max value in linked tables

2014-12-29 Thread Massimo Di Pierro
db.employee_contract.contract_id == db.contract.id) & (db.employee_contract.employee_id == db.employee.id I think you should do it: contracts = ((db.employee_contract.contract_id == db.contract.id)& (db.employee_contract.employee_id == db.employee.id)) rows = db(contracts).s

[web2py] Re: Auth Users Session

2014-12-29 Thread Massimo Di Pierro
If the purpose is to allow users to authenticate with one all and login with others, I suggest you use CAS. If apps are distinct, they should have different sessions else you risk of breaking something. Massimo On Thursday, 18 December 2014 08:36:22 UTC-6, Oliver wrote: > > Hi All, > > I reall

[web2py] Re: Migrate sessions from files to DB

2014-12-29 Thread Massimo Di Pierro
In the old days it was possible to switch from file based and db based and old sessions would be migrated automatically. We made mani changes to the session logic and I have not tested whether this still works. Perhaps you can help use. create a simple session with a counter. def index():

[web2py] Re: interget or string to date

2014-12-29 Thread Massimo Di Pierro
much simpler. :-) db.FEDEXFORM.FFNSD.default = datetime.datetime.strptime(jj.J2NSD,'%Y%m%d') On Wednesday, 2 November 2011 10:19:39 UTC-5, Omi Chiba wrote: > > This is more like python question but > > jj.J2NSD is integer and has value = 2030 (MMDD) > > I want to set the value as def

[web2py] Re: Managing 600MB size files on Google Cloud with web2py

2014-12-29 Thread Jacinto Parga
I'm looking for a similar solution widht google cloud store. El miércoles, 23 de julio de 2014 11:27:29 UTC+2, Giacomo Dorigo escribió: > > Hello everybody, > I am writing an app for storing and delivering files more or less from 3 > up to 600Mb size. > > I would like to rely on Google App Eng

[web2py] database select from set encoding

2014-12-29 Thread Yebach
hello I have a postgres dabatabase with utf8 encoding after executing workersDb = db(db.worker.w_organisation == org).select(db.worker.id, db.worker.w_nick_name).as_list() I get a list of dict where my strings are endoed as 'Moj\xc4\x8dca' where it should write Mojčca How do i set the enc

Re: [web2py] Re: Stream cStringIO

2014-12-29 Thread Alexandr Presniakov
Thank you! Yes, it worked, but maybe it should be added into the response.stream code itself? 2014-12-27 2:27 GMT+04:00 Niphlod : > the docstrings api on web2py.com/examples/epydoc are reeeally old and > buggy. The new api documentation is on readthedocs >

[web2py] navbar in sqlform.grid

2014-12-29 Thread Yebach
Hello My navbar user button does not show dropdown options when I am in a view where SQLFORM.grid is? Any suggestions why? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: Stream cStringIO

2014-12-29 Thread Niphlod
nope. you could want to stream something at the middle of the stringio constructed stream. Dealing with seek() is basic python 101. On Monday, December 29, 2014 3:03:45 PM UTC+1, flagist0 wrote: > > Thank you! Yes, it worked, but maybe it should be added into the > response.stream code > itself

Re: [web2py] Re: Daily task on production: scheduler or cron?

2014-12-29 Thread Lisandro Rostagno
Thanks Niphlod for your tips. The idea of having a separate db for the scheduler crossed my mind when I noticed the "db" parameter for the Scheduler constructor; however, in my case, I have **multiple instances of web2py** (instead of a single instance with multiple apps), like this: /var/www/web2

[web2py] Re: navbar in sqlform.grid

2014-12-29 Thread Jim S
Can you show some code? -Jim On Monday, December 29, 2014 8:30:31 AM UTC-6, Yebach wrote: > > Hello > > My navbar user button does not show dropdown options when I am in a view > where SQLFORM.grid is? > > Any suggestions why? > > -- Resources: - http://web2py.com - http://web2py.com/book (D

Re: [web2py] database select from set encoding

2014-12-29 Thread Marco Mansilla
El Mon, 29 Dec 2014 05:53:37 -0800 (PST) Yebach escribió: > hello > > I have a postgres dabatabase with utf8 encoding > > after executing > workersDb = db(db.worker.w_organisation == org).select(db.worker.id, > db.worker.w_nick_name).as_list() > > I get a list of dict where my strings are e

[web2py] Re: Is there any way to host PHP w/ Web2py on Nginx environment? PHP noob but long time Web2py user here

2014-12-29 Thread Leonel Câmara
It's possible, however a better option would be for you to rewrite the php functionality in a web2py controller function. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

Re: [web2py] Re: Rocket // HTTP 400 Bad Request - Body is incomplete

2014-12-29 Thread Louis Amon
/location/index/espace-de-stockage/la-seyne-sur-mer/1 copystream called with size=672 /error/ticket/index/ copystream called with size=672 timed out /error/ticket/index/ copystream called with size=672 timed out /error/ticket/index/ copystream called with size=672 timed out /error/

Re: [web2py] Re: Rocket // HTTP 400 Bad Request - Body is incomplete

2014-12-29 Thread Louis Amon
This is the request received by my ticket handler (I removed some big chunks so that it's readable): _vars None function index _body None args [] wsgi controller ticket utcnow 2014-12-29 18:09:42.485011 url /error/ticket/index/ step None now 2014-12-29 19:09:42.484998 is_local True

[web2py] web2py and elasticsearch

2014-12-29 Thread Andrey K
Hi all, Could you suggest the way to marry web2py and elasticsearch (http://www.elasticsearch.org/overview/elasticsearch). I have found solution for Whoosh and Solr (https://github.com/mdipierro/web2py-haystack) but don't know how to adjust it for elasticsearch. Any suggestion and ideas will b

[web2py] Auto detect of video file through url link while posting link

2014-12-29 Thread Vikash Singh
Hi Massimo, First of all have a Great year forward, I have no match with your knowledge of awesome web2py, most of things in which i have familiar, *When manually attaching a video link (from YouTube, Vimeo, etc) to a post , is there a way so that it automatically recognise the video link*.fo

[web2py] Re: upper with Cyrillic

2014-12-29 Thread Александр Остыловский
I use sqlite, but it turned out that sqlite not work functions Upper and Lover with Cyrillic In postgres Upper, Lover working correctly понедельник, 24 ноября 2014 г., 1:04:43 UTC+7 пользователь Massimo Di Pierro написал: > > Good question. No idea. left left hand side asked the database to perf

[web2py] setup-web2py-nginx-uwsgi-ubuntu.sh

2014-12-29 Thread Александр Остыловский
Hello! Run on ubuntu 14.04 installation of nginx-uwsgi with a script that comes with web2py directory scripts: sudo ./setup-web2py-nginx-uwsgi-ubuntu.sh During installation, it asked in particular e-mail, password. I go to the browser to 127.0.0.1. web2py says he works (it is clear that even wit

[web2py] "represents clause" in controller formatted table

2014-12-29 Thread Alex Glaros
what is syntax for "represents" statement for this controller-styled table? def list_users(): btn = lambda row: A("Edit", _href=URL('manage_user', args=row.auth_user.id)) db.auth_user.edit = Field.Virtual(btn) rows = db(db.auth_user).select() ## TRIED THIS:db.auth_user.first_name

[web2py] Re: How would one design a promotion for products using web2py?

2014-12-29 Thread Dave S
Just a thought: On Saturday, December 27, 2014 7:25:01 AM UTC-8, 黄祥 wrote: > > [...] > > i'd love to learn from another products and implement it on web2py, but > still have no idea how to do it in web2py ways. the reason is if it set on > the table, the user (non technical) perhaps in marke

[web2py] Re: "represents clause" in controller formatted table

2014-12-29 Thread Anthony
The "represent" attribute is used by SQLFORM, SQLFORM.grid, and SQLTABLE but does not automatically get applied otherwise. You can also apply it by calling the .render() method on the Rows object, as documented here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Re

Re: [web2py] Re: navbar in sqlform.grid

2014-12-29 Thread Vid Ogris
This is the part of html in my layout.html {{if auth.is_logged_in():}}   {{=auth.user.first_name}} {{=auth.user.last_name}}   {{=T('Logout')}} {{=T('Edit profile')}} {{=T('Change password')}} {{pass}} It fails to work only at views where i have SQLFORM.grid 2014-12-29 16:40 GMT+01:00 Jim

Re: [web2py] database select from set encoding

2014-12-29 Thread Vid Ogris
Hello Setting db_codec changes nothing 2014-12-29 17:21 GMT+01:00 Marco Mansilla : > El Mon, 29 Dec 2014 05:53:37 -0800 (PST) > Yebach escribió: > > > hello > > > > I have a postgres dabatabase with utf8 encoding > > > > after executing > > workersDb = db(db.worker.w_organisation == org).select