Re: [web2py] Re: p4web auth issues

2020-05-28 Thread Oasis Agano
By the way reinstalling the app solved another auth problem i had with an instance that had been idle for a few years. I think there is something strange with auth that is solved with reinstalling the app. Anyway thank you On Monday, February 24, 2020 at 8:56:12 PM UTC+9, Maurice Waka wrote: >

[web2py] Re: Letsencrypt, docker and apache

2019-02-22 Thread Oasis Agano
If I switch it back to the self generated cert it can connect to the database; Did someone face a the same issue? Regards. Oasis On Wednesday, February 20, 2019 at 9:13:48 PM UTC+9, Oasis Agano wrote: > > > Hello, > > Is there a quick way to setup lets encrypt to work with

[web2py] Re: Letsencrypt, docker and apache

2019-02-22 Thread Oasis Agano
Actually i changed the certificate and after that W2P can't connect to the postgresql container. It returns connection refused error. Failure to connect, tried 5 times: Traceback (most recent call last): File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 455, in __init__ sel

[web2py] Re: Letsencrypt, docker and apache

2019-02-20 Thread Oasis Agano
the self generated one. I don't know where to add it, whether in apache or somewhere in w2p files. Any resource about how to do it would be great. Oasis On Thursday, February 21, 2019 at 8:06:59 AM UTC+9, Dave S wrote: > > > > On Wednesday, February 20, 2019 at 4:13:48 AM UTC-8,

[web2py] Letsencrypt, docker and apache

2019-02-20 Thread Oasis Agano
Hello, Is there a quick way to setup lets encrypt to work with web2py inside a docker container running apache? I have generated certs inside the apache+web2py container using: sudo certbot --apache certonly -w /home/www-data/web2py/ -d domainname.com but I don't know where to add it in the

[web2py] Re: Scheduler workers crash on usage of urllib

2018-07-11 Thread Oasis Agano
I ended up importing my self in gluon/packages/dal/pydal/base.py. with import urllib On Wednesday, December 6, 2017 at 5:39:11 PM UTC+2, Ryan Herbert wrote: > > Hello, > I am currently experiencing an issue with my scheduler workers crashing on > startup with the following error: > > Exceptio

[web2py] Re: LDAP user first name and last name not getting in the database

2018-05-04 Thread Oasis Agano
base_dn='dc=server,dc=local')) *Added the manage_user = True* On Saturday, April 28, 2018 at 7:50:01 PM UTC+2, Oasis Agano wrote: > > Greetings, > > I have setup an LDAP connection that works, > the user can sign in but the issue is after sig

[web2py] Re: ValueError: invalid literal for int() with base 10: ''

2018-05-03 Thread Oasis Agano
You can try and use this: def is_date(string): try: parse(string) return True except ValueError: return False if is_date(str(row['Created'])): request_created_date = datetime.datetime.strftime(row['Created'], "%Y-%m-%d %H:%M:%S") else: request_created_dat

[web2py] LDAP user first name and last name not getting in the database

2018-04-28 Thread Oasis Agano
Greetings, I have setup an LDAP connection that works, the user can sign in but the issue is after signing in the *first_name* and *last_name* and *email* arent stored in the system. The first name is set to the current *username* but the other fields(last name and email) arent set. this is my

[web2py] DB model reference field conditions eg. auth_user belonging to a certain group only

2018-01-12 Thread Oasis Agano
Greetings, I have defined a table referencing auth_user, but i want on the web form select box to only bring users belonging to one group, not showing all the system users. i am wondering if i should use a lambda function or if there is a way of adding a condition on a reference field. E,g re

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2017-07-29 Thread Oasis Agano
Hello, Can you add me too? Name: Oasis AGANO Software developer/consultant & Digital Nomad. I've been using web2py since 2014. I will share my site later(work in progress). meanwhile my email is oasisag...@gmail.com. kr, Oasis On Monday, February 16, 2015 at 12:21:36 AM UTC+2, M

[web2py] Re: Implementing Token Based authentication JWT

2017-06-27 Thread Oasis Agano
ult/api/entries.json* A: The output will be json eg: {"content": [{"entry": "Hello", "id": 1}, {"entry": "It Worked", "id": 2}, {"entry": "oh lala", "id": 3}]} now on the function with jwt decorat

[web2py] Re: Implementing Token Based authentication JWT

