[web2py] Admin app return a blank page

2022-11-02 Thread dirman
The admin app return a blank page and '1' on the page source code even on 
https. all the apps are working on aws lightsail hosting+python3 

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8e46fc9f-652f-46f0-8367-c94c46defc11n%40googlegroups.com.


[web2py] Re: Web2py site ssl expired

2021-09-15 Thread dirman

Well same from my end. SSL expired
On Saturday, September 11, 2021 at 2:04:38 PM UTC+1 rodrig...@gmail.com 
wrote:

> Hello my friends, I don't know for report this.
> https://web2py.com/ when I access this url.
> This not show with http.
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/5f10222b-48e3-41ab-9f85-aa66694e4a00n%40googlegroups.com.


[web2py] Share sessions not working

2021-09-11 Thread dirman
In my case, sessions are not shared in my two apps main and sub domain



session.connect(request, response,masterapp='test', db=db)

response.cookies[response.session_id_name]['domain'] = '.test.com' 


routers = dict(
  BASE=dict(
default_controller='default',
default_function='index',
domains={
'test.com':'redirect_to_www_test',
'www.test.com':'test',
'manage.test.com ': 'manage_test'
},
  )
)


Any help is appreciated

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8002c755-266b-4330-ba25-c840fedf55bbn%40googlegroups.com.


[web2py] Re: Optimization web2py app

2019-11-28 Thread dirman

See post link:

https://groups.google.com/d/msg/web2py/W4cbtIDNoSA/Lb0bTJilAgAJ


On Sunday, April 21, 2019 at 9:06:37 AM UTC+1, Константин Комков wrote:
>
> Hello! Are anybody use tecnology - progressive web app(PWA)? Can you tell 
> where I can find .html file for using it in cache for service worker, 
> becouse I don't see them on tab network in google chrome.
> If we open site in google chrome, press f12 and go to tab Audit -> Run 
> audits. We can see that now in web2py 2.18.5 we use bootstrap 4.0.0 which 
> contain one medium vulnerability.
> Web2py book contain medium vulnerability too in jquery 1.10.2.
>
> Best regards, Konstanten
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bc09a6be-e578-4790-a66e-19d9f3b1c95d%40googlegroups.com.


[web2py] Re: Getting a PWA set up based on web2py

2019-11-28 Thread dirman
You can also use this approach 
https://groups.google.com/d/msg/web2py/W4cbtIDNoSA/Lb0bTJilAgAJ. It works 
fine for me.

