[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-18 Thread Niphlod
yep. your worker setup clearly can't stably be connected to your backend. On Thursday, August 18, 2016 at 7:41:38 PM UTC+2, Jason Solack wrote: > > so after some digging what i'm seeing is the sw.insert(...) is not > committing and the mybackedstatus is None, this happens 5 times and then > the

[web2py] Re: upload field and IS_IMAGE

2016-08-18 Thread 黄祥
pls try : requires = IS_EMPTY_OR([IS_LENGTH(16384), IS_IMAGE() ] ) best regards, stifan -- 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

Re: [web2py] Decode string

2016-08-18 Thread António Ramos
Sorry to insist but cant find any clue. I tried a simple http post from fiddler or postman i sent a Post to my controller with Content-Type: application/json; charset=utf-8 and in the body {"Sistema de Gestão da Qualidade":1,"b":2} and i get in request.vars {u'Sistema de Gest\xe3o\x00 \x00d\x00a

[web2py] upload field and IS_IMAGE

2016-08-18 Thread Kirill Shatalaev
Hello. I have in model: Field('avatar', 'upload', required=False, autodelete=True, label=T('Avatar'), uploadfolder=os.path.join(request.folder, 'static/images/avatars'), requires=[IS_LENGTH(16384), IS_IMAGE()]) Well, the logic is simple: "avatar is not necessary, but when it uploade

[web2py] Re: Why passwords are stored in clear text ?

2016-08-18 Thread icodk
No, I don't have custom auth_user table, However I extend the existing with the followings: auth.settings.extra_fields['auth_user']= [ Field('address',label=T("address")), Field('city',label=T("City")), Field('zip',label=T("ZIP")), Field('country','reference country',label=T("country")),

Re: [web2py] Re: Setting process title at web2py startup

2016-08-18 Thread Michael Ellis
Thanks. I'll let you know how it works out. On Thu, Aug 18, 2016 at 3:42 PM Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I think what you propose should work fine. I would set cron=False btw. > > > On Wednesday, 17 August 2016 15:08:08 UTC-5, Michael Ellis wrote: >> >> Thanks, Massim

[web2py] Re: Why passwords are stored in clear text ?

2016-08-18 Thread Massimo Di Pierro
Do you have a custom auth_user table without the password CRYPT validator? On Thursday, 18 August 2016 10:38:25 UTC-5, icodk wrote: > > I develop a web2py application on Windows. I deployed it on an Ubuntu > machine but now user passwords spears in the auth_user in clear text and > nobody can lo

Re: [web2py] Re: web3py status

2016-08-18 Thread Massimo Di Pierro
It is possible. web3py is code name for experimental stuff. Mostly new form/grid logic that will be backported to web2py. On Wednesday, 17 August 2016 19:09:43 UTC-5, Jason Solack wrote: > > I saw a post on the developer forum that the newer version of web2py was > mostly Python 3 compatible...

Re: [web2py] Re: Setting process title at web2py startup

2016-08-18 Thread Massimo Di Pierro
I think what you propose should work fine. I would set cron=False btw. On Wednesday, 17 August 2016 15:08:08 UTC-5, Michael Ellis wrote: > > Thanks, Massimo. I'm using web2py as an interface to an industrial > process controller. The default rocket server and sqlite3 db are fine for > this app

[web2py] Re: New to web2py. Template use cases

2016-08-18 Thread Massimo Di Pierro
Or simply copy the gluon/template.py where you want it, import it, than from template import render, etc. On Wednesday, 17 August 2016 06:28:05 UTC-5, Marlysson Silva wrote: > > You are importing starting of gluon or just file template.py from gluon? > Based in documentation you have just import

[web2py] Re: Making web2py AVailable in Softaculous

2016-08-18 Thread Massimo Di Pierro
Is that a shared hosting service? I would recommend you use dedicated hosting. They do not cost more. On Tuesday, 16 August 2016 18:51:26 UTC-5, Brian Boatright wrote: > > I've been using nosupportlinuxhosting for a while and with good success. > At $1 per website per month it's a bargain for pr

[web2py] Re: Web2py request different behavior on local and online version (server code executes, but returns 404

2016-08-18 Thread Massimo Di Pierro
Your action returns a dict() which requires a view and the generic.json is not used in production. replace the return dict() with return response.json(dict()) On Tuesday, 16 August 2016 18:51:08 UTC-5, Ur. Kr. wrote: > > On my local version of the application, making the request with the > foll

Re: [web2py] Decode string

2016-08-18 Thread Richard Vézina
I think it url encoded... Search google about it, it should be obvious then... Richard On Thu, Aug 18, 2016 at 2:12 PM, António Ramos wrote: > Im getting this data on request.vars from Google forms onsubmit event. > > u'Sistema de Gest\xe3o\x00 \x00d\x00a\x00 \x00Q\x00u\x00' > > how do i conver

[web2py] Decode string

2016-08-18 Thread António Ramos
Im getting this data on request.vars from Google forms onsubmit event. u'Sistema de Gest\xe3o\x00 \x00d\x00a\x00 \x00Q\x00u\x00' how do i convert it to "Sistema de Gestão da Qualidade" i tried urllib.unquote(x).decode('utf-8') in my controller def getit(): ret={} for x in request.vars:

[web2py] web2py version and application version management

2016-08-18 Thread Richard
Hello, I in the process of writing Disaster Recovery Plan/Package... I was seeking what would be a good poor man's way to make sure to keep iterative development history and working framework and app package. I was realizing that I did a poor job at keeping track of application dependencies an

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-18 Thread Jason Solack
so after some digging what i'm seeing is the sw.insert(...) is not committing and the mybackedstatus is None, this happens 5 times and then the worker appears and almost instantly disappers. There are no errors. i tried manually doing a db.executesql but i'm having trouble getting self.w_stat

[web2py] Re: Customize multiselect widget

2016-08-18 Thread clara
Hello Donald, I just wanted you to know that I integrated the your code and it all worked out of the box. I also added some JS to initialize the checkboxes and it is all working fine. Many thanks again! Clara El martes, 16 de agosto de 2016, 20:14:18 (UTC-3), Donald McClymont escribió: > > I

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-18 Thread Jason Solack
doing that now, what i'm seeing is some problems here: # record heartbeat mybackedstatus = db(sw.worker_name == self .worker_name).select().first() if not mybackedstatus: sw.insert(status=ACTIVE, worker_name=self.worker_name,

[web2py] Why passwords are stored in clear text ?

2016-08-18 Thread icodk
I develop a web2py application on Windows. I deployed it on an Ubuntu machine but now user passwords spears in the auth_user in clear text and nobody can login,probably because the login controller try to compare the hash with the clear text in the db. What is happening ? Of course I would like

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-18 Thread Niphlod
turn on workers debugging level and grep for errors. On Thursday, August 18, 2016 at 4:38:31 PM UTC+2, Jason Solack wrote: > > I think we have this scenario happening: > > > https://groups.google.com/forum/#%21searchin/web2py/task_id%7csort:relevance/web2py/AYH5IzCIEMo/hY6aNplbGX8J > > our workers

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-18 Thread Jason Solack
I think we have this scenario happening: https://groups.google.com/forum/#%21searchin/web2py/task_id%7csort:relevance/web2py/AYH5IzCIEMo/hY6aNplbGX8J our workers seems to be restarting quickly and we're trying to figure out why On Thursday, August 18, 2016 at 3:55:55 AM UTC-4, Niphlod wrote: >

[web2py] Re: Add a field to primary key in non-legacy tables

2016-08-18 Thread David Orme
I guess another alternative is to hand code it as SQL, so somewhere in application do this: db.sqlexecute('alter table project_details drop constraint project_details_pkey;') db.sqlexecute('alter table project_details add primary key (id, "Oid");') I'm not sure where the best place to put that

[web2py] Re: Add a field to primary key in non-legacy tables

2016-08-18 Thread David Orme
Following up - I've tried some options to set up a table creating the 'id' field explicitly to work around pairing the two keys. *A) Declare the field 'id' with type 'id' and set a two part primary key:* db.define_table('key_test', Field('id', 'id'), Field('oid', length=64, default=uuid.

[web2py] Add a field to primary key in non-legacy tables

2016-08-18 Thread David Orme
Hi, I've got an application that shares a DB with another application running a different framework. The setup is that my application declares a set of tables that the other application can read from but won't write to, so I haven't been exploring the mechanisms for connecting to legacy databas

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-18 Thread Niphlod
small recap...a single worker is tasked with assigning tasks (the one with is_ticker=True) and then that task is picked up only by the assigned worker (you can see it on the scheduler_task.assigned_worker_name column of the task). There's no way the same task (i.e. a scheduler_task "row") i

[web2py] Re: High worker count in scheduler_worker table

2016-08-18 Thread Niphlod
550.000 means 550.000 processes have been started. In 2 weeks, if math is right, there are 20.160 minutes. your workers are starting and diying way too much On Wednesday, August 17, 2016 at 9:24:41 PM UTC+2, Jason Solack wrote: > > Hello all, this may be typical, but i'm trying to determine if