[web2py] py4web defining tables

2020-02-27 Thread Maurice Waka
Hello, from this code, I have already defined my table in models as follows: import os import datetime as dt from datetime import datetime, timedelta, date from py4web import action, request, DAL, Field, Session, Cache, user_in from py4web.utils.auth import Auth from py4web import action, request,

[web2py] Re: py4web defining tables

2020-02-27 Thread Jim S
Where is db being defined in your controller? Are you importing it from common? In my controller I have from ..common import db, session, T, cache, auth, logger and later @action.uses("applications/index.html", session, db, T, auth.user) def index(): page['sub_title'] = A('MENU', _href=UR

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
I already have that, see above code second last line on imports On Thursday, February 27, 2020 at 4:35:25 PM UTC+3, Jim S wrote: > > Where is db being defined in your controller? Are you importing it from > common? > > In my controller I have > > from ..common import db, session, T, cache, auth,

[web2py] The PyDal/Yatl Web2Py/Py4web Emmet/Weppy Ecosystem

2020-02-27 Thread Kevin Keller
I was thinking, just by how often I go back to Web2Py, what an excellent framework it is and the progress of Py4Web is also exciting, while also noticing how the pydal/yatl based framework Weppy/Emmet is evolving, that really there is no need anymore to think in terms of the future of a single

[web2py] Re: py4web defining tables

2020-02-27 Thread Jim S
Yes, I am aware of that, but what file is that in? You didn't specify. Is that in the same controller the other snippet is in? If so, then you're redfining db and the table in your controller which in your second to last line of your post you say you're not doing. I'm confused... I'd like

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
In my models, I have: import os import datetime as dt from datetime import datetime, timedelta, date from py4web import action, request, DAL, Field, Session, Cache, user_in from py4web.utils.auth import Auth from py4web import action, request, abort, redirect, URL, Field from py4web.utils.form imp

[web2py] Re: The PyDal/Yatl Web2Py/Py4web Emmet/Weppy Ecosystem

2020-02-27 Thread Jim S
Kevin I'm curious about your comment on Weppy/Emmet evolving. Looks like there has been only 1 commit in the past 16 months or so (it is possible I'm reading that wrong). What do you know about their progress. Also, I'd love to be able to use PyDAL as classes as used in weppy (while not taki

[web2py] py4web defining tables

2020-02-27 Thread Val K
There is import db from common, but later there is db = DAL(...) in the same file! -- 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 mess

[web2py] Re: py4web defining tables

2020-02-27 Thread Jim S
Try commenting out db = DAL("sqlite://xstorage.db", folder=os.path.join(os.path.dirname( __file__), "databases")) in models.py Do you already have that in common.py? In your controller you're importing db from common, but the instance in common doesn't have any tables defined. You redefined

Re: [web2py] Re: The PyDal/Yatl Web2Py/Py4web Emmet/Weppy Ecosystem

2020-02-27 Thread Kevin Keller
Hey Jim, Weppy is now re-named to Emmet: https://github.com/emmett-framework/emmett On Thu, Feb 27, 2020 at 6:38 PM Jim S wrote: > Kevin > > I'm curious about your comment on Weppy/Emmet evolving. Looks like there > has been only 1 commit in the past 16 months or so (it is possible I'm > re