2017-06-27 Thread Oasis Agano
the message comes after i add the decorator on top of a function @myjwt.allows_jwt() On Friday, June 23, 2017 at 10:49:17 PM UTC+2, Oasis Agano wrote: > > Hello, > > How can someone implement a token based authentication in web2py; > Both token generation and authorization? &g

[web2py] Re: Implementing Token Based authentication JWT

2017-06-24 Thread Oasis Agano
3, 2017 at 1:49:17 PM UTC-7, Oasis Agano wrote: >> >> Hello, >> >> How can someone implement a token based authentication in web2py; >> Both token generation and authorization? >> >> > gluon/tools.py line 1132 covers the JWT support Niphlod added. >

[web2py] Implementing Token Based authentication JWT

2017-06-23 Thread Oasis Agano
Hello, How can someone implement a token based authentication in web2py; Both token generation and authorization? kr, Oasis -- 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: web2py 2.15.1

2017-06-23 Thread Oasis Agano
It can be cool to have best practices documentations too; Unit testing(with auth,decorated methods...), Continuous Integration(Either travis-ci or jenkins...), because web2py may have many features but the documentation is still very poor. kr, Oasis On Monday, June 5, 2017 at 10:39:11 AM UTC

[web2py] Re: web2py 2.15.1

2017-06-23 Thread Oasis Agano
i think this guy is working on the flatpickr datepicker but could use some help https://github.com/web2py/web2py/issues/1646 On Monday, June 5, 2017 at 10:39:11 AM UTC+2, Karoly Kantor wrote: > > Dear Massimo, > > I saw your question in the developers group where I cannot post, therefore > i d

[web2py] Re: Signing in / register from React Native to Web2py?

2017-06-21 Thread Oasis Agano
Hello, did you find the way of doing this i want to do the same thing in react native On Tuesday, March 14, 2017 at 12:06:31 AM UTC+2, Mika Sjöman wrote: > > Hi > > After extensive searching in the forum, docs and the internet, I feel that > I can post the question here. I am building a React Na

[web2py] Re: web2py 2.15.1

2017-06-16 Thread Oasis Agano
I think that *flatpickr* should be the default datetime picker for the next Web2py it looks awesome On Monday, June 5, 2017 at 10:39:11 AM UTC+2, Karoly Kantor wrote: > > Dear Massimo, > > I saw your question in the developers group where I cannot post, therefore > i do it here. > > I am current

[web2py] Re: Future of web2py

2017-06-12 Thread Oasis Agano
If possible can we also have this in either *web2py 2.15* or *web3py* or both: 1. *Better applications Unit testing*(Not the framework test) methods and enough documentation 2. Better Oauth2 support 3. *Better token based authentication for apis* 4. Support of GET and POST request

[web2py] Re: Future of web2py

2017-05-31 Thread Oasis Agano
But web2py is still maintained right? or we start buying flask books On Saturday, May 27, 2017 at 9:11:02 AM UTC+2, Andrea Fae' wrote: > > Hello guys, > I'd like to know if there will be future of web2py? Any information about > it? > Thanks > -- Resources: - http://web2py.com - http://web2py.c

[web2py] Re: Future of web2py

2017-05-28 Thread Oasis Agano
Is the new framework web3py if so when is the official launch? On Sunday, May 28, 2017 at 2:32:01 AM UTC+2, Relsi Maron wrote: > > > Hi Andrea, > > Yes, there will be a future for web2py! > > Web2py will remain being what it is. :) > > A new version, with support for Python 3, is about to come. Ev

[web2py] Web2py Postgresql Groupby issue

2017-05-11 Thread Oasis Agano
Hello i have moved my connection to Postgres from sqlite and im facing this issue; ret = self.get_cursor().execute(command, *a[1:], **b) ProgrammingError: column "water_flow_log.id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT water_flow_log.id, water

[web2py] Sponsoring a web2py to android recipe

2017-04-29 Thread Oasis Agano
Hello, I needed help to connect android to web2py and couldnt find any documentation online, i'm wondering if it is possible to pay someone to write a working recipe that has all the steps and code that are needed to connect and interact with web2py through an android native application. The re

[web2py] Re: Creating a custom authentication method through http request by passing credentials in URL

2017-04-27 Thread Oasis Agano
a/3150712/440323. > > Anthony > > On Wednesday, April 26, 2017 at 9:46:07 AM UTC-4, Oasis Agano wrote: >> >> Hello, >> >> I'm trying to create a method that gets credentials from the url as >> arguments and works as the normal login of web2py then ret