On Friday, October 11, 2019 at 7:06:26 AM UTC+1, mostwanted wrote:
>
> Hi @Valdeck Rowe,  i wan to know if this approach worked for you in your 
> PWA  development. Were there any developments or changes to this approach? 
> I am asking because i was hoping to use your approach in my desperate 
> attempt at making one of my apps a PWA.
>
> Regards;
>
> Mostwanted
>
> On Wednesday, October 10, 2018 at 11:25:25 AM UTC+2, Valdeck Rowe wrote:
>>
>>
>> I decided to use upup.js by Tal Ater, website here: 
>> https://www.talater.com/upup/getting-started-with-offline-first.html, 
>> mainly because I had a project deadline and needed something with a short 
>> learning curve.
>>
>> The main thing about PWAs appears to be that the service worker 
>> javascript files need to be accessible from the domain root.
>>
>> Warning - this is all very hackish - I wasn't sure how to get a file to 
>> appear as if it was on the actual domain root.
>>
>> I tried setting it up using a controller to serve as the base for the JS 
>> and manifest files in order to mimic the root.
>>
>> This is the controller setup:
>> def manifest():
>> item = db(db.item.id > 0).select().first()
>> return locals()
>>
>>
>> def upup():
>> return locals()
>>
>>
>> def upup_sw():
>> return locals()
>>
>> 
>>
>> manifest.json
>> {
>>   "name": "{{=item.name}}",
>>   "short_name": "{{=item.slugname}}",
>>   "theme_color": "#2196f3",
>>   "background_color": "rgba(243,216,33,0.62)",
>>   "display": "standalone",
>>   "Scope": "/app2/items/",
>>   "start_url": "/app2/items/",
>>   "icons": [
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-72x72.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "72x72",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-96x96.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "96x96",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-128x128.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "128x128",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-144x144.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "144x144",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-152x152.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "152x152",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-192x192.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "192x192",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-384x384.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "384x384",
>>   "type": "image/png"
>> },
>> {
>>   "src": "{{=URL('static', 'images/icons/icon-512x512.png', 
>> scheme='https', host=True)}}",
>>   "sizes": "512x512",
>>   "type": "image/png"
>> }
>>   ],
>>   "splash_pages": null
>> }
>>
>>
>>
>> upup.js # I simply copied the contents
>> //! UpUp
>> //! version : 1.0.0
>> //! author  : Tal Ater @TalAter
>> //! license : MIT
>> //! https://github.com/TalAter/UpUp
>> (function(e){"use strict";var t=navigator.serviceWorker;if(!t)return this
>> .UpUp=null,e;var n={"service-worker-url":"{{=URL('items', 'upup_sw.js', 
>> scheme=True, )}}"},r=!1,s="font-weight: bold; color: #00f;";this.UpUp={
>> start:function(e){this.addSettings(e),t.register(n["service-worker-url"
>> ],{scope:"./app2/items/"}).then(function(e){r&("Service 
>> worker registration successful with scope: %c"+e.scope,s);(e.installing||
>> t.controller||e.active).postMessage({action:"set-settings",settings:n
>> })}).catch(function(e){r&("Service worker registration 
>> failed: %c"+e,s)})},addSettings:function(t){"string"==typeof(t=t||{})&&(t
>> ={content:t}),["content","content-url","assets","service-worker-url",
>> "cache-version"].forEach(function(r){t[r]!==e&&(n[r]=t[r])})},debug:
>> function(e){r=!(arguments.length>0)||!!e}}}).call(this);
>> //# sourceMappingURL=upup.js.map
>>
>>
>>
>> upup_sw.js
>> //! UpUp Service Worker
>> //! version : 1.0.0  
>> //! license : MIT
>> //! https://github.com/TalAter/UpUp
>> var _CACHE_NAME_PREFIX="upup-cache",_calculateHash=function(e){var t,n=0,
>> s=(e=e.toString()).length;if(0===s)return n;for(t=0;t> charCodeAt(t),n|=0;return n};self.addEventListener("message",function(e){
>> "set-settings"===e.data.action&&_parseSettingsAndCache(e.data.settings
>> )}),self.addEventListener("fetch",function(e){e.respondWith(fetch(e.
>> request).catch(function(){return caches.match(e.request).then(function(t
>> ){return t||("navigate"===e.request.mode||"GET"===e.request.method&
>> request.headers.get("accept").includes("text/html")?caches.match(
>> "sw-offline-content"):void 

[web2py] Re: Progressive Web Apps

2019-11-28 Thread dirman

#view




  
  Hello World
  
  
  
  
  
  
  
  
  
  
  
  


  
Hello World!
  
  



Write functions to return the three files instead. Dont put actual files in 
static folder 

#controller
def manifest():
response.headers['Content-Type'] = 'text/json'
return  '''
{
  "name": "Hello World",
  "short_name": "Hello",
  "icons": [{
"src": "/pwa/static/images/hello-icon-128.png",
  "sizes": "128x128",
  "type": "image/png"
}, {
  "src": "/pwa/static/images/hello-icon-144.png",
  "sizes": "144x144",
  "type": "image/png"
}, {
  "src": "/pwa/static/images/hello-icon-152.png",
  "sizes": "152x152",
  "type": "image/png"
}, {
  "src": "/pwa/static/images/hello-icon-192.png",
  "sizes": "192x192",
  "type": "image/png"
}, {
  "src": "/pwa/static/images/hello-icon-256.png",
  "sizes": "256x256",
  "type": "image/png"
}, {
  "src": "/pwa/static/images/hello-icon-512.png",
  "sizes": "512x512",
  "type": "image/png"
}],
  "lang": "en-US",
  "start_url": "/pwa/",
  "display": "standalone",
  "background_color": "#DE3C4B",
  "theme_color": "#DE3C4B"
}
'''

def main():
response.headers['Content-Type'] = 'text/javascript'
return '''
window.onload = () => {
  'use strict';

  if ('serviceWorker' in navigator) {
navigator.serviceWorker
 .register('/pwa/sw.js');
  }
}
'''


def sw():
response.headers['Content-Type'] = 'text/javascript'
return '''
var cacheName = 'hello-pwa';
var filesToCache = [
  '/',
  '/pwa/',
  '/pwa/static/css/style.css',
  '/pwa/static/js/main.js'
];

/* Start the service worker and cache all of the app's content */
self.addEventListener('install', function(e) {
  e.waitUntil(
caches.open(cacheName).then(function(cache) {
  return cache.addAll(filesToCache);
})
  );
});

/* Serve cached content when offline */
self.addEventListener('fetch', function(e) {
  e.respondWith(
caches.match(e.request).then(function(response) {
  return response || fetch(e.request);
})
  );
});
'''


Access the page on http://localhost/pwa and  test locally using Devtools 
and not lighthouse. Would work fine as a WPA app 

On Thursday, December 13, 2018 at 9:09:21 AM UTC, mweissen wrote:
>
> I am just learning how to write Progressive Web Applications (PWA). I 
> think PWAs are a very important step towards app-like websites. There is a 
> lot of good examples on developers.google.com. One example has the 
> following structure:
>
> webroot
> |--images/
> |--scripts/
> |--styles/
> |--favicon.ico
> |--index.html
> |--manifest.json
> |--service-worker.js
>
> I want to use web2py to manage the datatables. What would be the best way 
> to combine the PWA file-tree with a web2py app?
>
> I have found only one (?) discussion about this topic at 
> https://groups.google.com/forum/#!topic/web2py/rHBfs1zFG44
>
> But there are some new questions:
>
>- My web2py server manages a lot of applications and it seems, that 
>the proposed solution accepts only one app with one service-worker.js and 
>so on.
>- All scripts would be visible to everybody at 
>http://mydomain.com/myapp/static/scripts. I think this not a good idea.
>
> Any ideas, any hints?
> Who has written PWAs with web2py?
>
> By the way: my next stept would be to use Preact together with PWAs. But 
> for now I want to go step by step...
>
>
> Regards Martin
>
>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4f5bd60a-6b42-4cc2-aaa0-be1d26cc102e%40googlegroups.com.


[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
 'utf8' codec can't decode byte 0xa0 
in position 0: invalid start byteVersion
web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
Python Python 2.7.12: /usr/local/bin/uwsgi (prefix: /usr)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
  File "/home/www-data/web2py/applications/g/controllers/default.py" 
<https://127.0.0.1/admin/edit/g/controllers/default.py>, line 68, in 
  File "/home/www-data/web2py/gluon/globals.py", line 421, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/gluon/cache.py", line 644, in wrapped_f
rtn = func()
  File "/home/www-data/web2py/applications/g/controllers/default.py" 
<https://127.0.0.1/admin/edit/g/controllers/default.py>, line 64, in download
return response.download(request, db)
  File "/home/www-data/web2py/gluon/globals.py", line 673, in download
(filename, stream) = field.retrieve(name, nameonly=True)
  File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 1918, 
in retrieve
file_properties = self.retrieve_file_properties(name, path)
  File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 1949, 
in retrieve_file_properties
filename = base64.b16decode(m.group('name'), True).decode('utf-8')
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 0: invalid 
start byte

Error snapshot [image: help] 
<https://127.0.0.1/admin/default/ticket/g/127.0.0.1.2019-10-07.20-41-17.dda2b68f-835d-43fa-8a41-a594ab02280f#>

('utf8' codec can't decode byte 0xa0 
in position 0: invalid start byte)

inspect attributes
Frames
   
   - 
   
   *File /home/www-data/web2py/gluon/restricted.py in restricted at line 
   219* code arguments variables
   - 
   
   *File /home/www-data/web2py/applications/g/controllers/default.py in 
at line 68* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in  at line 421* 
   code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/cache.py in wrapped_f at line 644* code
arguments variables
   - 
   
   *File /home/www-data/web2py/applications/g/controllers/default.py in 
   download at line 64* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in download at line 673* 
   code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/packages/dal/pydal/objects.py in 
   retrieve at line 1918* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/packages/dal/pydal/objects.py in 
   retrieve_file_properties at line 1949* code arguments variables
   - 
   
   *File /usr/lib/python2.7/encodings/utf_8.py in decode at line 16* code 
   arguments variables
   Function argument list
   
   (input='\xa0\x1b\x18>\x10\x85\xe1\x11', errors='strict')
   Code listing
   
   11.
   12.
   13.
   14.
   15.
   16.
   17.
   18.
   19.
   20.
   
   ### Codec APIs
   
   encode = codecs.utf_8_encode
   
   def decode(input, errors='strict'):
   return codecs.utf_8_decode(input, errors, True)
   
   class IncrementalEncoder(codecs.IncrementalEncoder):
   def encode(self, input, final=False):
   return codecs.utf_8_encode(input, self.errors)[0]
   
   Variables
   input '\xa0\x1b\x18>\x10\x85\xe1\x11'
   builtinTrue True
   errors 'strict'
   global codecs 
   codecs.utf_8_decode 
   
Context

On Monday, October 7, 2019 at 7:11:52 AM UTC, Dave S wrote:
>
>
>
> On Saturday, October 5, 2019 at 9:41:47 AM UTC-7, dirman wrote:
>>
>> i really need help on this
>>
>> On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote:
>>>
>>>  'utf8' codec can't decode byte 
>>> 0xb7 in position 0: invalid start byte
>>>
>>> Getting the above error as thumbnails are not showing. what could be the 
>>> issue
>>>
>>
> Can you show the complete stack trace?  We may also need to see your 
> controller function.
>
> /dps
>  
>
>> ?
>>>
>>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ba67eeb6-8fa2-4677-add7-db028edcfe20%40googlegroups.com.


[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
 'utf8' codec can't decode byte 0xa0 
in position 0: invalid start byteVersion
web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
Python Python 2.7.12: /usr/local/bin/uwsgi (prefix: /usr)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
  File "/home/www-data/web2py/applications/g/controllers/default.py" 
<https://127.0.0.1/admin/edit/g/controllers/default.py>, line 68, in 
  File "/home/www-data/web2py/gluon/globals.py", line 421, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/gluon/cache.py", line 644, in wrapped_f
rtn = func()
  File "/home/www-data/web2py/applications/g/controllers/default.py" 
<https://127.0.0.1/admin/edit/g/controllers/default.py>, line 64, in download
return response.download(request, db)
  File "/home/www-data/web2py/gluon/globals.py", line 673, in download
(filename, stream) = field.retrieve(name, nameonly=True)
  File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 1918, 
in retrieve
file_properties = self.retrieve_file_properties(name, path)
  File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 1949, 
in retrieve_file_properties
filename = base64.b16decode(m.group('name'), True).decode('utf-8')
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 0: invalid 
start byte

Error snapshot [image: help] 
<https://127.0.0.1/admin/default/ticket/g/127.0.0.1.2019-10-07.20-41-17.dda2b68f-835d-43fa-8a41-a594ab02280f#>

('utf8' codec can't decode byte 0xa0 
in position 0: invalid start byte)

inspect attributes
Frames
   
   - 
   
   *File /home/www-data/web2py/gluon/restricted.py in restricted at line 
   219* code arguments variables
   - 
   
   *File /home/www-data/web2py/applications/g/controllers/default.py in 
at line 68* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in  at line 421* 
   code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/cache.py in wrapped_f at line 644* code
arguments variables
   - 
   
   *File /home/www-data/web2py/applications/g/controllers/default.py in 
   download at line 64* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in download at line 673* 
   code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/packages/dal/pydal/objects.py in 
   retrieve at line 1918* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/packages/dal/pydal/objects.py in 
   retrieve_file_properties at line 1949* code arguments variables
   - 
   
   *File /usr/lib/python2.7/encodings/utf_8.py in decode at line 16* code 
   arguments variables
   Function argument list
   
   (input='\xa0\x1b\x18>\x10\x85\xe1\x11', errors='strict')
   Code listing
   
   11.
   12.
   13.
   14.
   15.
   16.
   17.
   18.
   19.
   20.
   
   ### Codec APIs
   
   encode = codecs.utf_8_encode
   
   def decode(input, errors='strict'):
   return codecs.utf_8_decode(input, errors, True)
   
   class IncrementalEncoder(codecs.IncrementalEncoder):
   def encode(self, input, final=False):
   return codecs.utf_8_encode(input, self.errors)[0]
   
   Variables
   input '\xa0\x1b\x18>\x10\x85\xe1\x11'
   builtinTrue True
   errors 'strict'
   global codecs 
   codecs.utf_8_decode 
   
Context

On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote:
>
>  'utf8' codec can't decode byte 0xb7 
> in position 0: invalid start byte
>
> Getting the above error as thumbnails are not showing. what could be the 
> issue?
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bbfb89db-e596-47ab-939c-456019e1a753%40googlegroups.com.


[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
https://github.com/mdipierro/web2py-appliances/tree/master/DropZone

On Monday, October 7, 2019 at 8:11:52 AM UTC+1, Dave S wrote:
>
>
>
> On Saturday, October 5, 2019 at 9:41:47 AM UTC-7, dirman wrote:
>>
>> i really need help on this
>>
>> On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote:
>>>
>>>  'utf8' codec can't decode byte 
>>> 0xb7 in position 0: invalid start byte
>>>
>>> Getting the above error as thumbnails are not showing. what could be the 
>>> issue
>>>
>>
> Can you show the complete stack trace?  We may also need to see your 
> controller function.
>
> /dps
>  
>
>> ?
>>>
>>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8b3fa2ab-f81b-4f68-b4dc-c4db206fbcd2%40googlegroups.com.


[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
The Dropzone app in web2py appliances

link https://github.com/mdipierro/web2py-appliances/tree/master/DropZone

On Saturday, October 5, 2019 at 5:41:47 PM UTC+1, dirman wrote:
>
> i really need help on this
>
> On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote:
>>
>>  'utf8' codec can't decode byte 
>> 0xb7 in position 0: invalid start byte
>>
>> Getting the above error as thumbnails are not showing. what could be the 
>> issue?
>>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/6b890a17-c398-456e-a614-a50231c9aa13%40googlegroups.com.


[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman


On Wednesday, October 2, 2019 at 11:15:37 AM UTC+1, dirman wrote:
>
>  'utf8' codec can't decode byte 0xb7 
> in position 0: invalid start byte
>
> Getting the above error as thumbnails are not showing. what could be the 
> issue?
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/03f4dc1b-b6a2-4028-becb-88130457cf1e%40googlegroups.com.


[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-05 Thread dirman
i really need help on this

On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote:
>
>  'utf8' codec can't decode byte 0xb7 
> in position 0: invalid start byte
>
> Getting the above error as thumbnails are not showing. what could be the 
> issue?
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/88e0c5db-6155-46e9-8a76-fbd96c33663d%40googlegroups.com.


[web2py] Dropzone app thumbnail error in web2py appliances

2019-10-02 Thread dirman
 'utf8' codec can't decode byte 0xb7 
in position 0: invalid start byte

Getting the above error as thumbnails are not showing. what could be the 
issue?

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bab46106-7a92-4d6e-8170-c03db4d0b9d6%40googlegroups.com.


[web2py] Function for checking payments and arrears in DB needed

2019-06-14 Thread dirman
I need a function to manage payment by installment and when fee is fully 
paid

db.define_table('payment_type',
Field('category'),
Field('amount', 'double'),format='%(category)s %(amount)s')

db.define_table('fee',
Field('name', 'reference students'),
Field('category', 'reference payment_type'),
Field('payment_date', 'date'),
Field('arrears', 'double'),
Field('installment', 'double'))

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ebb499c1-8246-41f8-b60a-82a6278ebe8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Blocking email account registration based on domain

2018-05-09 Thread dirman
how do i block email accounts from registration based on domain ie 
@yahoo.com or @gmail.com and main website domain email accounts?

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-20 Thread dirman
db.define_table('articles',
Field('article_date', 'date'),
Field('article_title'),
Field('article_link', compute=lambda r: r.article_title.replace(' ', 
'-')),   
Field('image', 'upload'),  
Field('body', 'text'))

def index():
return dict()

def articles()
 article = db(db.articles.article_link==request.args[0]).select()[0]
 return dict(article=article)

I want to use manage and grid functions to edited the articles table
so records should to editable after insertion.

@auth.requires_membership('admin')
def manage():
 grid=SQLFORM.grid(db.articles, 
editargs=dict(fields=['article_date','article_title','article_link','image','body']))
 return grid

@auth.requires_membership('admin')
def grid():
response.view = 'generic.html' 
tablename = request.args(0)
if not tablename in db.tables: raise HTTP(403)
grid = SQLFORM.smartgrid(db[tablename], args=[tablename], 
deletable=False, editable=True)
return dict(grid=grid)

With the compute function on the table the SQLFORM.grid or smartgrid 
records can not be updated.

On Friday, April 20, 2018 at 12:27:07 AM UTC, Anthony wrote:
>
> On Thursday, April 19, 2018 at 3:43:02 PM UTC-4, dirman wrote:
>>
>> The page reloads the same SQLFORM edit form page with edited field not 
>> submited
>>
>
> Works for me. Please show all your code and describe the exact workflow.
>
> Anthony
>
>>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-19 Thread dirman
The page reloads the same SQLFORM edit form page with edited field not 
submited 

On Thursday, April 19, 2018 at 12:33:46 AM UTC, Anthony wrote:
>
> On Wednesday, April 18, 2018 at 6:21:12 PM UTC-4, dirman wrote:
>>
>> Working after adding compute=lambda
>>
>> Field('link', compute=lambda r: r.article_link.replace(' ', '-'))
>>
>
> Sorry, forgot the "compute=". I've updated my original response.
>  
>
>> However the table fields can not be updated using grid
>>
>
> You can force the grid to include compute fields in forms by using the 
> "formargs" argument to pass the "fields" argument to the SQLFORM generated 
> by the grid:
>
> grid = SQLFORM.grid(..., formargs=dict(fields=['article_title', 
> 'article_link']))
>
> When the grid generates the edit SQLFORM, it will pass the above "fields" 
> argument to SQLFORM, which will override the default field selection (which 
> excludes compute fields) and allow article_link to be edited. Note, if you 
> leave 'article_link' blank in a create or edit form, it will be entered as 
> an empty string in the database rather than computed. To avoid that with 
> create forms, you can instead limit 'article_link' to appear only in edit 
> forms by replacing "formargs" above with "editargs" (which only applies to 
> edit forms).
>
> Anthony
>
>>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
Working after adding compute=lambda

Field('link', compute=lambda r: r.article_link.replace(' ', '-'))

However the table fields can not be updated using grid


On Wednesday, April 18, 2018 at 6:12:40 PM UTC, Anthony wrote:
>
> On Wednesday, April 18, 2018 at 10:57:11 AM UTC-4, dirman wrote:
>>
>> http://.../articles/high-temperature-in-city
>>
>> def articles():
>>  news = db(db.articles.article_link==request.args[0]).select()[0]
>>  return(news=news)
>>
>
> I see. Yes, if you need to use the values to make a database query, then 
> it is probably best to store them in a database field, so use a computed 
> field.
>
> Please show the code that is generating an error along with the full 
> traceback.
>
> Anthony
>
>>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
http://.../articles/high-temperature-in-city

def articles():
 news = db(db.articles.article_link==request.args[0]).select()[0]
 return(news=news)

On Wednesday, April 18, 2018 at 2:28:41 PM UTC, Anthony wrote:
>
> On Wednesday, April 18, 2018 at 10:24:21 AM UTC-4, dirman wrote:
>>
>> I tried virtual field but can not use it as request args to select the 
>> records
>>
>
> Not sure what you mean by that. What does request args have to do with it? 
> Can you show your code?
>  
>
>> They do not appear in the list table fields.
>>
>> I got a ticket using the computed field example 
>>
>> Field('article_link', lambda r: r.article_title.replace(' ', '-'))
>>
>
> Please show your code and the full traceback.
>
> Anthony
>
>>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
Any example?.

what i want to do is to use article_link as request args to select the 
records instead of record.id

On Wednesday, April 18, 2018 at 11:16:35 AM UTC, 黄祥 wrote:
>
> perhaps you can use before_insert callback or onvalidate, then assign 
> article_link with the article_title that already converted with function 
> .replace('', '-')
>
> 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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
I tried virtual field but can not use it as request args to select the 
records
They do not appear in the list table fields.

I got a ticket using the computed field example 

Field('article_link', lambda r: r.article_title.replace(' ', '-'))

or also

Field('article_link', lambda r: r['article_title'].replace(' ', '-'))


On Wednesday, April 18, 2018 at 1:28:51 PM UTC, Anthony wrote:
>
> You probably want a computed field 
> <http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Computed-fields>
> .
>
> Field('article_link', lambda r: r.article_title.replace(' ', '-'))
>
> Alternatively, to avoid storing redundant data in the database, you can 
> instead use a virtual field 
> <http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#New-style-virtual-fields>
>  (that 
> will add a little overhead at runtime, as the links will be created from 
> the titles when you select rows from the database).
>
> Anthony
>
> On Wednesday, April 18, 2018 at 6:58:47 AM UTC-4, dirman wrote:
>>
>> How can i automatically repeat a field text into another field with 
>> hyphens to replace spaces before record insertion
>>
>> I want to insert 'High Temperature In City' in the article_title and to 
>> be repeated in the article_link with hyphens
>>
>> db.define_table('articles',
>> Field('article_title', 'string'),
>> Field('article_link', 'string'))
>>
>>
>> Example:
>> http://domain.com/articles/high-temperature-in-city/
>>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Automatically repeat field text in another before record insertion

2018-04-18 Thread dirman
How can i automatically repeat a field text into another field with hyphens 
to replace spaces before record insertion

I want to insert 'High Temperature In City' in the article_title and to be 
repeated in the article_link with hyphens

db.define_table('articles',
Field('article_title', 'string'),
Field('article_link', 'string'))


Example:
http://domain.com/articles/high-temperature-in-city/

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Nginx + SSL certificates for two different apps

2018-04-18 Thread dirman
I need help setting two SSL certificates for two different apps on one 
instance of web2py.
kindly include the config file if you can help me.

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Version 2.15.4 not sending auth mails

2018-04-12 Thread dirman
I now have version 2.16.1 installed on the vps server and can't get reset 
password and verification sent.

Still getting 'Unable to send email' message. 

When on localhost the mail is sent. 
 
I am not using gmail. 

Smtp server setting is from zoho.com

On Thursday, April 12, 2018 at 9:17:05 PM UTC, Dave S wrote:
>
>
>
> On Thursday, April 12, 2018 at 7:20:09 AM UTC-7, dirman wrote:
>>
>> Is there an issue sending reset password and verification mails in 
>> version 2.15.4?
>> I am using port 587 with tls set to True and hosted on a vps server.
>>
>> server = smtp.zoho.com:587
>> sender =mydoma...@domain.com
>> login = mydoma...@domain.com:password
>> tls =True
>>
>> getting 'Unable to send mail' error message
>>
>>
> I don't know about auth mails, but I can send email just fine in 2.15.4.  
> I'm on an AWS Linux instance, and letting the local sendmail provide the 
> mail service.   I'm doing this from a scheduler thread.
>
> For some mail servers, two-factor authentication is required, but gmail 
> has an "allow some clients" setting that can be used.  I'm not doing the 
> search terms correctly, but there is prior discussion in this group.
>
> /dps
>
> i can send email using smtp setting from python script but not with 
>> web2py  auth.settings.mailer
>>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Version 2.15.4 not sending auth mails

2018-04-12 Thread dirman
Is there an issue sending reset password and verification mails in version 
2.15.4?
I am using port 587 with tls set to True and hosted on a vps server.

server = smtp.zoho.com:587
sender =mydoma...@domain.com
login = mydoma...@domain.com:password
tls =True

getting 'Unable to send mail' error message

i can send email using smtp setting from python script but not with web2py  
auth.settings.mailer

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Reset password page problem

2017-01-18 Thread dirman
i can't access the reset password page after clicking the reset password 
link from email. it redirects to login page.

I need help.

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Subscription table

2016-11-25 Thread dirman

I have this newspaper subscription table;

db.define_table('business_and_financial_times',
Field('subscription', 'boolean', default=False),
Field('creation_date', 'date', default=now),

Field('subscription_option',requires=IS_IN_SET((['none','monthly','yearly']))),
Field('days','integer',requires=IS_IN_SET(([0, 30, 365])), default=0),
Field('subscription_date', 'date', default=now),

Field('payment_option',requires=IS_IN_SET((['...','...','...',''])),default='None'),
Field('payment_token'),
Field('payment_process_time','time'),
Field('subscriber', db.auth_user, default=auth.user_id))

i want to count down the days after a user subscribes to a newspaper and 
update the days left depending on 
the subscription option.

Field('days','integer',requires=IS_IN_SET(([0, 30, 365])), default=0),

I need help

thanks

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Enabling Google Sign-In

2016-01-21 Thread dirman
hi 
am getting  global name 'Storage' is not 
defined
when using  Storage(json.load(f)['web'])



On Thursday, October 22, 2015 at 11:27:35 AM UTC, mcm wrote:
>
>
> http://web2py.com/books/default/chapter/29/09/access-control?search=oauth#Other-login-methods-and-login-forms
>
>
> Grab the file google_auth.json from the google developer console and put 
> in private dir of your app
>
> put  code similar to the one below in db.py:
>
>
> from gluon.contrib.login_methods.oauth20_account import OAuthAccount
>
> try:
> import json
> except ImportError:
> from gluon.contrib import simplejson as json
>
>
> class GoogleAccount(OAuthAccount):
> "OAuth 2.0 for Google"
>
> def __init__(self):
> with open(os.path.join(request.folder, 
> 'private/google_auth.json'), 'rb') as f:
> gai = Storage(json.load(f)['web'])
> 
> OAuthAccount.__init__(self, None, gai.client_id, gai.client_secret,
>   gai.auth_uri, gai.token_uri,
>   scope='
> https://www.googleapis.com/auth/userinfo.profile 
> https://www.googleapis.com/auth/userinfo.email',
>   approval_prompt='force', 
> state="auth_provider=google")
>
>
> def get_user(self):
>
> token = self.accessToken()
> if not token:
> return None
>
> uinfo_url = '
> https://www.googleapis.com/oauth2/v1/userinfo?access_token=%s' % 
> urllib2.quote(token, safe='')
>
> uinfo = None
>
> try:
> uinfo_stream = urllib2.urlopen(uinfo_url)
> except:
> session.token = None
> return
> data = uinfo_stream.read()
> uinfo = json.loads(data)
>
> username = uinfo['id']
> 
> return dict(first_name = uinfo['given_name'],
> last_name = uinfo['family_name'],
> username = username,
> email = uinfo['email'])
>
> auth.settings.login_form = GoogleAccount()
>
>
> 2015-10-22 11:02 GMT+02:00 Leonel Câmara  >:
>
>> I would try to use this:
>>
>> https://code.google.com/p/w2p-social-auth/
>>
>> -- 
>> 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 subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] oauth2 for google

2016-01-21 Thread dirman
I am getting

 global name 'Storage' is not defined

when using Storage(json.load(f)['web'])

I need help

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] SSL certificates for three different domains/apps

2015-12-14 Thread dirman
I have three apps with their own domain. Am running web2py-nginx on ubuntu 
12.04.how and where do i configure SSL for the three different domains

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread dirman
i just install web2py on ubuntu 12.04 on vps.net server but can't route to 
web2py

this is what i am getting from Apache instead of the web2py welcome app

It works! 

This is the default web page for this server.

The web server software is running but no content has been added, yet.


 i need help

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py - on ubuntu 12.04 vps.net

2015-12-09 Thread dirman
i used the script: 

wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
and
chod +x setup-web2py-ubuntu.sh
./setup-web2py-ubuntu





On Wednesday, December 9, 2015 at 4:35:19 PM UTC, Anthony wrote:
>
> Did you follow the deployment instructions for Apache: 
> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-setup
>
> On Wednesday, December 9, 2015 at 11:09:09 AM UTC-5, dirman wrote:
>>
>> i just install web2py on ubuntu 12.04 on vps.net server but can't route 
>> to web2py
>>
>> this is what i am getting from Apache instead of the web2py welcome app
>>
>> It works! 
>>
>> This is the default web page for this server.
>>
>> The web server software is running but no content has been added, yet.
>>
>>
>>  i need help
>>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: help on form button inner text

2015-09-06 Thread dirman
This is the form

form2=FORM(
DIV(
INPUT(_type="text",_class="span2", _name="usr", 
requires=IS_NOT_EMPTY(error_message=()), _placeholder="username"),
BUTTON(_value='Pay!',_type="submit",_class="span2"),_style='margin:10px 
20px;'))

and i want to do an update after process

form.element('input[name=usr]')['_name']='tkn'
form.element('input[name=tkn]')['_placeholder']='token'
form.element('button[type=submit]')['_submit_button']='Confirm!'

but can't get the Confirm! text on the submit button 

On Saturday, September 5, 2015 at 11:13:55 PM UTC, Ben Lawrence wrote:
>
> I just write:
> form=SQLFORM.factory(*fields,buttons = [TAG.button('Send 
> Message',_type="submit")])
>
>
> On Saturday, September 5, 2015 at 3:21:09 PM UTC-7, dirman wrote:
>>
>> i need help here
>>
>> this works fine with form input
>>
>> form.element('input[type=submit]')['_value']='Go!'
>>
>> but this does not output the inner text on form button
>>
>> form.element('button[type=submit]')['_submit_button']='Go!'
>>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: help on sessions

2015-09-06 Thread dirman
Thank you. 

On Sunday, September 6, 2015 at 4:54:01 AM UTC, Massimo Di Pierro wrote:
>
> del session.cart['name'] ?
>
> On Saturday, 5 September 2015 17:26:50 UTC-5, dirman wrote:
>>
>> is it possible to delete or clear an item in session.cart.items() ?
>>
>

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] help on sessions

2015-09-05 Thread dirman
is it possible to delete or clear an item in session.cart.items() ?

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Security issue with request.vars

2015-09-05 Thread dirman

am having a security issue with this function
i sent this ajax request: cart_callback?action=add=hacked
 

def cart_callback():
id = request.vars.id
if request.vars.action == 'add':
session.cart[id]=session.cart.get(id,0)+1
if request.vars.action == 'sub':
session.cart[id]=max(0,session.cart.get(id,0)-1)
return str(session.cart[id])

and i got a ticket

even with id=int(request.vars.id)

how do i secure this function so that it accepts only integer on 
request.vars.id

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] help on form button inner text

2015-09-05 Thread dirman
i need help here

this works fine with form input

form.element('input[type=submit]')['_value']='Go!'

but this does not output the inner text on form button

form.element('button[type=submit]')['_submit_button']='Go!'

-- 
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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Problem returning XML in VIEW

2013-11-25 Thread dirman
How do i return all XML values in the condition tags
 
#XML
condition
code111/code
descriptionSunny/description
/condition
condition
code112/code
descriptionWindy/description
/condition
condition
code113/code
descriptionOvercast/description
/condition
condition
code114/code
descriptionPartly cloudy/description
/condition
 
 
#CONTROLLER
import urllib2
from xml.dom import minidom
def weather():
 source = 
urllib2.urlopen('http://127.0.0.1:8000/weather/static/codes.xml')
 source_text = source.read()
 parseddata = minidom.parseString(source_text)
 conditions = parseddata.getElementsByTagName('condition')
 for condition in conditions:
   cd = condition.getElementsByTagName('code')[0]
   ds = condition.getElementsByTagNmae('description')[0]
   weathercode = cd.childNodes[0].data
   weatherdescription = ds.chilNodes[0].data
 return 
dict(weathercode=weathercode,weatherdescription=weatherdescription,condition=condition)
 
 
#VIEW
# i want the code and  description values in all the XML condition's
{{for condition in conditions:}}
{{=weathercode}}
{{=weatherdescription}}
{{pass}}
 
   
  
 
 
 

-- 
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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] now.weekday() as string

2013-11-22 Thread dirman
how do i return now.weekday() as string instead of a integer and also two 
days ahead from current weekday?

-- 
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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: BingSearch API

2013-11-19 Thread dirman
Hi Massimo Di Pierro, i used my azuremarket Account key.Is there a new api 
available.I really want to use the search api on my website.

On Monday, November 18, 2013 8:13:28 PM UTC, Massimo Di Pierro wrote:

 Perhaps they changed the API but it is more likely that the example API ID 
 has expired:


 https://github.com/mdipierro/web2py-appliances/blob/master/BingApi/controllers/default.py#L10

 Did you get your own API ID?

 On Monday, 18 November 2013 10:40:50 UTC-6, dirman wrote:

 I downloaded the bing search api from web2py appliances and change the 
 APPID to my account ID but does not work.i get
 the error ticket: parameter is invalid.What is wrong? 



-- 
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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] BingSearch API

2013-11-18 Thread dirman
I downloaded the bing search api from web2py appliances and change the 
APPID to my account ID but does not work.i get
the error ticket: parameter is invalid.What is wrong? 

-- 
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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Bing appliance

2013-10-30 Thread dirman
I installed the bingsearch app from 
https://github.com/mdipierro/web2py-appliances/tree/master/BingApi. I then 
changed the APPID to my account key but i get the error class 
'applications.BINGSEARCH.modules.bingapi_w.BingException' Parameter has 
invalid value. Please what is wrong?

On Thursday, February 16, 2012 5:02:16 AM UTC, Massimo Di Pierro wrote:

 Keep us updated. I'd be happy to replace the bing appliance with a 
 better one and credit you. 

 On Feb 15, 4:55 pm, Tim Anyasi tim.any...@gmail.com wrote: 
  Trying to update the bing appliancehttps://
 github.com/mdipierro/web2py-appliances/tree/master/BingApi 
  to use the version2 of bing api. 
  Here is the original modulehttps://
 github.com/agiliq/searchapi/blob/master/searchapi/bingapi.py 
  and here is the module for version 2
 https://github.com/agiliq/searchapi/blob/master/searchapi/simplesearc... 
  they look completely different. Will like to make it work like 
 thishttp://demos.9lessons.info/Bing.html 
  Thanks 
  Disclosure: new to python, but I am loving web2py

-- 
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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] User Preference Settings

2013-09-03 Thread dirman
this part of the code works;
{{if auth.is_logged_in():}}{{for settings in 
records:}}{{=db.settings[auth.user_id].fontsize}}{{pass}}{{else:}}{{=12}}px:}
but the preferences a logged in user makes seem to affect other users 
setting. 

On Sunday, September 1, 2013 4:43:27 AM UTC+1, viniciusban wrote:

 Tell us what is not working in your try. 

 On Sat, Aug 31, 2013 at 11:33 AM, dirman anc...@gmail.com javascript: 
 wrote: 
  i want to add a preference settings page where a logged in user can 
 change 
  font size and also turn off advertisement on the website 
  and this will be unique to the user.i don like the cookie method that 
 runs 
  on client machines. 
  I am thinking of a function that can manipulate css property values and 
  these preferences never expire; 
  
  something like below, though it is not a working and proper coding; 
  
  #View 
  style 
  .txt{font-size:{{if auth.is_logged_in():}}{{for settings in 
  
 records:}}{{=db.settings[auth.user_id].fontsize}}{{pass}}{{else:}}{{=12}}px:} 

  
 .adcontainer{display:{{=db.settings[auth.user_id]advertisement}}{{pass}}{{else:}}{{none}}{{pass}};}
  

  /style 
  
  #Model 
  db.define_table('settings', 
  Field('fontsize','interger', auth.user,default=auth.user_id), 
  Field('advertisement','string',auth.user,default.user_id)) 
  db.settings.fontsize.default= '12' 
  db.settings.advertisement.default= 'on' 
  db.settings.fontsize.requires=IS_IN_SET(('12','13','14')) 
  db.settings.advertisement.requires=IS_IN_SET(('on','of')) 
  ! and some kind of variables in the model here for the css values 
  
  #Controller 
  def preference(): 
  records = db.(db.settings).select(orderby=db.setting.id, 
 limitby=(0,1)) 
  form = SQLFORM.(db.setting) 
  if form.accepts(request.vars): 
   redirect(URL('default', 'index', args=form.vars.id)) 
  return dict(form=form,records=records) 
  
  def index(): 
  records = db.(db.settings==auth.user_id).select(orderby=~
 db.settings.id, 
  limitby=(0,1)) 
  return dict(records=records) 
  
  I would like a complete working one based on the above 
  
  any help! 
  
  
  
  -- 
  
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  web2py-users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to web2py+un...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 


-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] User Preference Settings

2013-08-31 Thread dirman
i want to add a preference settings page where a logged in user can change 
font size and also turn off advertisement on the website
and this will be unique to the user.i don like the cookie method that runs 
on client machines.
I am thinking of a function that can manipulate css property values and 
these preferences never expire;

something like below, though it is not a working and proper coding;

#View
style
.txt{font-size:{{if auth.is_logged_in():}}{{for settings in 
records:}}{{=db.settings[auth.user_id].fontsize}}{{pass}}{{else:}}{{=12}}px:}
.adcontainer{display:{{=db.settings[auth.user_id]advertisement}}{{pass}}{{else:}}{{none}}{{pass}};}
/style

#Model
db.define_table('settings',
Field('fontsize','interger', auth.user,default=auth.user_id),
Field('advertisement','string',auth.user,default.user_id))
db.settings.fontsize.default= '12'
db.settings.advertisement.default= 'on'
db.settings.fontsize.requires=IS_IN_SET(('12','13','14'))
db.settings.advertisement.requires=IS_IN_SET(('on','of'))
! and some kind of variables in the model here for the css values

#Controller
def preference():
records = db.(db.settings).select(orderby=db.setting.id, limitby=(0,1))
form = SQLFORM.(db.setting)
if form.accepts(request.vars):
 redirect(URL('default', 'index', args=form.vars.id))
return dict(form=form,records=records)

def index():
records = 
db.(db.settings==auth.user_id).select(orderby=~db.settings.id, 
limitby=(0,1))
return dict(records=records)

I would like a complete working one based on the above

any help!



-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Logged in dropdown links

2013-08-29 Thread dirman
Thank you.

On Wednesday, August 28, 2013 6:19:28 PM UTC, dirman wrote:

 is it posible to add another link to the logged in dropdown in adding to 
 the profile,password and logout links?


-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Logged in dropdown links

2013-08-28 Thread dirman
is it posible to add another link to the logged in dropdown in adding to 
the profile,password and logout links?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.