Re: [web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
I get it. Let me work it out in the next hour. Kind regards On Thu, Feb 27, 2020, 20:46 Jim S wrote: > Try commenting out > > db = DAL("sqlite://xstorage.db", folder=os.path.join(os.path.dirname( > __file__), "databases")) > > in models.py > > Do you already have that in common.py? > > In your c

[web2py] BUG response.cookies and sessions2trash.py

2020-02-27 Thread 'Annet' via web2py-users
I scheduled cron to regularly trash the session in my web2py applications. this worked well until I added this line of code to a model.py file; response.cookies[response.session_id_name]['domain'] = '.leonexus.nl' My scripts log any errors at ~my/logs/user/sessions2trash.log. That file is full o

Re: [web2py] Re: The PyDal/Yatl Web2Py/Py4web Emmet/Weppy Ecosystem

2020-02-27 Thread Jim S
Thanks Kevin, I saw that, but other than the name change seems like not much activity. Any other activity on it? Seems like a nice framework. -Jim On Thursday, February 27, 2020 at 11:47:05 AM UTC-6, Kevin Keller wrote: > > Hey Jim, > > Weppy is now re-named to Emmet: > > https://github.com/e

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
Thanks a lot. It worked. Regards On Thursday, February 27, 2020 at 8:46:00 PM UTC+3, Jim S wrote: > > Try commenting out > > db = DAL("sqlite://xstorage.db", folder=os.path.join(os.path.dirname( > __file__), "databases")) > > in models.py > > Do you already have that in common.py? > > In your con

[web2py] prettydate in py4web

2020-02-27 Thread Maurice Waka
what changed in py4web with this: [[=prettydate(reply.modified_on)]] which is in web2py? Regards -- 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] How to make links to another page

2020-02-27 Thread Stephen Hengeli
I know this is going to sound like a dumb question, but I am new to web2py and need to use it for my Capstone class. I understand the modules and the controllers and views, but I am having trouble creating a link to a new html page and there doesn't seem to be a lot of information available onl

[web2py] Possible to Run Two Identical Web2py Instances on Two Computers for Active/Active Failover Purposes?

2020-02-27 Thread Tristan Britt
Context: I have a working web2py website that does some internal data visualization for my job, where employees can upload files and visualize different metrics. My boss would like me to take a functional windows server cluster with two active nodes, and have the web2py webapp running on both no

[web2py] Re: Py4web: ¿Practical example step by step?

2020-02-27 Thread Massimo Di Pierro
Kind of. In py4web there is a new app called myfeed. I have git commits that show how to build it step by step. About to make a video from it. On Monday, 24 February 2020 04:39:39 UTC-8, Yuver Parra wrote: > > Good morning Massimo. > Does the promised step-by-step manual already exist? > > El mi

[web2py] Re: PY4WEB request.vars error

2020-02-27 Thread Massimo Di Pierro
Or request.json() to for content-type: application/json. That's what I use the most in POST On Monday, 24 February 2020 07:52:46 UTC-8, Ruslan Gareev wrote: > > Hi! > > Now in py4web it will be (if POST vars): > request.forms.message or request.POST.message > > or if GET vars: > request.query.me

[web2py] Re: off topic - Alpine JS as an alternative to vuejs/react

2020-02-27 Thread Massimo Di Pierro
wow. Alpine is pretty good. I will give it a try. On Monday, 24 February 2020 08:33:28 UTC-8, Ramos wrote: > > vuejs is awesome but for simple stuff maybe alpine js is simpler. > Just asking your thoughts if any... > https://github.com/alpinejs/alpine > -- Resources: - http://web2py.com - htt

[web2py] Re: LOAD in py4web

2020-02-27 Thread Massimo Di Pierro
never heard of unpolly.js and cannot find it. Have a link? On Wednesday, 26 February 2020 19:32:20 UTC-8, Carlos Costa wrote: > > LOAD is a very cool thing! And beginners just say WOW when they can create > ajax-like experience so easy. > But, IMO, it lacks some important features for modern app

[web2py] Re: prettydate in py4web

2020-02-27 Thread Massimo Di Pierro
Ho, there is no pretty date. But there is no need because this is better: https://pypi.org/project/humanize/ On Thursday, 27 February 2020 13:26:23 UTC-8, Maurice Waka wrote: > > what changed in py4web with this: > > [[=prettydate(reply.modified_on)]] > > > > which is in web2py? > > > Regards >

Re: [web2py] Re: LOAD in py4web

2020-02-27 Thread AGRogers
https://unpoly.com/ On Fri, 28 Feb 2020 at 16:22, Massimo Di Pierro wrote: > never heard of unpolly.js and cannot find it. Have a link? > > > On Wednesday, 26 February 2020 19:32:20 UTC-8, Carlos Costa wrote: >> >> LOAD is a very cool thing! And beginners just say WOW when they can >> create aja