[web2py] Creating a custom authentication method through http request by passing credentials in URL

2017-04-26 Thread Oasis Agano
Hello, I'm trying to create a method that gets credentials from the url as arguments and works as the normal login of web2py then return a token or session id. is there a safe way of doing it. kr oasis -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Re: use case: user login on android

2017-04-20 Thread Oasis Agano
using this route: final String url = initial + "/default/login.json?userid=" + username + "&password=" + password; but i think that was a custom function. On Thursday, April 20, 2017 at 8:56:43 PM UTC+2, Dave S wrote: > > > > On Thursday, April 20, 2017 at

[web2py] Re: use case: user login on android

2017-04-20 Thread Oasis Agano
Can someone share the code on the controller side of authentication inside web2py and how to make co exist with the default authentication. Thanks, Oasis On Tuesday, April 18, 2017 at 12:31:38 AM UTC+2, Dave S wrote: > > > > On Monday, April 17, 2017 at 1:20:20 PM UTC-7, Oasis

[web2py] Re: Returning a token for Android app authentication

2017-04-20 Thread Oasis Agano
AM UTC+2, Dave S wrote: > > > > On Monday, April 17, 2017 at 1:16:49 PM UTC-7, Oasis Agano wrote: >> >> You mean that it doesnt require modifying core Web2py code? or adding >> other codes inside your controller? because what i want is actually logging >> in

[web2py] Re: use case: user login on android

2017-04-17 Thread Oasis Agano
No extra modifications inside the web2py controller? I want to authenticate users available in a web2py application through an android app On Monday, April 17, 2017 at 10:07:24 PM UTC+2, Dave S wrote: > > > > On Monday, April 17, 2017 at 4:08:29 AM UTC-7, Oasis Agano wrote: >&

[web2py] Re: Returning a token for Android app authentication

2017-04-17 Thread Oasis Agano
t 4:18:48 AM UTC-7, Oasis Agano wrote: >> >> Hello, >> Can someone create a web2pyslice explaining how to do it and what to >> change in web2py gluon in order to connect an android native app to it. >> 4 years later people(e.g: me, my colleagues...) are still facin

[web2py] Re: Returning a token for Android app authentication

2017-04-17 Thread Oasis Agano
Hello, Can someone create a web2pyslice explaining how to do it and what to change in web2py gluon in order to connect an android native app to it. 4 years later people(e.g: me, my colleagues...) are still facing the same issue and i think it can be helpful to the community. kr, Oasis On Wednes

[web2py] Re: use case: user login on android

2017-04-17 Thread Oasis Agano
Can Someone write a slice on how to connect an android app to a web2py server, using java and py On Wednesday, December 9, 2015 at 12:47:19 PM UTC+2, noam cohen wrote: > > > > > Hi > I need

[web2py] Android Logging in by passing arguments in the URL and returning a Token

2017-04-04 Thread Oasis Agano
Greetings I'm trying to build an android app that connects and load data from web2py server/App. I runt into a code on github using this as the route: *final String url = initial + "/default/login.json?userid=" + username + "&password=" + password;* i tried opening it in the url i g

[web2py] Re: Autofill a field with data from the database based on 3 other fields without submit

