[web2py] AttributeError: 'DAL' object has no attribute 'definitions'

2018-09-02 Thread Maurice Waka
rows = db(db.definitions.definitions).select() File "/usr/local/lib/python2.7/dist-packages/pydal/base.py", line 669, in __getattr__ return BasicStorage.__getattribute__(self, key) AttributeError: 'DAL' object has no attribute 'definitions' I am getting the above error with my code. I am

Re: [web2py] Creating charts and trends from db

2018-12-21 Thread Maurice Waka
> > {{extend 'layout.html'}} > > > > > {{=form}} > > You can change style according to your convenience > > > Thanks > SP > > > > On Fri, Dec 21, 2018 at 7:23 AM Maurice Waka > wrote: > >> I've come across this >> <http://www.web

[web2py] Creating charts and trends from db

2018-12-20 Thread Maurice Waka
I've come across this site where one can create charts and graphs. However I have a challenge of using the database as I don't know how to link to it. For example, i want to track a variable like

Re: [web2py] Creating charts and trends from db

2018-12-21 Thread Maurice Waka
It was a small typo. It worked! Kind regards On Fri, Dec 21, 2018 at 12:47 PM 黄祥 wrote: > another way around perhaps you can use web2py to provide the data from > database as json, then show it with js (highchart, d3 or anything) > > best regards, > stifan > > -- > Resources: > -

[web2py] ValueError when deleting row object

2018-12-05 Thread Maurice Waka
I'm trying to delete a certain row among others with this code: @auth.requires_login() def Daily_Calorie_Calculator(): diary_date = None result_breakfast = [] result_lunch = [] result_dinner = [] result_snack = [] calories_sum = 0 protein_sum = 0 fat_sum = 0

Re: [web2py] Re: ValueError when deleting row object

2018-12-06 Thread Maurice Waka
Hi Dave. Thanks for the interest. Actually this line was the issue: delete button works if you're displaying [and punching delete for] Dinner > entry, but for a Lunch entry, it gives the error below? > > >> [...] >> > When I want to delete any row under 'LUNCH', I get this error: >> >>

Re: [web2py] Re: Create a service running continuously

2018-09-15 Thread Maurice Waka
Hi Paul. I just came across this. Could you please sh ate the code. I have a similar problem of not getting a continuous loop. Regards -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Form submit takes too long

2018-09-18 Thread Maurice Waka
Noted. I removed some while loops with tremendous results. It now works well. Regards. On Sep 18, 2018 7:02 AM, "Massimo Di Pierro" wrote: > I understand the confusion. In SQLAlchemy for example people use .first() > for fetch one record. In web2py the feching is by the select. .first() just >

[web2py] How to include subscription timelines and fixed payments

2019-03-23 Thread Maurice Waka
I would like to have a way of coding for subscription timelines such as 1 month duration, three months duration with expiry dates notification and cancellation after expiry dates. That when a user clicks on 'buy' button, the next page comes with the selected item with an automatic price tag

[web2py] CSS button alignment