2017-04-03 Thread Oasis Agano
PM UTC+2, Dave S wrote: > > > > On Sunday, March 26, 2017 at 11:01:38 AM UTC-7, Oasis Agano wrote: >> >> Greetings >> >> I have a form built with sqlfactory >> >> form = SQLFORM.factory( >> Field('meter', requires=IS_NOT_EMPTY(

[web2py] Autofill a field with data from the database based on 3 other fields without submit

2017-03-26 Thread Oasis Agano
Greetings I have a form built with sqlfactory form = SQLFORM.factory( Field('meter', requires=IS_NOT_EMPTY()), Field('date_from', 'datetime'), Field('date_to', 'datetime'), Field('amt', 'float')) then i want to have a form in the view where users will access the 3 first fields

[web2py] Re: Problem with SQLFORM.grid

2017-03-10 Thread Oasis Agano
Did this issue get solved im facing it too On Monday, September 5, 2011 at 11:47:01 AM UTC+2, brushek wrote: > > Hello, > > I have following table with custom type (database: postgres): > from gluon.sql import SQLCustomType > inet = SQLCustomType ( type='string', native='inet', encoder=lambda x

[web2py] Re: Using Highcharts/Highstock to display data from the database

2017-03-02 Thread Oasis Agano
son Silva wrote: > > Are you done? > > Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano > escreveu: >> >> Greetings, >> >> Im using web2py to store data in an IOT project, saving data works >> perfectly but i want to create some graphs t

[web2py] Re: Using Highcharts/Highstock to display data from the database

2017-03-01 Thread Oasis Agano
d json dumps > from python and return the lists formatted to your chart. > > Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano > escreveu: >> >> Greetings, >> >> Im using web2py to store data in an IOT project, saving data works >> pe

[web2py] Re: manual for loop in views and json

2017-02-28 Thread Oasis Agano
data came from controller. > > Try use this line , importing from gluon.contrib.simplejson: > > return gluon.contrib.simplejson.dumps( [ [r.created_on , r.qty] for r in > rows] ) > > > Em terça-feira, 28 de fevereiro de 2017 18:57:17 UTC-3, Oasis Agano > escreveu: >> &g

[web2py] Using Highcharts/Highstock to display data from the database

2017-02-28 Thread Oasis Agano
Greetings, Im using web2py to store data in an IOT project, saving data works perfectly but i want to create some graphs to show stats or summary using highcharts/highstock *line chart.* Thats the code and the output CONTROLLER @auth.requires_login() @service.json def mystats(): ownstats

[web2py] Re: manual for loop in views and json

2017-02-28 Thread Oasis Agano
Hello im trying to add a line chart using this example but in the view i see the json output instead of a graph. Any help? VIEW {{extend 'layout.html'}} https://code.highcharts.com/stock/highstock.js";> https://code.highcharts.com/stock/modules/exporting.js";> $.getJSON('[web2py] Disabling all sidebars
Greetings is there an easy way of disabling all left and right sidebars completely either through the css or a py function. im trying to create a full width index page which is all static but with the dynamic menu on top. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: Sum issues while computing the total of a table field

Solved by this Controller def dashboard_admin(): query = (db.payslip.state == 'Confirmed') sum = db.payslip.gross.sum() sum_result = db(query).select(sum).first()[sum] #NET #query = (db.payslip.state == 'Confirmed') neti = db.payslip.rssb_emp.sum() net_result = db(quer

[web2py] Re: Sum issues while computing the total of a table field

I tried it but i got another error CONTROLLER def dashboard_admin(): query = (db.payslip.state == 'Confirmed') sum = db.payslip.gross.sum() print db(query).select(sum).first()[sum] return locals() Error Traceback (most recent call last): File "D:\lab\PycharmProjects\Smar

[web2py] Sum issues while computing the total of a table field

Greetings im trying to perform a sum query that calculates the total gross(float) so that i can pass it to the view but im getting the error described in the traceback; i tried this https://groups.google.com/forum/#!searchin/web2py/sum/web2py/paz06IC3slo/13Lj3tErj8EJ but no clue *Traceback*

Re: [web2py] Re: Creating a batch using a loop

ing from the user and I can write up a > sample for you. > > -Jim > > > On Mon, Sep 26, 2016 at 3:33 PM, Oasis Agano > wrote: > >> Briefly what im trying to do is to create payslips for all contracts in >> the db through a loop, >> i just checked sqlform fa

[web2py] Re: Creating a batch using a loop

Well all the answers helped but the sqlform factory solved it On Monday, September 26, 2016 at 3:29:35 PM UTC+3, Oasis Agano wrote: > > Greetings > im creating a payroll app and i need a to create a batch of payslips > > i want to create payslips for all contracts in the data

[web2py] Re: Creating a batch using a loop

the "if > form.process().accepts:" statement. > 3. Update that code to manually insert the records into payslips instead > of just assigning values to the form variables. > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#insert > > I hope this he

[web2py] Re: Creating a batch using a loop

eptember 26, 2016 at 10:23:15 AM UTC-5, Oasis Agano wrote: >> >> i changed it to form.vars.contract = contraa.id >> but still getting the same error >> >> On Monday, September 26, 2016 at 5:39:41 PM UTC+3, Anthony wrote: >>> >>> In your model, db

[web2py] Re: Creating a batch using a loop

.contract = > contraa.contract_name). > > Anthony > > On Monday, September 26, 2016 at 10:04:30 AM UTC-4, Oasis Agano wrote: >> >> Models are here, if this way cant work can you suggest another way of doing >> it >> >> MARITAL_SET = [ >> T(&#

[web2py] Re: Creating a batch using a loop

e in environment >> File >> "D:/lab/PycharmProjects/Smartwork/web2py/applications/smartwork/controllers/default.py" >> >> <http://127.0.0.1:8000/admin/default/edit/smartwork/controllers/default.py>, >> line 708, in >> File "D:\lab\Pych

[web2py] Re: Creating a batch using a loop

you trying to do in the check_batch function? You are > looping through some records and making assignments to form.vars, but only > the final run of the loop will end up taking effect -- so what is the point > of the loop? > > Anthony > > On Monday, September 26, 2

[web2py] Creating a batch using a loop

Greetings im creating a payroll app and i need a to create a batch of payslips i want to create payslips for all contracts in the database within the running state the code def check_batch(form): contraaa = db(db.contract.state == 'Running').select(db.contract.ALL) for contraa in contr

[web2py] Setting computed values to fields based on a reference field in the same form

Im trying to create a payslip form where the user will select the contract and the form will execute calculation formula based on a selected combobox but i dont know where to put the formula and the conditions any way of guiding me? the controller def addpayslip(): form = SQLFORM(db.pay

[web2py] Show Registration_Key attribute on grid

Im trying to add a registration_key to manage view so that the admin can approve a user in a view by just deleting the Pending CONTROLLER @auth.requires_login() @auth.requires_membership('Admin') def manageusers(): grid = SQLFORM.smartgrid(db.auth_user,user_signature=True) return locals

[web2py] Duplicating an app when a client sign up

Greetings Im trying to setup a multi tenancy kind of app that will copy a web2py app to the same location with a different name(the new company's name) when that company signs up, im planning to use shutil as the folder library but im not that experienced with python the code is the following

[web2py] Re: Referencing a table in web2py before defining it

', 'string', label='Department Name'), # Field('department_name', 'string', label='Department Name'), Field('manager', 'reference employee', requires=IS_IN_DB(db, "employee.id"

[web2py] Re: Referencing a table in web2py before defining it

Is there any way of using 3-4 tables like emp,dept,emp_dept then dept_manager if yes can you show me how i can proceed Kind regards On Sunday, August 14, 2016 at 11:02:56 PM UTC+2, Oasis Agano wrote: > > My code is the following im trying to assign a department to employees and > also

[web2py] Re: Referencing a table in web2py before defining it

employee', requires=IS_IN_DB(db, "employee.id", '%(fullname)s')), auth.signature, format='%(department_name)s' ) now im getting a complete different error raise KeyError('Cannot resolve

[web2py] Re: Referencing a table in web2py before defining it

'reference department', requires=IS_IN_DB(db, db.department.id, '%(department_name)s')), auth.signature, format='%(fullname)s' ) and now im getting this error AttributeError: 'DAL' object

[web2py] Re: Referencing a table in web2py before defining it

rmProjects/HR2/web2py/gluon/validators.py", line 529, in __init__ (ktable, kfield) = str(field).split('.') ValueError: too many values to unpack On Sunday, August 14, 2016 at 11:02:56 PM UTC+2, Oasis Agano wrote: > > My code is the following im trying to assign a department t

[web2py] Re: Referencing a table in web2py before defining it

me', 'string', label='Department Name'), Field('manager', 'reference employee', requires=IS_IN_DB(db, 'db.employee.id', '%(fullname)s')), auth.signature, format='%(

[web2py] Re: Referencing a table in web2py before defining it

Field('manager', 'reference employee', IS_IN_DB(db, db.employee.id, '%(fullname)s')), auth.signature, format='%(department_name)s' ) the error is AttributeError: 'DAL'

[web2py] Re: Referencing a table in web2py before defining it

On Sunday, August 14, 2016 at 11:02:56 PM UTC+2, Oasis Agano wrote: > > My code is the following im trying to assign a department to employees and > also create a manager in a department table > > db = DAL(lazy_tables=True) > db.define_table('employee', >

[web2py] Referencing a table in web2py before defining it

My code is the following im trying to assign a department to employees and also create a manager in a department table db = DAL(lazy_tables=True) db.define_table('employee', Field('fullname','string',label='Name'), Field('email','string'), Field('phone','string

[web2py] Adding custom fields and their location to auth users

Greetings i have added a custom field to the auth users table but i want to move its position in the middle maybe after email how can i do it? Thanks in advance -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Rethinkdb on Web2py

Is there a way of using rethinkdb on web2py framework -- 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 subscribe