2019-04-05 Thread Maurice Waka
I have this html code for a page. My buttons appear at the center bottom. I would like them to appear elsewhere such as bottom corners. How do I do this? {{=A('Proceed', _class='btn btn-large btn-info',_style="font-family: 'Audiowide';font-size:

[web2py] UnicodeDecodeError('utf-8' codec can't decode byte 0xf8 in position 4: invalid start byte)

2019-04-01 Thread Maurice Waka
I have started getting this error when opening a page: Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/main.py", line 444, in wsgibase serve_controller(request, response, session) File

Re: [web2py] UnicodeDecodeError('utf-8' codec can't decode byte 0xf8 in position 4: invalid start byte)

2019-04-01 Thread Maurice Waka
Just noted that one of my files was corrupted. Problem solved Regards On Mon, 1 Apr 2019, 14:50 Maurice Waka wrote: > I have started getting this error when opening a page: > > Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. &g

[web2py] Xml use in python 3.6

2019-02-18 Thread Maurice Waka
Hallo. I created this issue in github but no response so far. "xml() in python 3.6 · Issue #2096 · web2py/web2py" https://github.com/web2py/web2py/issues/2096 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Error importing csv file in python3.6

2019-03-02 Thread Maurice Waka
"xml() in python 3.6 · Issue #2096 · web2py/web2py" https://github.com/web2py/web2py/issues/2096 On Sat, 2 Mar 2019, 14:19 Kevin Keller wrote: > There an issue filed on github already? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

Re: [web2py] Re: Error importing csv file in python3.6

2019-03-01 Thread Maurice Waka
Still not working. On Fri, 1 Mar 2019, 21:33 Leonel Câmara wrote: > xml() returns bytes, You need to do b''.join(... instead of ''.join > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > -

Re: [web2py] Re: dict values error in python 3.6

2019-03-01 Thread Maurice Waka
Yes. It works! Regards On Sat, 2 Mar 2019, 06:39 Paul Ellis wrote: > This is a issue with generic.html. In Python 3 dict.values() does not > return a list it returns a dict_values object. > > On line 10 of Generic.html wrap the values method call in list() and it > works. > >

Re: [web2py] Re: web2py xml() in python 3

2019-02-20 Thread Maurice Waka
I'm not so conversant with that. On Thu, Feb 21, 2019 at 2:10 AM Dave S wrote: > > > On Wednesday, February 20, 2019 at 1:13:03 PM UTC-8, Maurice Waka wrote: >> >> Hi, >> I know I asked this before. I know people are very busy but could someone >> help here.

[web2py] Debug error

2019-03-06 Thread Maurice Waka
I got this error when trying to debug: Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/main.py", line 444, in wsgibase serve_controller(request, response, session) File

Re: [web2py] Re: Debug error

2019-03-06 Thread Maurice Waka
Done. Thanks On Wed, 6 Mar 2019, 16:55 Leonel Câmara wrote: > The error is here: > > T.M("You need to set up and reach a [[breakpoint %s]] to use the debugger!') > > Notice how you open the string with " but then try to close it with '. > > > -- > Resources: > - http://web2py.com > -

[web2py] how to use a user specific form input

2019-03-06 Thread Maurice Waka
I'm trying to make a tracker that users input data. So far its successful with this code: form = SQLFORM(db.weight, submit_button=T('Submit')).process() How ever, I need an author specific data, but can't get around this code: form = SQLFORM((db.weight.author ==

Re: [web2py] Re: how to use a user specific form input

2019-03-06 Thread Maurice Waka
getting an error: Syntaxerror:(keyword can't an expression) On Wed, Mar 6, 2019 at 8:05 PM Leonel Câmara wrote: > Ok that problem is easily solved by adding common_filter to the weight > table > > db.weight._common_filter = lambda query: db.weight.author == auth.user_id > > You can also set the

Re: [web2py] Re: how to use a user specific form input

2019-03-06 Thread Maurice Waka
More, this works some how: db.define_table('weight', Field('author', 'reference auth_user', default=auth.user_id, writable=False, readable=False), Field('weight','double',), Field('created_by','reference auth_user',default = auth.user_id, readable =

Re: [web2py] Re: how to use a user specific form input

2019-03-06 Thread Maurice Waka
Thanks a lot @Leonel Regards On Wed, 6 Mar 2019, 20:37 Maurice Waka wrote: > More, > this works some how: > db.define_table('weight', > Field('author', 'reference auth_user', > default=auth.user_id, writable=False, readable=False), > Fiel

[web2py] dict values error in python 3.6

2019-02-27 Thread Maurice Waka
Hallo, While creating a db, def create(): form = SQLFORM(db.food_data,submit_button=T('Submit')) form.element('input[value=Submit]')['_style']='background-color: #DA2128; color:#ff' if form.process().accepted: response.flash="form accepted"

[web2py] web2py xml() in python 3

2019-02-20 Thread Maurice Waka
Hi, I know I asked this before. I know people are very busy but could someone help here. >From this web2py page: http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax?search=xml%28%29 I got this code but does not work with python 3.6. Any help out there???, plese def

[web2py] Error accessing app edit

2019-03-17 Thread Maurice Waka
When clicking on the edit button for my app, I get this error: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

[web2py] Error when deleting items

2019-03-17 Thread Maurice Waka
This is my simple code when using to delete items from my database. grid = SQLFORM.grid(db.answered.author == auth.user.id, editable=False, searchable=False, details= False, fields=None, csv=None, links=None, create= False, field_id=None, selectable=lambda ids:delete_them(ids)) return

Re: [web2py] Re: Error accessing app edit

2019-03-19 Thread Maurice Waka
Thanks I'll follow up On Mon, 18 Mar 2019, 18:08 Leonel Câmara wrote: > This was due to changes I made to the way web2py discovers exposed > functions in a controller file. It uses the python parser so it has a > problem with syntax errors. I made a pull request that teaches the admin to > deal

[web2py] How to catch index error

2019-03-19 Thread Maurice Waka
I have a code that works OK except when there is no data in the database. Here is the code, using MongoDB. model code: db.define_table('sleep', Field('awake','double',default=0), Field('light_sleep','double',default=0),

Re: [web2py] Re: How to catch index error

2019-03-20 Thread Maurice Waka
This works well Boss!! Thanks a lot and God Bless! Regards On Wed, Mar 20, 2019 at 3:45 AM Leonel Câmara wrote: > Notice that, it seems you are using [-1] because want to get the last > record where the user was awake/light sleep/sleep, however you don't use an > order by, so depending on the

Re: [web2py] Error importing csv file in python3.6

2019-02-16 Thread Maurice Waka
his >>>> You have to changing line 926 of gluon/packages/dal/pydal/objects.py >>>> from >>>> reader = csv.reader(csvfile, delimiter=delimiter, >>>> quotechar=quotechar, quoting=quoting) >>>> to >>>> reader = csv.reader(codecs.iterdecode(csvfile,

[web2py] Error importing csv file in python3.6

2019-02-11 Thread Maurice Waka
I shifted to web2py/python3. In python2.7 I was able to upload csv files but using the same code below I get an error. For example: def import_csv(): form = FORM(INPUT(_type = 'file', _name = 'csv_file'), INPUT(_type = 'submit', _value = T('Import'))) return dict(form=form)

Re: [web2py] Error importing csv file in python3.6

2019-02-12 Thread Maurice Waka
anging line 926 of gluon/packages/dal/pydal/objects.py >>>> from >>>> reader = csv.reader(csvfile, delimiter=delimiter, >>>> quotechar=quotechar, quoting=quoting) >>>> to >>>> reader = csv.reader(codecs.iterdecode(csvfile,'utf-8'), >>>> del

Re: [web2py] Error importing csv file in python3.6

2019-02-16 Thread Maurice Waka
solved this way. >>>> Please try this >>>> You have to changing line 926 of gluon/packages/dal/pydal/objects.py >>>> from >>>> reader = csv.reader(csvfile, delimiter=delimiter, >>>> quotechar=quotechar, quoting=quoting) >>>> t

[web2py] Admin /default error

2019-02-03 Thread Maurice Waka
I'm shifting my app to python3.6. When trying to edit from admin, I get this error; Traceback Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

[web2py] DAL limitby in python3

2019-02-04 Thread Maurice Waka
In python 2.7, I was able to set the limit of the last number of rows to be displayed except the exact last one as: results = db(db.answer.author == auth.user.id).select(db.answer.ALL)[-10:-1] But after switching to python 3.6, i keep getting this error: File

Re: [web2py] Re: CSS button alignment

2019-04-07 Thread Maurice Waka
Thanks. On Sat, 6 Apr 2019, 20:49 'Annet' via web2py-users wrote: > I think Bootstrap's float-right and float-left will solve this issue. > > https://getbootstrap.com/docs/4.1/utilities/float/ > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Why my form is not working

2019-05-12 Thread Maurice Waka
I i'm trying to use one chart to alternate between two forms. A user logs in data in the morning hrs, meaning the form should be active and the evening form inactive. When the time comes after 12 pm the morning form is inactive and the evening form is active. While trying out this morning,

[web2py] How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
I couldn't get an answer on this link . My traceback is this ERROR:Rocket.Errors.Port8000:Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/rocket.py", line 555, in listen sock =

Re: [web2py] Re: How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
y 11, 2019 at 2:00:44 AM UTC-5, Maurice Waka wrote: >> >> I couldn't get an answer on this link >> <https://www.mail-archive.com/web2py@googlegroups.com/msg170386.html>. >> >> My traceback is this >> >> ERROR:Rocket.Errors.Port8000:Traceback (mo

Re: [web2py] Re: How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
at is going on. > > -Jim > > > On Thu, Jul 11, 2019 at 7:40 AM Maurice Waka > wrote: > >> This has nothing to do with web2py code. The code works well but only >> using the above links I showed did I get the error. >> Regards >> >> On Thu, Jul 11, 2

Re: [web2py] Re: How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
Ubuntu 18.04 web2py, python 3.6. >>>>> I was trying to deploy to digital Ocean >>>>> >>>>> On Thu, 11 Jul 2019, 16:28 Jim Steil wrote: >>>>> >>>>>> On Windows? Linux? Digital Ocean? >>>>>> >>>

Re: [web2py] Re: How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
Unfortunately, they cant be opened with text editor On Thu, Jul 11, 2019 at 6:28 PM Jim Steil wrote: > Can't you open the files with a text editor? Right-click and 'Open With > Text Editor' > > -Jim > > On Thu, Jul 11, 2019 at 10:22 AM Maurice Waka > wrote: > >>

Re: [web2py] Re: How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
I do cd web2py, then python3 web2py.py On Thu, 11 Jul 2019, 18:41 Jim Steil wrote: > Ok, how are you starting your web2py server in this environment? > > On Thu, Jul 11, 2019 at 10:37 AM Maurice Waka > wrote: > >> Unfortunately, they cant be opened with text editor >&

Re: [web2py] Re: How to solve the OSError: [Errno 9] Bad file descriptor error

2019-07-11 Thread Maurice Waka
ubuntu between 14.04 and 18 where > the 14.04 scripts and install notes may not work. > > But, if you look in the web2py scripts folder I believe there is a script > to install web2py on ubuntu 16 and later using nginx and uwsgi that should > work. > > -Jim > > >

[web2py] How do I solve the login issue

2019-07-12 Thread Maurice Waka
I recently upgraded to the latest version of web2py, Today after restarting my system I have not been able to login to the admin interface after countless attempts, repeat downloads of new web2py zip/folder. What could be the issue and how do I solve it. I tried this:

[web2py] How to solve the Nginx error on digitalocean

2019-07-15 Thread Maurice Waka
I have a usual 'working' nginx file which works fine when being tested. The /etc/nginx/nginx.conf file user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } http {

Re: [web2py] Re: How to solve the Nginx error on digitalocean

2019-07-16 Thread Maurice Waka
Nope. Web2py example On Tue, 16 Jul 2019, 14:38 Jim Steil wrote: > Did you take that server directive out of the nginx.conf file? > > Jim > > > On Tue, Jul 16, 2019, 3:01 AM Maurice Waka wrote: > >> Used the link as you directed >> >> posted this: >

Re: [web2py] Re: How to solve the Nginx error on digitalocean

2019-07-16 Thread Maurice Waka
> On Tue, Jul 16, 2019 at 8:16 AM Maurice Waka > wrote: > >> Nope. Web2py example >> >> On Tue, 16 Jul 2019, 14:38 Jim Steil wrote: >> >>> Did you take that server directive out of the nginx.conf file? >>> >>> Jim >>> >>

[web2py] How to resize div image

2019-08-17 Thread Maurice Waka
I'm trying t resize a div image but keep getting syntax errors. Done this: I need help here to get the correct code on this single line. Kind regards -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Web2py, python 3.6 and Pythonanywhere

2019-08-27 Thread Maurice Waka
Hi all I have had challenges with web2py and python 3.6 installation into the pythonanywhere myvirtualenvusing this link. It is easier( and successful) to install with python2.7 but not python 3.6 etc getting errors about : no

[web2py] configuring an app on pythonanywhere

2019-08-30 Thread Maurice Waka
After doing all the procedures for a new app e.g. www.myapp.com, completing registration on godaddy.com, upgrading on pythonanywhere etc. The app in web2py is also 'myapp'(same as domain name) I went to the web2py folder and changed/ added in the routes.py this: routers = dict( BASE =

[web2py] Re: How to get rid if the /init/default/ in the URL?

2019-08-31 Thread Maurice Waka
Hi This is a very good discussion. I followed it and it worked for me. However, I have multiple controllers with different views, How can I make it (HIDE ALL CONTROLLER NAMES) for all pages. So far it only works for default/index Kind regards On Friday, November 3, 2017 at 2:31:00 PM UTC+3,

[web2py] how to import modules on pythonanywhere

2019-08-26 Thread Maurice Waka
I recently deployed an app to pythonanywhere. The app works well on localhost but now I can't import the same modules as in the local computer. For example, I keep getting the error: No module named applications.myapp.modules.pattern The module pattern and others are installed with

[web2py] How do I solve this error: NameError: name 'person_id' is not defined in KPax2

2019-09-10 Thread Maurice Waka
I'm trying out a surveys app from KPax2/surveys/take_survey.. but got this error: Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

[web2py] How to hide address/tool bar when going mobile

2019-09-18 Thread Maurice Waka
Hello I'm testing my app on mobile sites and noticed that the address bad messes up the screen estate when going mobile. I'd like to auto-hide it as soon as a user logs in. Tried these below but noted that the address bar does not disappear form the screen. I want the app to go full screen on

Re: [web2py] Re: How to hide address/tool bar when going mobile

2019-09-19 Thread Maurice Waka
wow. Noted On Thu, Sep 19, 2019 at 6:18 AM Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > https://forum.playcanvas.com/t/hiding-address-bar-in-mobile/5310 > > On Tuesday, 17 September 2019 23:40:21 UTC-7, Maurice Waka wrote: >> >> Hello >> I'm testing m

[web2py] How to connect to mongoDB: I'm getting errors when connecting

2019-07-30 Thread Maurice Waka
I was trying out this example, not sure whether its outdated, but got this errors: le "/usr/local/lib/python3.6/dist-packages/pymongo/helpers.py", line 155, in

[web2py] why Web2py doesn't compile all

2019-08-06 Thread Maurice Waka
I'm using web2py in python3.6. When running the app on the local machine, everything is fine. But when I compile and run it again, I get errors that a module does not exist. The module is not found in the compiled folder. How do I solve this?? Regards -- Resources: - http://web2py.com -

Re: [web2py] Re: How to solve the Nginx error on digitalocean

2019-07-16 Thread Maurice Waka
} > } > > Also, you can look in the book: > > > http://web2py.com/books/default/chapter/29/13/deployment-recipes#One-step-production-deployment > http://web2py.com/books/default/chapter/29/13/deployment-recipes#Nginx > > There are good references there on how to setup

[web2py] How to change the wording "working..." during page refresh

2019-09-19 Thread Maurice Waka
I would like to use a different wording in the web2py.js by modifying this part: /*if you don't want to see "working..." on buttons, replace the following * two lines with this one * el.data('w2p_disable_with', el[method]()); */ if

[web2py] Re: How to get rid if the /init/default/ in the URL?

2019-09-26 Thread Maurice Waka
routes_in = ( ('/testme', '/examples/default/index'),)routes_out = ( ('/examples/default/index', '/testme'),) On Tuesday, September 3, 2019 at 10:06:45 AM UTC+3, Dave S wrote: > > > > On Saturday, August 31, 2019 at 4:58:49 AM UTC-7, Maurice Waka wrote: >> >> H

[web2py] py4web dashboard error

2019-09-26 Thread Maurice Waka
logging into dashboard gives me this: Traceback (most recent call last): File "/home/mauricewaka/.local/lib/python3.6/site-packages/py4web/core.py", line 310, in load token_data, self.secret, algorithms=[self.algorithm]) File "/usr/lib/python3/dist-packages/jwt/api_jwt.py", line 78, in decode

Re: [web2py] Re: How to change the wording "working..." during page refresh

2019-09-20 Thread Maurice Waka
On Fri, Sep 20, 2019 at 6:35 AM Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > You simply do: > > w2p_ajax_disable_with_message = "Doh! I am busy."; > > > > On Thursday, 19 September 2019 08:27:10 UTC-7, Maurice Waka wrote: >> >> I would

[web2py] How do I display uploaded images from uploads folder

2019-11-11 Thread Maurice Waka
I'm trying to retrieve an uploaded image from the uploads folder using this example. I keep on being redirected back to the index page. I also tried this option with the

Re: [web2py] Re: How do I display uploaded images from uploads folder

2019-11-11 Thread Maurice Waka
But I did upload and the image is in the folder. On Mon, Nov 11, 2019 at 3:48 PM Ruslan Gareev wrote: > Hi, looks like your request.args(0) is empty. > > понедельник, 11 ноября 2019 г., 15:37:31 UTC+5 пользователь Maurice Waka > написал: >> >> I'm trying to retriev

Re: [web2py] How to insert/pass image to view using js

2019-10-19 Thread Maurice Waka
This seems to work return sendMessage(`{{=XML(test_text,sanitize=True)}}`) On Sat, Oct 19, 2019 at 12:23 PM Maurice Waka wrote: > Hello > I'm trying to pass an image to view from db or static files using js. > I' trying to create an iteration that can pass a text or image

[web2py] How to insert/pass image to view using js

2019-10-19 Thread Maurice Waka
Hello I'm trying to pass an image to view from db or static files using js. I' trying to create an iteration that can pass a text or image or video to the view, so far being able to pass only text to view. The code below : $(function() { var getMessageText,

Re: [web2py] How to insert/pass image to view using js

2019-10-23 Thread Maurice Waka
Thanks for the response. Regards On Wed, Oct 23, 2019, 10:25 Ruslan Gareev wrote: > Hi Maurice! Improving Dave's answer, you can make in your controller > function: > > imgs = [IMG(_src=URL('path', 'to/your/image'), _style="your style")) > > > > среда, 23 октября 2019 г., 2:37:51 UTC+5

Re: [web2py] How to insert/pass image to view using js

2019-10-19 Thread Maurice Waka
le to view the image but not importing from the controller. Regards On Sat, Oct 19, 2019 at 3:42 PM Maurice Waka wrote: > This seems to work > return sendMessage(` max-height="200px"/>{{=XML(test_text,sanitize=True)}}`) > > On Sat, Oct 19, 2019 at 12:23 PM Maurice Waka

[web2py] How do I pass image link to js/view?

2019-10-19 Thread Maurice Waka
I need to pass the image link from the controller to js controller function(): imgs = [""] view page code. return sendMessage(`{{=imgs}}{{=XML(test_text,sanitize=True)}}`) So far i'm getting only a string as previously stated. If I insert the string directly, then i'm able to view

[web2py] No Column error

2019-11-26 Thread Maurice Waka
Using python3, I added the extra fields on auth_user using this code: auth.settings.extra_fields['auth_user']=[ Field('gender',requires=IS_IN_SET(('Male','Female'))), Field('city',requires=IS_NOT_EMPTY()), Field('country',requires=IS_NOT_EMPTY()),

Re: [web2py] No Column error

2019-11-26 Thread Maurice Waka
in wrap return f(*args, **kwargs) File "/home/mauricewaka/web2py/gluon/packages/dal/pydal/adapters/base.py", line 413, in execute rv = self.cursor.execute(command, *args[1:], **kwargs) File "/home/mauricewaka/web2py/gluon/contrib/pg8000/core.py", line 906, in execute

Re: [web2py] No Column error

2019-11-27 Thread Maurice Waka
line 413, in execute rv = self.cursor.execute(command, *args[1:], **kwargs) psycopg2.ProgrammingError: column auth_user.gender does not exist LINE 1: ...set_password_key", "auth_user"."registration_id", "auth_user...

Re: [web2py] Re: How do I display uploaded images from uploads folder

2019-11-11 Thread Maurice Waka
Thanks. Let me work it out. Regards On Tue, Nov 12, 2019, 01:01 Dave S wrote: > > > On Monday, November 11, 2019 at 12:10:53 PM UTC-8, Maurice Waka wrote: >> >> But I did upload and the image is in the folder. >> > > How are you generating the URL for showart

[web2py] Links on Menu when using mobile browser not working

2019-09-20 Thread Maurice Waka
Hello. I have noted that the drop down menu when switching to mobile browser is not active. When I click on the 'home' link, the links appear, but when clicking on the specific drop down options on the menu, they are not active. I have to switch back to desktop option for the menu to work.

[web2py] How do I solve an image validation error?

2019-10-06 Thread Maurice Waka
I was looking for a good image app and came across this link . After uploading it, on trying to upload an image, I get this error: Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/restricted.py",

[web2py] How do I configure reading text for all images using Hide/Readmore code?

2019-10-07 Thread Maurice Waka
I have a view page that works well except for a readmore/hide section and some text positioning. This is the code: {{extend 'layout.html'}} #example { background: white; height: 0px; overflow: hidden; transition: height 2s; -moz-transition: height 2s; /* Firefox 4 */

Re: [web2py] Re: How do I configure reading text for all images using Hide/Readmore code?

2019-10-07 Thread Maurice Waka
Thanks for the reply. I have a controller for this view already. My biggest issue is the way to display the image and message. Do you have an example of how I can do it? Regards On Mon, 7 Oct 2019, 18:09 villas wrote: > The HTML elements in your loop should be given *unique *ids and then you >

Re: [web2py] Re: How do I configure reading text for all images using Hide/Readmore code?

2019-10-08 Thread Maurice Waka
Solved. Did some CSS work. Thanks for the help. God bless On Tue, Oct 8, 2019, 15:51 Maurice Waka wrote: > Still learning jQuery on the go.. > I looked at your concept and tried the code below > > > style="font-size:24px;"oncli

Re: [web2py] Re: How do I configure reading text for all images using Hide/Readmore code?

2019-10-08 Thread Maurice Waka
w... > > B1 Show/Hide > test div1 > > B2 Show/Hide > test div2 > > B3 Show/Hide > test div3 > > $(document).ready(function () { > $('button').click(function () { > var id = $(this).attr("id"); > $("#note_"+ id ).to

Re: [web2py] How do I solve an image validation error?

2019-10-06 Thread Maurice Waka
: image.resize What could be wrong with this. On Sun, 6 Oct 2019, 10:18 Maurice Waka wrote: > I was looking for a good image app and came across this link > <http://www.web2pyref.com/reference/gallery-web2py-image-gallery-application> > . > After uploading it, on trying to uplo

[web2py] Image upload error when using smarthumb

2019-10-03 Thread Maurice Waka
I followed this example with this code db.define_table('article', Field("title"), Field("article_text", "text"), Field("picture", "upload"),

Re: [web2py] How do I solve an image validation error?

2019-10-13 Thread Maurice Waka
>", the Pillow modules are properly > installed. > > If not, install it... > > pip install Pillow > > > > > > On Sunday, 6 October 2019 12:29:10 UTC+1, Maurice Waka wrote: >> >> Found out it's was a python 3.7 vs 2.7 when dealing with syringIO. >>

[web2py] Re: p4web auth issues

2020-02-23 Thread Maurice Waka
import os import datetime as dt from datetime import datetime, timedelta, date from .common import db, session, T, cache, auth, logger, authenticated, unauthenticated from py4web import action, request, DAL, Field, Session, Cache, user_in, abort, redirect, URL, Field from py4web.utils.auth

[web2py] Re: p4web auth issues

2020-02-23 Thread Maurice Waka
, 23 февраля 2020 г., 7:28:10 UTC+5 пользователь Maurice Waka > написал: >> >> Using this code, >> >> File "apps/_scaffolds/controllers.py", line 82, in index >> db.posts.insert(message="Welcome "+auth_user.first_name+'.'+' Thank you

[web2py] pyweb login

2020-03-04 Thread Maurice Waka
Hello I recently logged out of py4web app. Upon login again, I can't get in. Tried to login to all apps installed in vain. I downloaded another py4web and reinstalled it but still after registration I cant login. No error messages shown at all. It behaves as if its going to refresh but returns

Re: [web2py] Re: py4web posting to db

2020-03-04 Thread Maurice Waka
uot;, line 514, in wrapper ret = obj.transform(ret) File "/home/maurice/py4web/py4web/core.py", line 300, in transform reader=Template.reader, File "/home/maurice/.local/lib/python3.6/site-packages/yatl/template.py", line 968, in render exec(code, context) File &qu

[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,

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
imal common.py, models.py and > your controller? > > -Jim > > On Thursday, February 27, 2020 at 5:55:23 AM UTC-6, Maurice Waka wrote: >> >> Hello, from this code, I have already defined my table in models as >> follows: >> >> import os >> impor

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
ot doing. > > I'm confused... I'd like to help, but need a clear picture of a minimal > common.py, models.py and your controller that reproduces this error. > > -Jim > > On Thursday, February 27, 2020 at 10:05:28 AM UTC-6, Maurice Waka wrote: >> >> I already ha

Re: [web2py] Re: p4web auth issues

2020-02-23 Thread Maurice Waka
)[first_name] >> >> With an error.. 'first_name' is not defined >> Regards >> >> On Mon, Feb 24, 2020, 02:02 Val K wrote: >> >>> `auth` in py4web is no the same as in web2py >>> to get user-record you should >>> ... >>> def index():

Re: [web2py] Re: p4web auth issues

2020-02-24 Thread Maurice Waka
:02 Val K wrote: >> >>> `auth` in py4web is no the same as in web2py >>> to get user-record you should >>> ... >>> def index(): >>> user = auth.get_user() >>> >>> >>> >>> On Sunday, February 23, 2020 at 8:47:4

Re: [web2py] Re: p4web auth issues

2020-02-24 Thread Maurice Waka
Working now. I had to reinstall the app. Regards On Monday, February 24, 2020 at 12:58:10 PM UTC+3, Val K wrote: > > get_user(), not get.user() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: PY4WEB request.vars error

2020-02-24 Thread Maurice Waka
e.Request > > On Monday, February 24, 2020 at 12:30:29 AM UTC+3, Maurice Waka wrote: >> >> New issue with py4web. >> >> Whats the new code for request.vars?? >> >> I get this error: >> >> >> Traceback (most recent call last): >&g

[web2py] Re: py4web posting to db

2020-03-03 Thread Maurice Waka
Any help on this please ? On Friday, February 28, 2020 at 9:29:01 PM UTC+3, Maurice Waka wrote: > > I'm still learning a lot from py4web.especially not being a programmer > myself, and I appreciate a lot from the help I get from you ALL. > > Anyway, I managed o cr

[web2py] py4web posting to db

2020-02-28 Thread Maurice Waka
I'm still learning a lot from py4web.especially not being a programmer myself, and I appreciate a lot from the help I get from you ALL. Anyway, I managed o create the tables and controller functions but I note that I'm not able to post to the database, at the same time, I cant see the

Re: [web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
e from models.py to > common.py > > -Jim > > > > > On Thursday, February 27, 2020 at 11:29:39 AM UTC-6, Maurice Waka wrote: >> >> In my models, I have: >> >> import os >> import datetime as dt >> from datetime import datetime, timedelta, dat

[web2py] Re: py4web defining tables

2020-02-27 Thread Maurice Waka
ove from models.py to > common.py > > -Jim > > > > > On Thursday, February 27, 2020 at 11:29:39 AM UTC-6, Maurice Waka wrote: >> >> In my models, I have: >> >> import os >> import datetime as dt >> from datetime import datetime, tim

[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) ---

<    1   2   3   4   >