[web2py] Re: web2py with js framework

2017-08-15 Thread Massimo Di Pierro
I want to know more.

On Tuesday, 15 August 2017 18:40:57 UTC-5, Val K wrote:
>
>
> Considering the number of views, this issue is quite exciting.
>
> Here is my experience. I use RapydML and  RapydScript to generate 
>  Vue-components.
>
> I wrote brute-force parser + made some hacks of RapydML-compiler so, as 
> exhaust I receive single js-file with embeded template as html-string.
>
> If anyone is interested, I can describe in more detail. In gVim it looks 
> like this:
>
>
>
>
>
> 
>
>
>
>
>
>
> On Tuesday, August 15, 2017 at 8:23:34 AM UTC+3, Limedrop wrote:
>>
>> @Carlos...I don't know if this is better, but it is different.  Probably 
>> more suited to bigger apps.  My basic assumption is that if you're going to 
>> use vue.js then, ultimately, it will be a lot easier if you stick to the 
>> proper vue.js way of doing things.  In general this means letting vue.js do 
>> it's stuff with the frontend and leaving web2py with the data and backend.
>>
>> Specifically it means setting up your view files like this:
>> https://vuejs.org/v2/guide/single-file-components.html
>>
>> And using this:
>> https://github.com/vuejs-templates/webpack
>>
>> In development mode I have web2py running on one port and node running on 
>> another (node's hot-reloading seems like magic, and you can use the chrome 
>> VueDevtools plugin to debug). When I'm ready to commit I run "npm run 
>> build".  The index file is then compiled to "/views/default/index.html", 
>> and the assets are compiled to "/static".
>>
>> In production I get web2py to serve the index file and then get vue.js to 
>> load whatever else it needs via ajax (axios).
>>
>> A basic outline of the key files are given below.  Note that these are 
>> just snippets to show you how you might do it...the code is incomplete and 
>> it will NOT work out-of-the-box.
>>
>>
>> \web2py\applications\app\controllers\default.py
>>
>> def index():
>> """ Starts vue.js session
>> 
>> The uuid is injected into the html  tag as
>> the id.  For example: 
>> 
>> vue.js then uses status_load() to retrieve the session details.
>> """
>> uuid = session_new()
>> return dict(UUID=uuid)
>>
>> def status_load():
>> uuid, error = 
>> IS_MATCH('[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\Z')(request.vars['uuid'])
>> if error:
>> raise HTTP(403, "Not authorized")
>> query = (db.vue_session.uuid==uuid)
>> session = 
>> db(query).select(orderby=~db.vue_session.expiry_datetime).first()
>> if not session:
>> raise HTTP(403, "Not authorized")
>> return response.json(session)
>> 
>>
>> \web2py\applications\app\views\index.html
>> ## The COMPILED VUE.JS FILE GOES HERE!!!
>>
>>
>> \vue\index.html
>> 
>> 
>>   
>> 
>>   
>> 
>> 
>>   
>> 
>>
>> \vue\src\App.vue
>> 
>>   
>> 
>> 
>> 
>>   
>> 
>>
>> 
>> export default {
>>   name: 'app',
>>   components: {
>>   },
>>   data () {
>> return {
>> }
>>   },
>>   computed: {
>>   },
>>   methods: {
>>   },
>>   mounted: function () {
>> // The uuid is injected into the parentElement by web2py
>> // The store will then use the uuid to get the session from web2py
>> // and may redirect to the restore_point
>> this.$store.dispatch('NEW_UUID', { uuid: this.$el.parentElement.id })
>>   }
>> }
>> 
>>
>> \vue\src\store\index.js
>> import Vue from 'vue'
>> import Vuex from 'vuex'
>> import axios from 'axios'
>> import router from '../router'
>> Vue.use(Vuex)
>> var axiosi = axios.create({
>>   baseURL: '/myapp/default/',
>>   timeout: 5000
>> })
>> const store = new Vuex.Store({
>>   state: {
>> // put your session variables here
>>   },
>>   actions: {
>> NEW_UUID: function ({ commit, dispatch, state }, { uuid }) {
>>   // At the start of each session web2py gives us a uuid
>>   // We then go back to web2py and retrieve the session state
>>   commit('SET_UUID', { uuid: uuid })
>>   var data = {}
>>   data.uuid = uuid
>>   axiosi.post('status_load', data).then((response) => {
>> commit('UPDATE_STATUS', { newState: response.data })
>>   }, (err) => {
>> console.log(err)
>> router.push({ name: 'error', params: { errorMessage: 
>> err.response.data } })
>>   })
>> }
>>
>>
>>

-- 
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: Admin UI - Error ticket less information in the latest web2py releases

2017-08-15 Thread Massimo Di Pierro
very weird. Can you open a ticket about this?

On Tuesday, 15 August 2017 10:19:42 UTC-5, Paolo Caruccio wrote:
>
> Hello everyone.
>
> In a view, I have a trivial NameError: name 'fattura' is not defined due to
>
> {{for ft in fatture:}}
> {{=fattura.id}}
> {{pass}}
>
> But the Error Ticket returned by web2py is different depending on the 
> development environment.
>
> *Case 1 (best)*
> SO: windows 8
> Web2py: Version 2.14.6-stable + timestamp.2016.05.10.00.21.47
> Python: Python 2.7.13
>
>
> 
>
>
> *Case 2*
> SO: windows 8
> Web2py: Version 2.15.3-stable + timestamp.2017.08.07.12.51.45
> Python: Python 2.7.13
> *Filename missing*
>
>
> 
>
>
> *Case 3*
> SO: Linux MInt 8.2
> Web2py: Version 2.15.3-stable + timestamp.2017.08.07.12.51.45
> Python: Python 2.7.12
> *The same as the case 2 but also Error snapshot and Python version are 
> missing. *
>
>
> 
>
>
> *Case 4 (worse)*
> SO: Linux MInt 8.2
> Web2py: Version 2.15.3-stable + timestamp.2017.08.07.12.51.45
> Python: Python 3.6.2
> *Python version, reference to filename and line are missing. New exception 
> occurred.*
>
>
> 
>
>
>
> Has anyone ever encountered this problem? How did he solve it?
>
> Thank you.
>

-- 
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: Weird problems generating menu from database

2017-08-15 Thread Massimo Di Pierro
Replace:

response.menu = cache.ram('menu', lambda:build_menu(), None) # to cache it!

with

submenu = cache.ram('menu', lambda:build_menu(), None) # to cache it!
response.menu =[('Main', False, URL('default', 'index'), submenu]


On Monday, 14 August 2017 02:50:09 UTC-5, Вячеслав Анатольевич wrote:
>
> Hi Massimo! Thanks so much! It Works! But it generate menu in inline, like 
> this:
>
> menu1 menu1menu1
>
> In menu1-menu2 in menu2-mnm_name (thats all right) But how menu1 insert in 
>
> response.menu =[
>('Main', False, URL('default', 'index'), [here]]
>
>
>

-- 
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: Communication error

2017-08-15 Thread Leonel Câmara
What happened before this started?

-- 
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 with js framework

2017-08-15 Thread Val K



Considering the number of views, this issue is quite exciting.

Here is my experience. I use RapydML and  RapydScript to generate 
 Vue-components.

I wrote brute-force parser + made some hacks of RapydML-compiler so, as 
exhaust I receive single js-file with embeded template as html-string.

If anyone is interested, I can describe in more detail. In gVim it looks 
like this:











On Tuesday, August 15, 2017 at 8:23:34 AM UTC+3, Limedrop wrote:
>
> @Carlos...I don't know if this is better, but it is different.  Probably 
> more suited to bigger apps.  My basic assumption is that if you're going to 
> use vue.js then, ultimately, it will be a lot easier if you stick to the 
> proper vue.js way of doing things.  In general this means letting vue.js do 
> it's stuff with the frontend and leaving web2py with the data and backend.
>
> Specifically it means setting up your view files like this:
> https://vuejs.org/v2/guide/single-file-components.html
>
> And using this:
> https://github.com/vuejs-templates/webpack
>
> In development mode I have web2py running on one port and node running on 
> another (node's hot-reloading seems like magic, and you can use the chrome 
> VueDevtools plugin to debug). When I'm ready to commit I run "npm run 
> build".  The index file is then compiled to "/views/default/index.html", 
> and the assets are compiled to "/static".
>
> In production I get web2py to serve the index file and then get vue.js to 
> load whatever else it needs via ajax (axios).
>
> A basic outline of the key files are given below.  Note that these are 
> just snippets to show you how you might do it...the code is incomplete and 
> it will NOT work out-of-the-box.
>
>
> \web2py\applications\app\controllers\default.py
>
> def index():
> """ Starts vue.js session
> 
> The uuid is injected into the html  tag as
> the id.  For example: 
> 
> vue.js then uses status_load() to retrieve the session details.
> """
> uuid = session_new()
> return dict(UUID=uuid)
>
> def status_load():
> uuid, error = 
> IS_MATCH('[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\Z')(request.vars['uuid'])
> if error:
> raise HTTP(403, "Not authorized")
> query = (db.vue_session.uuid==uuid)
> session = 
> db(query).select(orderby=~db.vue_session.expiry_datetime).first()
> if not session:
> raise HTTP(403, "Not authorized")
> return response.json(session)
> 
>
> \web2py\applications\app\views\index.html
> ## The COMPILED VUE.JS FILE GOES HERE!!!
>
>
> \vue\index.html
> 
> 
>   
> 
>   
> 
> 
>   
> 
>
> \vue\src\App.vue
> 
>   
> 
> 
> 
>   
> 
>
> 
> export default {
>   name: 'app',
>   components: {
>   },
>   data () {
> return {
> }
>   },
>   computed: {
>   },
>   methods: {
>   },
>   mounted: function () {
> // The uuid is injected into the parentElement by web2py
> // The store will then use the uuid to get the session from web2py
> // and may redirect to the restore_point
> this.$store.dispatch('NEW_UUID', { uuid: this.$el.parentElement.id })
>   }
> }
> 
>
> \vue\src\store\index.js
> import Vue from 'vue'
> import Vuex from 'vuex'
> import axios from 'axios'
> import router from '../router'
> Vue.use(Vuex)
> var axiosi = axios.create({
>   baseURL: '/myapp/default/',
>   timeout: 5000
> })
> const store = new Vuex.Store({
>   state: {
> // put your session variables here
>   },
>   actions: {
> NEW_UUID: function ({ commit, dispatch, state }, { uuid }) {
>   // At the start of each session web2py gives us a uuid
>   // We then go back to web2py and retrieve the session state
>   commit('SET_UUID', { uuid: uuid })
>   var data = {}
>   data.uuid = uuid
>   axiosi.post('status_load', data).then((response) => {
> commit('UPDATE_STATUS', { newState: response.data })
>   }, (err) => {
> console.log(err)
> router.push({ name: 'error', params: { errorMessage: 
> err.response.data } })
>   })
> }
>
>
>

-- 
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] SQLFORM.grid search type error reduce()

2017-08-15 Thread Paul Ellis
ok no more errors.

If I search for a name (John) for example in the table i get everything, Or
for his ID (11) I get everything.

I realise this is a join table (Many to Many) so it's no big deal but the
search here is not very useful.

I will need to implement special grids for these situations.

Thanks for the fix.

On Tue, Aug 1, 2017 at 10:46 AM, Paul Ellis  wrote:

> I am getting this error only when searching the auth_membership table
>
> I have put in a basic 'appadmin' in my webapp. I call it 'tooladmin' to
> differentiate from the built in stuff.
>
> I use this function to edit any database table:
> def manage_table():
> tablename = request.args(0)
> pagetitle = H4('{0} {1}'.format(T('Manage'), tablename))
> buttongroup = [_btn_index()]
> table = db[tablename]
> pagecontent = SQLFORM.grid(table, args=[request.args(0)])
>
>
> response.view = 'tooladmin_core.html'
> return dict(pagetitle=pagetitle, buttongroup=buttongroup,
> pagecontent=pagecontent)
>
> The search feature on the SQLFORM.grid is throwing this error when
> searching the auth_membership table:
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
>
> Traceback (most recent call last):
>   File "E:\web2py\gluon\restricted.py", line 227, in restricted
> exec ccode in environment
>   File "E:/web2py/applications/OfferTool/controllers/tooladmin.py" 
> , line 
> 262, in 
>   File "E:\web2py\gluon\globals.py", line 417, in 
> self._caller = lambda f: f()
>   File "E:/web2py/applications/OfferTool/controllers/tooladmin.py" 
> , line 
> 136, in manage_table
> pagecontent = SQLFORM.grid(table, args=[request.args(0)])
>   File "E:\web2py\gluon\sqlhtml.py", line 2526, in grid
> subquery = SQLFORM.build_query(sfields, keywords)
>   File "E:\web2py\gluon\sqlhtml.py", line 1827, in build_query
> ) for k in key.split()])
> TypeError: reduce() of empty sequence with no initial value
>
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/UnN6AyOh2Lg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@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] Communication error

2017-08-15 Thread Artem
Hi!
Sos!
Communication error occurred permanently .
Admin interface running very slow .
../admin/errors and app/errors are empty .
How to define/fix the issue ?

2.15.3-stable+timestamp.2017.08.07.12.51.45
(Running on Rocket 1.2.6, Python 2.7.3)   

  

-- 
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: web2py 2.15.3 is OUT

2017-08-15 Thread 黄祥
in 2.15.3, sometimes an error occured saying there is no 
app_name/languages/default.py 
solution : copy languages/default.py from 2.14.x version
question : is the file remove for a purpose ? checked on github, there is 
no file in welcome/languages/default.py 

thanks and 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: have view, still getting generic

2017-08-15 Thread Dave S


On Tuesday, August 15, 2017 at 1:26:41 PM UTC-7, Jim S wrote:
>
> If you're text above is spelled correctly addsegement.html has a typo. 
>  Should be addsegment.html based on the function number you specified.  
>
> But, I assuming that is just a typo in the post.  
>

:-) -- but worth triple checking.
 

> Can you post the code in question?
>
>
As with many pets, this one has to wait for me to get home ;-]  Watch this 
space 
 

> -Jim
>
>
/dps
 

> On Tuesday, August 15, 2017 at 2:40:01 PM UTC-5, Dave S wrote:
>>
>> On one of my pet projects, I created a view (.html) for my default/index 
>> function, and it works fine.  For my default/addsegment function (which 
>> index redirects to if the form was accepted) I initially used the generic 
>> view, but then I copied index.html to addsegement.html  -- but I am still 
>> getting the generic view.  According to the Web2Py IDE, I spelled the file 
>> name correctly, and it's located in views/default, so what should I check 
>> next to get to the right display?
>>
>> (the view is pretty simple, stripped down from the welcome app's 
>> default/index.html;  has 
>>
>> {{=form}}
>>
>>
>> in the center, and some links in the left sidebar.  Works great for 
>> myapp/default/index.html; addsegment returns a dict)
>>
>> Dave
>> /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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: have view, still getting generic

2017-08-15 Thread Jim S
If you're text above is spelled correctly addsegement.html has a typo. 
 Should be addsegment.html based on the function number you specified.  

But, I assuming that is just a typo in the post.  Can you post the code in 
question?

-Jim

On Tuesday, August 15, 2017 at 2:40:01 PM UTC-5, Dave S wrote:
>
> On one of my pet projects, I created a view (.html) for my default/index 
> function, and it works fine.  For my default/addsegment function (which 
> index redirects to if the form was accepted) I initially used the generic 
> view, but then I copied index.html to addsegement.html  -- but I am still 
> getting the generic view.  According to the Web2Py IDE, I spelled the file 
> name correctly, and it's located in views/default, so what should I check 
> next to get to the right display?
>
> (the view is pretty simple, stripped down from the welcome app's 
> default/index.html;  has 
>
> {{=form}}
>
>
> in the center, and some links in the left sidebar.  Works great for 
> myapp/default/index.html; addsegment returns a dict)
>
> Dave
> /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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to install NLTK?

2017-08-15 Thread Leonel Câmara
Just install it on your system python or virtual env.

Instructions:
http://www.nltk.org/install.html

-- 
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] have view, still getting generic

2017-08-15 Thread Dave S
On one of my pet projects, I created a view (.html) for my default/index 
function, and it works fine.  For my default/addsegment function (which 
index redirects to if the form was accepted) I initially used the generic 
view, but then I copied index.html to addsegement.html  -- but I am still 
getting the generic view.  According to the Web2Py IDE, I spelled the file 
name correctly, and it's located in views/default, so what should I check 
next to get to the right display?

(the view is pretty simple, stripped down from the welcome app's 
default/index.html;  has 

{{=form}}


in the center, and some links in the left sidebar.  Works great for 
myapp/default/index.html; addsegment returns a dict)

Dave
/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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Current version: 2.15.3-stable+timestamp.2017.08.07.12.51.45 (LGPLv3 License) download link wrong.

2017-08-15 Thread Martin Weissenboeck
Try
https://mdipierro.pythonanywhere.com/examples/static/web2py_win.zip

Regards Martuin

2017-08-15 10:21 GMT+02:00 Halili Celik :

> When I downloaded above link for windows, the web2py version is still '
> 2.15.2-stable+timestamp.2017.07.19.12.18.41'.
>
> --
> 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.
>

-- 
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: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-15 Thread Anthony
On Tuesday, August 15, 2017 at 7:49:09 AM UTC-4, Rahul wrote:
>
> Hi Anthony, 
>  Thanks for getting back. No changes were made that would break 
> the system so badly.  
> And although today I did copy the single project on the same machine but 
> with a newly setup web2py 2.15.3. 
> I will try using this project on another machine by configuring it from 
> scratch.
>
> Does using routes do any magic to web2py or its app by copying/changing 
> any file for routes as 404 is a strange error to get.
>

No. The 404 indicates web2py isn't finding the app/controller/function 
identified from the URL after rewrite.

-- 
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] How to install NLTK?

2017-08-15 Thread Fabiano Almeida
Hi all,

How to install NLTK on web2py?

Thanks,

Fabiano.

-- 
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: Changes with Postgis API with 2.15.2 (st_as_geojson() not working anymore)??

2017-08-15 Thread Leonel Câmara
I submitted a pull request with a fix if you want you can apply the changes 
locally to fix your problem:

https://github.com/web2py/pydal/pull/489

-- 
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] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
I send a PR to web2py book to include the Gist in Upgrading section...

On Tue, Aug 15, 2017 at 12:49 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Here :
>
> https://gist.github.com/BuhtigithuB/7d2f50203145542e0bdedb731be8a152
>
> On Tue, Aug 15, 2017 at 12:18 PM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Yes all these files from welcome should be updated... Before you must
>> make a backup of your app just to make sure it don't break anything...
>>
>> Richard
>>
>> On Tue, Aug 15, 2017 at 11:24 AM, Martin Weissenboeck > > wrote:
>>
>>> Did you mean ... ?
>>>
>>> Those files includes :
>>>
>>> view*s*/
>>>
>>> appadmin.html
>>> generic.ics
>>> generic.load
>>> generic.rss
>>> layout.html
>>> generic.json
>>> generic.map
>>> generic.xml
>>> web2py_ajax.html
>>> generic.html
>>> generic.jsonp
>>> generic.pdf
>>>
>>> controller/
>>> appadmin.py
>>>
>>> static/
>>> css/*
>>> images/*
>>> js/*
>>>
>>> You can do this like that :
>>>
>>> From web2py/applications
>>>
>>> cp -R welcome/static/* YOURAPP/static/
>>> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
>>> cp *-R* welcome/views/* *YOURAPP*/views/
>>>
>>> --
>>>
>>> 2017-08-15 16:55 GMT+02:00 Richard Vézina :
>>>
 There is mention of it in the book :

 http://web2py.com/books/default/chapter/29/14/other-recipes?
 search=upgrade#Upgrading

 On Tue, Aug 15, 2017 at 10:54 AM, Richard Vézina <
 ml.richard.vez...@gmail.com> wrote:

> Yes, I consider creating a gist too...
>
> Richard
>
> On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck <
> mweis...@gmail.com> wrote:
>
>> Thank you - should be mentioned in the book.
>>
>> 2017-08-15 16:44 GMT+02:00 Richard Vézina <
>> ml.richard.vez...@gmail.com>:
>>
>>> Always the same issue... I would remove this update button to me...
>>> Whe you update web2py you need to update many web2py reserved files in 
>>> your
>>> app that the web2py update don't do for you...
>>>
>>> Those files includes :
>>>
>>> view/
>>>
>>> appadmin.html
>>> generic.ics
>>> generic.load
>>> generic.rss
>>> layout.html
>>> generic.json
>>> generic.map
>>> generic.xml
>>> web2py_ajax.html
>>> generic.html
>>> generic.jsonp
>>> generic.pdf
>>>
>>> controller/
>>> appadmin.py
>>>
>>> static/
>>> css/*
>>> images/*
>>> js/*
>>>
>>> You can do this like that :
>>>
>>> From web2py/applications
>>>
>>> cp -R welcome/static/* YOURAPP/static/
>>> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
>>> cp welcome/views/* test_copy_file/views/
>>>
>>> Watch out the last command will override the layout.html...
>>>
>>>
>>> This listing above is a copy/paste from one of my older post, so it
>>> may not be 100% accurate
>>>
>>> Richard
>>>
>>>
>>> On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck <
>>> mweis...@gmail.com> wrote:
>>>
 I have tried to use the automatic update to 2.15.3
 The following problem occurs:

 Internal error ... Ticked issued:...


 But appadmin is corrupted, so it is not possible to read the ticket
 in a simple way.
 *A restart of web2py solves the problem.*
 *Maybe there should be an extra hint to restart web2py after an
 error message?*

 I looked for some details:

 The error message is:

 type 'exceptions.NameError'> name 'iteritems' is not defined"



 In application/admin/controllers/appadmin.py:

 line 14:

 from gluon._compat import iteritems


 line 453:

 for key, value in iteritems(cache.ram.storage):


 I suppose that without a restart web2py does not find gluon._compat


 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.
 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 

Re: [web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
Here :

https://gist.github.com/BuhtigithuB/7d2f50203145542e0bdedb731be8a152

On Tue, Aug 15, 2017 at 12:18 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Yes all these files from welcome should be updated... Before you must make
> a backup of your app just to make sure it don't break anything...
>
> Richard
>
> On Tue, Aug 15, 2017 at 11:24 AM, Martin Weissenboeck 
> wrote:
>
>> Did you mean ... ?
>>
>> Those files includes :
>>
>> view*s*/
>>
>> appadmin.html
>> generic.ics
>> generic.load
>> generic.rss
>> layout.html
>> generic.json
>> generic.map
>> generic.xml
>> web2py_ajax.html
>> generic.html
>> generic.jsonp
>> generic.pdf
>>
>> controller/
>> appadmin.py
>>
>> static/
>> css/*
>> images/*
>> js/*
>>
>> You can do this like that :
>>
>> From web2py/applications
>>
>> cp -R welcome/static/* YOURAPP/static/
>> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
>> cp *-R* welcome/views/* *YOURAPP*/views/
>>
>> --
>>
>> 2017-08-15 16:55 GMT+02:00 Richard Vézina :
>>
>>> There is mention of it in the book :
>>>
>>> http://web2py.com/books/default/chapter/29/14/other-recipes?
>>> search=upgrade#Upgrading
>>>
>>> On Tue, Aug 15, 2017 at 10:54 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
 Yes, I consider creating a gist too...

 Richard

 On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck <
 mweis...@gmail.com> wrote:

> Thank you - should be mentioned in the book.
>
> 2017-08-15 16:44 GMT+02:00 Richard Vézina  >:
>
>> Always the same issue... I would remove this update button to me...
>> Whe you update web2py you need to update many web2py reserved files in 
>> your
>> app that the web2py update don't do for you...
>>
>> Those files includes :
>>
>> view/
>>
>> appadmin.html
>> generic.ics
>> generic.load
>> generic.rss
>> layout.html
>> generic.json
>> generic.map
>> generic.xml
>> web2py_ajax.html
>> generic.html
>> generic.jsonp
>> generic.pdf
>>
>> controller/
>> appadmin.py
>>
>> static/
>> css/*
>> images/*
>> js/*
>>
>> You can do this like that :
>>
>> From web2py/applications
>>
>> cp -R welcome/static/* YOURAPP/static/
>> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
>> cp welcome/views/* test_copy_file/views/
>>
>> Watch out the last command will override the layout.html...
>>
>>
>> This listing above is a copy/paste from one of my older post, so it
>> may not be 100% accurate
>>
>> Richard
>>
>>
>> On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck <
>> mweis...@gmail.com> wrote:
>>
>>> I have tried to use the automatic update to 2.15.3
>>> The following problem occurs:
>>>
>>> Internal error ... Ticked issued:...
>>>
>>>
>>> But appadmin is corrupted, so it is not possible to read the ticket
>>> in a simple way.
>>> *A restart of web2py solves the problem.*
>>> *Maybe there should be an extra hint to restart web2py after an
>>> error message?*
>>>
>>> I looked for some details:
>>>
>>> The error message is:
>>>
>>> type 'exceptions.NameError'> name 'iteritems' is not defined"
>>>
>>>
>>>
>>> In application/admin/controllers/appadmin.py:
>>>
>>> line 14:
>>>
>>> from gluon._compat import iteritems
>>>
>>>
>>> line 453:
>>>
>>> for key, value in iteritems(cache.ram.storage):
>>>
>>>
>>> I suppose that without a restart web2py does not find gluon._compat
>>>
>>>
>>> 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.
>>> 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.
>>
>
>

Re: [web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
Yes all these files from welcome should be updated... Before you must make
a backup of your app just to make sure it don't break anything...

Richard

On Tue, Aug 15, 2017 at 11:24 AM, Martin Weissenboeck 
wrote:

> Did you mean ... ?
>
> Those files includes :
>
> view*s*/
>
> appadmin.html
> generic.ics
> generic.load
> generic.rss
> layout.html
> generic.json
> generic.map
> generic.xml
> web2py_ajax.html
> generic.html
> generic.jsonp
> generic.pdf
>
> controller/
> appadmin.py
>
> static/
> css/*
> images/*
> js/*
>
> You can do this like that :
>
> From web2py/applications
>
> cp -R welcome/static/* YOURAPP/static/
> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
> cp *-R* welcome/views/* *YOURAPP*/views/
>
> --
>
> 2017-08-15 16:55 GMT+02:00 Richard Vézina :
>
>> There is mention of it in the book :
>>
>> http://web2py.com/books/default/chapter/29/14/other-recipes?
>> search=upgrade#Upgrading
>>
>> On Tue, Aug 15, 2017 at 10:54 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> Yes, I consider creating a gist too...
>>>
>>> Richard
>>>
>>> On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck <
>>> mweis...@gmail.com> wrote:
>>>
 Thank you - should be mentioned in the book.

 2017-08-15 16:44 GMT+02:00 Richard Vézina 
 :

> Always the same issue... I would remove this update button to me...
> Whe you update web2py you need to update many web2py reserved files in 
> your
> app that the web2py update don't do for you...
>
> Those files includes :
>
> view/
>
> appadmin.html
> generic.ics
> generic.load
> generic.rss
> layout.html
> generic.json
> generic.map
> generic.xml
> web2py_ajax.html
> generic.html
> generic.jsonp
> generic.pdf
>
> controller/
> appadmin.py
>
> static/
> css/*
> images/*
> js/*
>
> You can do this like that :
>
> From web2py/applications
>
> cp -R welcome/static/* YOURAPP/static/
> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
> cp welcome/views/* test_copy_file/views/
>
> Watch out the last command will override the layout.html...
>
>
> This listing above is a copy/paste from one of my older post, so it
> may not be 100% accurate
>
> Richard
>
>
> On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck <
> mweis...@gmail.com> wrote:
>
>> I have tried to use the automatic update to 2.15.3
>> The following problem occurs:
>>
>> Internal error ... Ticked issued:...
>>
>>
>> But appadmin is corrupted, so it is not possible to read the ticket
>> in a simple way.
>> *A restart of web2py solves the problem.*
>> *Maybe there should be an extra hint to restart web2py after an error
>> message?*
>>
>> I looked for some details:
>>
>> The error message is:
>>
>> type 'exceptions.NameError'> name 'iteritems' is not defined"
>>
>>
>>
>> In application/admin/controllers/appadmin.py:
>>
>> line 14:
>>
>> from gluon._compat import iteritems
>>
>>
>> line 453:
>>
>> for key, value in iteritems(cache.ram.storage):
>>
>>
>> I suppose that without a restart web2py does not find gluon._compat
>>
>>
>> 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.
>> 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.
>


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

Re: [web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Martin Weissenboeck
Did you mean ... ?

Those files includes :

view*s*/

appadmin.html
generic.ics
generic.load
generic.rss
layout.html
generic.json
generic.map
generic.xml
web2py_ajax.html
generic.html
generic.jsonp
generic.pdf

controller/
appadmin.py

static/
css/*
images/*
js/*

You can do this like that :

>From web2py/applications

cp -R welcome/static/* YOURAPP/static/
cp welcome/controllers/appadmin.py  YOURAPP/controllers/
cp *-R* welcome/views/* *YOURAPP*/views/

--

2017-08-15 16:55 GMT+02:00 Richard Vézina :

> There is mention of it in the book :
>
> http://web2py.com/books/default/chapter/29/14/other-
> recipes?search=upgrade#Upgrading
>
> On Tue, Aug 15, 2017 at 10:54 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Yes, I consider creating a gist too...
>>
>> Richard
>>
>> On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck > > wrote:
>>
>>> Thank you - should be mentioned in the book.
>>>
>>> 2017-08-15 16:44 GMT+02:00 Richard Vézina :
>>>
 Always the same issue... I would remove this update button to me... Whe
 you update web2py you need to update many web2py reserved files in your app
 that the web2py update don't do for you...

 Those files includes :

 view/

 appadmin.html
 generic.ics
 generic.load
 generic.rss
 layout.html
 generic.json
 generic.map
 generic.xml
 web2py_ajax.html
 generic.html
 generic.jsonp
 generic.pdf

 controller/
 appadmin.py

 static/
 css/*
 images/*
 js/*

 You can do this like that :

 From web2py/applications

 cp -R welcome/static/* YOURAPP/static/
 cp welcome/controllers/appadmin.py  YOURAPP/controllers/
 cp welcome/views/* test_copy_file/views/

 Watch out the last command will override the layout.html...


 This listing above is a copy/paste from one of my older post, so it may
 not be 100% accurate

 Richard


 On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck <
 mweis...@gmail.com> wrote:

> I have tried to use the automatic update to 2.15.3
> The following problem occurs:
>
> Internal error ... Ticked issued:...
>
>
> But appadmin is corrupted, so it is not possible to read the ticket in
> a simple way.
> *A restart of web2py solves the problem.*
> *Maybe there should be an extra hint to restart web2py after an error
> message?*
>
> I looked for some details:
>
> The error message is:
>
> type 'exceptions.NameError'> name 'iteritems' is not defined"
>
>
>
> In application/admin/controllers/appadmin.py:
>
> line 14:
>
> from gluon._compat import iteritems
>
>
> line 453:
>
> for key, value in iteritems(cache.ram.storage):
>
>
> I suppose that without a restart web2py does not find gluon._compat
>
>
> 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.
> 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.

>>>
>>>
>>> --
>>> 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.
>>>
>>
>>
> --
> 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 

[web2py] Admin UI - Error ticket less information in the latest web2py releases

2017-08-15 Thread Paolo Caruccio
Hello everyone.

In a view, I have a trivial NameError: name 'fattura' is not defined due to

{{for ft in fatture:}}
{{=fattura.id}}
{{pass}}

But the Error Ticket returned by web2py is different depending on the 
development environment.

*Case 1 (best)*
SO: windows 8
Web2py: Version 2.14.6-stable + timestamp.2016.05.10.00.21.47
Python: Python 2.7.13




*Case 2*
SO: windows 8
Web2py: Version 2.15.3-stable + timestamp.2017.08.07.12.51.45
Python: Python 2.7.13
*Filename missing*




*Case 3*
SO: Linux MInt 8.2
Web2py: Version 2.15.3-stable + timestamp.2017.08.07.12.51.45
Python: Python 2.7.12
*The same as the case 2 but also Error snapshot and Python version are 
missing. *




*Case 4 (worse)*
SO: Linux MInt 8.2
Web2py: Version 2.15.3-stable + timestamp.2017.08.07.12.51.45
Python: Python 3.6.2
*Python version, reference to filename and line are missing. New exception 
occurred.*





Has anyone ever encountered this problem? How did he solve it?

Thank you.

-- 
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] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
web2py does not upgrade any file in your applications. Some important parts
of the framework are not part of the libraries, but part of the Welcome
app. New apps will inherit these framework changes, but not existing apps.
You need to do copy or merge changes manually. Sometimes this is necessary
to take advantage of new functionality, and sometimes it is necessary for
compatibility with new releases, particularly if you are using experimental
features. The web2py group at Google Groups is a good way to keep track of
necessary changes. Parts of the welcome app to copy to existing apps are
the appadmin controller, the top-level views including appadmin.html and
the generic views, and the contents of the static folder which contains the
latest version of important javascript files. Obviously you need to merge
your changes (if any). Keeping backups or using a version control system is
a sound idea.

On Tue, Aug 15, 2017 at 10:55 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> There is mention of it in the book :
>
> http://web2py.com/books/default/chapter/29/14/other-
> recipes?search=upgrade#Upgrading
>
> On Tue, Aug 15, 2017 at 10:54 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Yes, I consider creating a gist too...
>>
>> Richard
>>
>> On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck > > wrote:
>>
>>> Thank you - should be mentioned in the book.
>>>
>>> 2017-08-15 16:44 GMT+02:00 Richard Vézina :
>>>
 Always the same issue... I would remove this update button to me... Whe
 you update web2py you need to update many web2py reserved files in your app
 that the web2py update don't do for you...

 Those files includes :

 view/

 appadmin.html
 generic.ics
 generic.load
 generic.rss
 layout.html
 generic.json
 generic.map
 generic.xml
 web2py_ajax.html
 generic.html
 generic.jsonp
 generic.pdf

 controller/
 appadmin.py

 static/
 css/*
 images/*
 js/*

 You can do this like that :

 From web2py/applications

 cp -R welcome/static/* YOURAPP/static/
 cp welcome/controllers/appadmin.py  YOURAPP/controllers/
 cp welcome/views/* test_copy_file/views/

 Watch out the last command will override the layout.html...


 This listing above is a copy/paste from one of my older post, so it may
 not be 100% accurate

 Richard


 On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck <
 mweis...@gmail.com> wrote:

> I have tried to use the automatic update to 2.15.3
> The following problem occurs:
>
> Internal error ... Ticked issued:...
>
>
> But appadmin is corrupted, so it is not possible to read the ticket in
> a simple way.
> *A restart of web2py solves the problem.*
> *Maybe there should be an extra hint to restart web2py after an error
> message?*
>
> I looked for some details:
>
> The error message is:
>
> type 'exceptions.NameError'> name 'iteritems' is not defined"
>
>
>
> In application/admin/controllers/appadmin.py:
>
> line 14:
>
> from gluon._compat import iteritems
>
>
> line 453:
>
> for key, value in iteritems(cache.ram.storage):
>
>
> I suppose that without a restart web2py does not find gluon._compat
>
>
> 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.
> 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.

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

Re: [web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
There is mention of it in the book :

http://web2py.com/books/default/chapter/29/14/other-recipes?search=upgrade#Upgrading

On Tue, Aug 15, 2017 at 10:54 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Yes, I consider creating a gist too...
>
> Richard
>
> On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck 
> wrote:
>
>> Thank you - should be mentioned in the book.
>>
>> 2017-08-15 16:44 GMT+02:00 Richard Vézina :
>>
>>> Always the same issue... I would remove this update button to me... Whe
>>> you update web2py you need to update many web2py reserved files in your app
>>> that the web2py update don't do for you...
>>>
>>> Those files includes :
>>>
>>> view/
>>>
>>> appadmin.html
>>> generic.ics
>>> generic.load
>>> generic.rss
>>> layout.html
>>> generic.json
>>> generic.map
>>> generic.xml
>>> web2py_ajax.html
>>> generic.html
>>> generic.jsonp
>>> generic.pdf
>>>
>>> controller/
>>> appadmin.py
>>>
>>> static/
>>> css/*
>>> images/*
>>> js/*
>>>
>>> You can do this like that :
>>>
>>> From web2py/applications
>>>
>>> cp -R welcome/static/* YOURAPP/static/
>>> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
>>> cp welcome/views/* test_copy_file/views/
>>>
>>> Watch out the last command will override the layout.html...
>>>
>>>
>>> This listing above is a copy/paste from one of my older post, so it may
>>> not be 100% accurate
>>>
>>> Richard
>>>
>>>
>>> On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck >> > wrote:
>>>
 I have tried to use the automatic update to 2.15.3
 The following problem occurs:

 Internal error ... Ticked issued:...


 But appadmin is corrupted, so it is not possible to read the ticket in
 a simple way.
 *A restart of web2py solves the problem.*
 *Maybe there should be an extra hint to restart web2py after an error
 message?*

 I looked for some details:

 The error message is:

 type 'exceptions.NameError'> name 'iteritems' is not defined"



 In application/admin/controllers/appadmin.py:

 line 14:

 from gluon._compat import iteritems


 line 453:

 for key, value in iteritems(cache.ram.storage):


 I suppose that without a restart web2py does not find gluon._compat


 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.
 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.
>>>
>>
>>
>> --
>> 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.
>>
>
>

-- 
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] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
Yes, I consider creating a gist too...

Richard

On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck 
wrote:

> Thank you - should be mentioned in the book.
>
> 2017-08-15 16:44 GMT+02:00 Richard Vézina :
>
>> Always the same issue... I would remove this update button to me... Whe
>> you update web2py you need to update many web2py reserved files in your app
>> that the web2py update don't do for you...
>>
>> Those files includes :
>>
>> view/
>>
>> appadmin.html
>> generic.ics
>> generic.load
>> generic.rss
>> layout.html
>> generic.json
>> generic.map
>> generic.xml
>> web2py_ajax.html
>> generic.html
>> generic.jsonp
>> generic.pdf
>>
>> controller/
>> appadmin.py
>>
>> static/
>> css/*
>> images/*
>> js/*
>>
>> You can do this like that :
>>
>> From web2py/applications
>>
>> cp -R welcome/static/* YOURAPP/static/
>> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
>> cp welcome/views/* test_copy_file/views/
>>
>> Watch out the last command will override the layout.html...
>>
>>
>> This listing above is a copy/paste from one of my older post, so it may
>> not be 100% accurate
>>
>> Richard
>>
>>
>> On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck 
>> wrote:
>>
>>> I have tried to use the automatic update to 2.15.3
>>> The following problem occurs:
>>>
>>> Internal error ... Ticked issued:...
>>>
>>>
>>> But appadmin is corrupted, so it is not possible to read the ticket in a
>>> simple way.
>>> *A restart of web2py solves the problem.*
>>> *Maybe there should be an extra hint to restart web2py after an error
>>> message?*
>>>
>>> I looked for some details:
>>>
>>> The error message is:
>>>
>>> type 'exceptions.NameError'> name 'iteritems' is not defined"
>>>
>>>
>>>
>>> In application/admin/controllers/appadmin.py:
>>>
>>> line 14:
>>>
>>> from gluon._compat import iteritems
>>>
>>>
>>> line 453:
>>>
>>> for key, value in iteritems(cache.ram.storage):
>>>
>>>
>>> I suppose that without a restart web2py does not find gluon._compat
>>>
>>>
>>> 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.
>>> 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.
>>
>
>
> --
> 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.
>

-- 
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] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Martin Weissenboeck
Thank you - should be mentioned in the book.

2017-08-15 16:44 GMT+02:00 Richard Vézina :

> Always the same issue... I would remove this update button to me... Whe
> you update web2py you need to update many web2py reserved files in your app
> that the web2py update don't do for you...
>
> Those files includes :
>
> view/
>
> appadmin.html
> generic.ics
> generic.load
> generic.rss
> layout.html
> generic.json
> generic.map
> generic.xml
> web2py_ajax.html
> generic.html
> generic.jsonp
> generic.pdf
>
> controller/
> appadmin.py
>
> static/
> css/*
> images/*
> js/*
>
> You can do this like that :
>
> From web2py/applications
>
> cp -R welcome/static/* YOURAPP/static/
> cp welcome/controllers/appadmin.py  YOURAPP/controllers/
> cp welcome/views/* test_copy_file/views/
>
> Watch out the last command will override the layout.html...
>
>
> This listing above is a copy/paste from one of my older post, so it may
> not be 100% accurate
>
> Richard
>
>
> On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck 
> wrote:
>
>> I have tried to use the automatic update to 2.15.3
>> The following problem occurs:
>>
>> Internal error ... Ticked issued:...
>>
>>
>> But appadmin is corrupted, so it is not possible to read the ticket in a
>> simple way.
>> *A restart of web2py solves the problem.*
>> *Maybe there should be an extra hint to restart web2py after an error
>> message?*
>>
>> I looked for some details:
>>
>> The error message is:
>>
>> type 'exceptions.NameError'> name 'iteritems' is not defined"
>>
>>
>>
>> In application/admin/controllers/appadmin.py:
>>
>> line 14:
>>
>> from gluon._compat import iteritems
>>
>>
>> line 453:
>>
>> for key, value in iteritems(cache.ram.storage):
>>
>>
>> I suppose that without a restart web2py does not find gluon._compat
>>
>>
>> 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.
>> 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.
>

-- 
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] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Richard Vézina
Always the same issue... I would remove this update button to me... Whe you
update web2py you need to update many web2py reserved files in your app
that the web2py update don't do for you...

Those files includes :

view/

appadmin.html
generic.ics
generic.load
generic.rss
layout.html
generic.json
generic.map
generic.xml
web2py_ajax.html
generic.html
generic.jsonp
generic.pdf

controller/
appadmin.py

static/
css/*
images/*
js/*

You can do this like that :

>From web2py/applications

cp -R welcome/static/* YOURAPP/static/
cp welcome/controllers/appadmin.py  YOURAPP/controllers/
cp welcome/views/* test_copy_file/views/

Watch out the last command will override the layout.html...


This listing above is a copy/paste from one of my older post, so it may not
be 100% accurate

Richard


On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck 
wrote:

> I have tried to use the automatic update to 2.15.3
> The following problem occurs:
>
> Internal error ... Ticked issued:...
>
>
> But appadmin is corrupted, so it is not possible to read the ticket in a
> simple way.
> *A restart of web2py solves the problem.*
> *Maybe there should be an extra hint to restart web2py after an error
> message?*
>
> I looked for some details:
>
> The error message is:
>
> type 'exceptions.NameError'> name 'iteritems' is not defined"
>
>
>
> In application/admin/controllers/appadmin.py:
>
> line 14:
>
> from gluon._compat import iteritems
>
>
> line 453:
>
> for key, value in iteritems(cache.ram.storage):
>
>
> I suppose that without a restart web2py does not find gluon._compat
>
>
> 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.
> 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.


{Disarmed} [web2py] Re: custom filter in grid

2017-08-15 Thread Carlos Cesar Caballero Díaz

Thanks Leonel, I will go with this.


Greetings.


El 14/08/17 a las 11:34, Leonel Câmara escribió:
Here's one way to do it. Note that when I start having this kind of 
problems I usually stop using the grid and make a custom solution.
In the grid, the searchable argument, can be a function. In that case 
it gets the fields and keywords and its responsibility is to generate 
and return a query. You can disable advanced_search and then only have 
a search field. Then you will have a searchable function which will 
detect if one of the keywords entered in the search is a date, if that 
is the case then you will make a query where only records from that 
date are acceptable.


Your controller function would be something like this:

|
defmygrid():
importdatetime


defsearchable(fields,keywords):
query =db.my_table.id >0:
forkeyword inkeywords:
date =None
try:
date =datetime.datetime.strptime(keyword,'%Y-%m-%d')
exceptValueError:
pass
ifdate:
query &=db.my_table.created_on ==date
else:
# this is just an example
query &=db.my_table.name.like('%'+keyword 
+'%',case_sensitive=False)

returnquery


return{'grid':SQLFORM.grid(db.my_table,searchable=searchable,advanced_search=False)}
|


--
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 *MailScanner ha detectado un intento de fraude 
en la siguiente p�gina web "groups.google.com". /No/ conf�e en esta 
p�gina web:* 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] Re: Scheduler in systemd environment (running very long tasks)

2017-08-15 Thread Mirek Zvolský
Hi Zbigniew and Niphlod.

I have same/similar traceback when the task will timeout, in my case in 2h:

File "/home/www-data/web2py/gluon/scheduler.py", line 720, in 
signal.signal(signal.SIGTERM, lambda signum, stack_frame: sys.exit(1))
SystemExit: 1

scheduler_run.stop_time is scheduler.start_time + 2h, so I think, this is 
standard quitting for timeout.

But I have another problem (and this is reason why the timeout is gone):
My task restarts again and again in about 10mins. It think I will ask in 
separate thread.

Debian9+nginx+uwsgi+postgres+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/d/optout.


Re: [web2py] pycharm and web2py - setup project

2017-08-15 Thread Richard Vézina
Ok, I confirm, I did have to install pyDAL too in order to allow
autocompletion of db.define_table...

I use to test in controller and it was working with request... Not sure
why...

I guess this is cause by the fact that pyDAL is a external product since
sometimes and PyCharm didn't address this change...

Richard

On Mon, Aug 14, 2017 at 4:51 PM, Kirill Shatalaev 
wrote:

> Richard, as you can see at 2:20, parameter info is NOT working (indexing
> is finished, view->parameter info or ctrl+p is not working too)
> After that I've added pyDAL package (2:43)
> And ONLY then it starting to work, yes (3:26).
>
> Pycharm is professional version, 2017.2.1
>
> понедельник, 14 августа 2017 г., 17:21:45 UTC+4 пользователь Richard
> написал:
>>
>> hmm... I don't understand why you say it not working... Once the pycharm
>> indexing end, at the end of your vid you have autocomplete working no???
>>
>> I do have last pycharm version
>>
>> PyCharm 2017.2
>> Build *#PY-172.3317.103*, built on July 25, 2017
>> JRE: 1.8.0_152-release-915-b5 amd64
>> JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
>> Linux 4.4.0-89-generic
>>
>> Richard
>>
>> On Mon, Aug 14, 2017 at 5:11 AM, Kirill Shatalaev 
>> wrote:
>>
>>> Richard, how did you do that?
>>>
>>> This is my scrincast on a clean installation and without any virtual
>>> environment. Does not work.
>>>
>>> https://youtu.be/51mmwUSJ_VM
>>>
>>>
>>> пятница, 11 августа 2017 г., 17:57:46 UTC+4 пользователь Richard написал:

 Kirill, I just try to create a new project and the autocompletion was
 working, so I guess the issue is limited to virtual environement...


 --
>>> 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.
>

-- 
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: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-15 Thread Rahul Dhakate
Hi Jim,
 I have overridden a lot of default web2py stuff and used my own
instead. Just wanted to have it work my way but I wouldn't mind using
web2py decorators in future projects. Yes I am looking for such patterns
but so far there isn't anything I found causing this.

Thanks,

Rahul.


On Aug 15, 2017 17:25, "Jim Steil"  wrote:

I don't know if it has anything to do with the problem, but am curious why
you have your checksession() function and don't use the web2py decorators
for ensuring a user is logged in.

http://web2py.com/books/default/chapter/29/09/access-control#Decorators

Is there a common use pattern in the 20+ failing functions that isn't used
in the functions that are still working?

-Jim


On Tue, Aug 15, 2017 at 6:48 AM, Rahul Dhakate 
wrote:

> Hi Anthony,
>  Thanks for getting back. No changes were made that would break
> the system so badly.
> And although today I did copy the single project on the same machine but
> with a newly setup web2py 2.15.3.
> I will try using this project on another machine by configuring it from
> scratch.
>
> Does using routes do any magic to web2py or its app by copying/changing
> any file for routes as 404 is a strange error to get. Again there was a
> plugin called like hot table or something which I had installed online from
> plugin links and later removed it suspecting it might be the culprit but to
> no avail.
>
> Thanks,
>
> Rahul.
>
> ===
>
> On Aug 15, 2017 17:02, "Anthony"  wrote:
>
> If you've removed the routes files and restarted the server and still have
> problems, it's not clear what would be causing some but not all of your
> URLs to stop working, assuming you've made no other changes to the system.
> You may need to set up everything from scratch. Do you have another machine
> you could try?
>
> Also, if you just want to set up a particular application (and controller
> and function) as defaults, it is much simply to use the parameter-based
> rewrite system.
>
> Anthony
>
>
> On Tuesday, August 15, 2017 at 4:50:37 AM UTC-4, Rahul wrote:
>>
>> Hi Anthony, Jim,
>>   The application is not compiled. I was trying to use routes
>> files attached (applevel and web2py level) which I removed completely and
>> still the error persists. They are not even in the application directory. I
>> do think that before using the routes the application was working fine.
>>
>> Here is the code for one function. There are multiple functions failing
>> almost 20+ which were all working flawlessly before. No changes done to
>> these.
>>
>> Function in default.py controller
>> def cat_grid():
>> # Security Check: Checks for a valid session
>> checksession()
>> ## New Category Grid 
>> db.cat.id.readable=False
>> ### Query
>> query = db((db.cat.workspace == user_workspace))
>>
>> fields = (db.cat.categories, db.cat.workspace, )
>> headers = {'cat.catagories' : 'Category Name',
>>'cat.workspace' : 'Workspace',
>>
>>}
>> default_sort_order = [~db.cat.categories ]
>>
>> links = [
>>  lambda row: A(SPAN(_class='icon magnifier'),'View',_class='btn
>> btn-small btn-default', _title='View Record',_href=URL("default","v
>> iew_cat",args=[row.id])),
>>  lambda row: A(SPAN(_class='icon downarrow'),'Update',_class=
>> 'btn btn-small btn-default', _title='Update Record',_href=URL("default",
>> "update_cat",args=[row.id])),
>>  lambda row: A(SPAN(_class='icon downarrow'),'Delete',_class=
>> 'btn btn-small btn-danger', _title='Delete Record',_href=URL("default","d
>> elete_cat",args=[row.id])),
>>  ]
>> catgrid = SQLFORM.grid( query=query, fields=fields, headers=headers,
>>  orderby=default_sort_order, user_signature=False, searchable=True,
>> sorter_icons=(XML(''), XML('')),
>>  create=False, deletable=False, editable=False,
>>  csv=True, maxtextlength=64, paginate=10 ,ui='jquery-ui', links=links,
>>  details=False)
>>
>> #form category
>> form_cat=SQLFORM(db.cat, submit_button='Save Category')
>> if form_cat.accepts(request.vars,session):
>> response.flash='New Category Added'
>> elif form_cat.errors:
>> response.flash='Form has errors'
>> else: pass
>>
>> return dict(catgrid=catgrid, form_cat=form_cat)
>>
>>
>> Checksession only checks for basic session validity and redirects the
>> user to a certain url.
>> def checksession():
>>
>> if(logged_in_user==None):
>> redirect(URL(r=request, f='login'))
>> #print "Errors! No sesions defined."
>> else:
>> pass
>>
>> View is simple cat_grid.html in this case and is available
>> in views\default\ folder
>>
>> {{extend 'layout.html'}}
>>
>>
>> 
>>
>> 
>> 
>> 
>> 
>>  Category
>> List
>> 

Re: [web2py] Re: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-15 Thread Jim Steil
I don't know if it has anything to do with the problem, but am curious why
you have your checksession() function and don't use the web2py decorators
for ensuring a user is logged in.

http://web2py.com/books/default/chapter/29/09/access-control#Decorators

Is there a common use pattern in the 20+ failing functions that isn't used
in the functions that are still working?

-Jim


On Tue, Aug 15, 2017 at 6:48 AM, Rahul Dhakate 
wrote:

> Hi Anthony,
>  Thanks for getting back. No changes were made that would break
> the system so badly.
> And although today I did copy the single project on the same machine but
> with a newly setup web2py 2.15.3.
> I will try using this project on another machine by configuring it from
> scratch.
>
> Does using routes do any magic to web2py or its app by copying/changing
> any file for routes as 404 is a strange error to get. Again there was a
> plugin called like hot table or something which I had installed online from
> plugin links and later removed it suspecting it might be the culprit but to
> no avail.
>
> Thanks,
>
> Rahul.
>
> ===
>
> On Aug 15, 2017 17:02, "Anthony"  wrote:
>
> If you've removed the routes files and restarted the server and still have
> problems, it's not clear what would be causing some but not all of your
> URLs to stop working, assuming you've made no other changes to the system.
> You may need to set up everything from scratch. Do you have another machine
> you could try?
>
> Also, if you just want to set up a particular application (and controller
> and function) as defaults, it is much simply to use the parameter-based
> rewrite system.
>
> Anthony
>
>
> On Tuesday, August 15, 2017 at 4:50:37 AM UTC-4, Rahul wrote:
>>
>> Hi Anthony, Jim,
>>   The application is not compiled. I was trying to use routes
>> files attached (applevel and web2py level) which I removed completely and
>> still the error persists. They are not even in the application directory. I
>> do think that before using the routes the application was working fine.
>>
>> Here is the code for one function. There are multiple functions failing
>> almost 20+ which were all working flawlessly before. No changes done to
>> these.
>>
>> Function in default.py controller
>> def cat_grid():
>> # Security Check: Checks for a valid session
>> checksession()
>> ## New Category Grid 
>> db.cat.id.readable=False
>> ### Query
>> query = db((db.cat.workspace == user_workspace))
>>
>> fields = (db.cat.categories, db.cat.workspace, )
>> headers = {'cat.catagories' : 'Category Name',
>>'cat.workspace' : 'Workspace',
>>
>>}
>> default_sort_order = [~db.cat.categories ]
>>
>> links = [
>>  lambda row: A(SPAN(_class='icon magnifier'),'View',_class='btn
>> btn-small btn-default', _title='View Record',_href=URL("default","v
>> iew_cat",args=[row.id])),
>>  lambda row: A(SPAN(_class='icon downarrow'),'Update',_class=
>> 'btn btn-small btn-default', _title='Update Record',_href=URL("default",
>> "update_cat",args=[row.id])),
>>  lambda row: A(SPAN(_class='icon downarrow'),'Delete',_class=
>> 'btn btn-small btn-danger', _title='Delete Record',_href=URL("default","d
>> elete_cat",args=[row.id])),
>>  ]
>> catgrid = SQLFORM.grid( query=query, fields=fields, headers=headers,
>>  orderby=default_sort_order, user_signature=False, searchable=True,
>> sorter_icons=(XML(''), XML('')),
>>  create=False, deletable=False, editable=False,
>>  csv=True, maxtextlength=64, paginate=10 ,ui='jquery-ui', links=links,
>>  details=False)
>>
>> #form category
>> form_cat=SQLFORM(db.cat, submit_button='Save Category')
>> if form_cat.accepts(request.vars,session):
>> response.flash='New Category Added'
>> elif form_cat.errors:
>> response.flash='Form has errors'
>> else: pass
>>
>> return dict(catgrid=catgrid, form_cat=form_cat)
>>
>>
>> Checksession only checks for basic session validity and redirects the
>> user to a certain url.
>> def checksession():
>>
>> if(logged_in_user==None):
>> redirect(URL(r=request, f='login'))
>> #print "Errors! No sesions defined."
>> else:
>> pass
>>
>> View is simple cat_grid.html in this case and is available
>> in views\default\ folder
>>
>> {{extend 'layout.html'}}
>>
>>
>> 
>>
>> 
>> 
>> 
>> 
>>  Category
>> List
>> 
>> 
>> 
>> Actions
>> 
>> 
>> > role="menu">
>> > href="{{=URL('Target','default', 

Re: [web2py] Re: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-15 Thread Rahul Dhakate
Hi Anthony,
 Thanks for getting back. No changes were made that would break the
system so badly.
And although today I did copy the single project on the same machine but
with a newly setup web2py 2.15.3.
I will try using this project on another machine by configuring it from
scratch.

Does using routes do any magic to web2py or its app by copying/changing any
file for routes as 404 is a strange error to get. Again there was a plugin
called like hot table or something which I had installed online from plugin
links and later removed it suspecting it might be the culprit but to no
avail.

Thanks,

Rahul.

===
On Aug 15, 2017 17:02, "Anthony"  wrote:

If you've removed the routes files and restarted the server and still have
problems, it's not clear what would be causing some but not all of your
URLs to stop working, assuming you've made no other changes to the system.
You may need to set up everything from scratch. Do you have another machine
you could try?

Also, if you just want to set up a particular application (and controller
and function) as defaults, it is much simply to use the parameter-based
rewrite system.

Anthony


On Tuesday, August 15, 2017 at 4:50:37 AM UTC-4, Rahul wrote:
>
> Hi Anthony, Jim,
>   The application is not compiled. I was trying to use routes
> files attached (applevel and web2py level) which I removed completely and
> still the error persists. They are not even in the application directory. I
> do think that before using the routes the application was working fine.
>
> Here is the code for one function. There are multiple functions failing
> almost 20+ which were all working flawlessly before. No changes done to
> these.
>
> Function in default.py controller
> def cat_grid():
> # Security Check: Checks for a valid session
> checksession()
> ## New Category Grid 
> db.cat.id.readable=False
> ### Query
> query = db((db.cat.workspace == user_workspace))
>
> fields = (db.cat.categories, db.cat.workspace, )
> headers = {'cat.catagories' : 'Category Name',
>'cat.workspace' : 'Workspace',
>}
> default_sort_order = [~db.cat.categories ]
>
> links = [
>  lambda row: A(SPAN(_class='icon magnifier'),'View',_class='btn
> btn-small btn-default', _title='View Record',_href=URL("default","v
> iew_cat",args=[row.id])),
>  lambda row: A(SPAN(_class='icon downarrow'),'Update',_class=
> 'btn btn-small btn-default', _title='Update Record',_href=URL("default","u
> pdate_cat",args=[row.id])),
>  lambda row: A(SPAN(_class='icon downarrow'),'Delete',_class=
> 'btn btn-small btn-danger', _title='Delete Record',_href=URL("default","d
> elete_cat",args=[row.id])),
>  ]
> catgrid = SQLFORM.grid( query=query, fields=fields, headers=headers,
> orderby=default_sort_order, user_signature=False, searchable=True,
> sorter_icons=(XML(''), XML('')),
>  create=False, deletable=False, editable=False,
>  csv=True, maxtextlength=64, paginate=10 ,ui='jquery-ui', links=links,
>  details=False)
>
> #form category
> form_cat=SQLFORM(db.cat, submit_button='Save Category')
> if form_cat.accepts(request.vars,session):
> response.flash='New Category Added'
> elif form_cat.errors:
> response.flash='Form has errors'
> else: pass
>
> return dict(catgrid=catgrid, form_cat=form_cat)
>
>
> Checksession only checks for basic session validity and redirects the user
> to a certain url.
> def checksession():
>
> if(logged_in_user==None):
> redirect(URL(r=request, f='login'))
> #print "Errors! No sesions defined."
> else:
> pass
>
> View is simple cat_grid.html in this case and is available
> in views\default\ folder
>
> {{extend 'layout.html'}}
>
>
> 
>
> 
> 
> 
> 
>  Category List
> 
> 
> 
> Actions
> 
> 
>  role="menu">
>  href="{{=URL('Target','default', 'configure_target')}}">Back
> 
>
> 
>
> 
>
> 
>
> 
>
> 
> 
> 
> Category List
> New Category
> 
> 
> 
> 
> 
> {{=catgrid}}
> 
>
>
> 
> 
>  {{=form_cat}}
> 
>
>   {{pass}}
>   {{pass}}   
> 
>
>
>  
>
>   
>
>
> 
>
> 
>
>
>
> Note: I even uninstalled and updated my python version 2.7.13 (latest
> 2.7.x version). Also now I have just tried with 

[web2py] Re: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-15 Thread Anthony
If you've removed the routes files and restarted the server and still have 
problems, it's not clear what would be causing some but not all of your 
URLs to stop working, assuming you've made no other changes to the system. 
You may need to set up everything from scratch. Do you have another machine 
you could try?

Also, if you just want to set up a particular application (and controller 
and function) as defaults, it is much simply to use the parameter-based 
rewrite system.

Anthony

On Tuesday, August 15, 2017 at 4:50:37 AM UTC-4, Rahul wrote:
>
> Hi Anthony, Jim,
>   The application is not compiled. I was trying to use routes 
> files attached (applevel and web2py level) which I removed completely and 
> still the error persists. They are not even in the application directory. I 
> do think that before using the routes the application was working fine. 
>
> Here is the code for one function. There are multiple functions failing 
> almost 20+ which were all working flawlessly before. No changes done to 
> these. 
>
> Function in default.py controller
> def cat_grid():
> # Security Check: Checks for a valid session
> checksession()
> ## New Category Grid 
> db.cat.id.readable=False
> ### Query 
> query = db((db.cat.workspace == user_workspace))  
> 
> fields = (db.cat.categories, db.cat.workspace, )
> headers = {'cat.catagories' : 'Category Name',   
>'cat.workspace' : 'Workspace', 
>}
> default_sort_order = [~db.cat.categories ] 
> 
> links = [
>  lambda row: A(SPAN(_class='icon magnifier'),'View',_class='btn 
> btn-small btn-default', _title='View Record',_href=URL("default",
> "view_cat",args=[row.id])),
>  lambda row: A(SPAN(_class='icon downarrow'),'Update',_class='btn 
> btn-small btn-default', _title='Update Record',_href=URL("default",
> "update_cat",args=[row.id])),
>  lambda row: A(SPAN(_class='icon downarrow'),'Delete',_class='btn 
> btn-small btn-danger', _title='Delete Record',_href=URL("default",
> "delete_cat",args=[row.id])),  
>  ]
> catgrid = SQLFORM.grid( query=query, fields=fields, headers=headers,  
> orderby=default_sort_order, user_signature=False, searchable=True, 
> sorter_icons=(XML(''), XML('')),
>  create=False, deletable=False, editable=False, 
>  csv=True, maxtextlength=64, paginate=10 ,ui='jquery-ui', links=links, 
>  details=False)   
> 
> #form category
> form_cat=SQLFORM(db.cat, submit_button='Save Category')
> if form_cat.accepts(request.vars,session):
> response.flash='New Category Added'
> elif form_cat.errors:
> response.flash='Form has errors'
> else: pass
> 
> return dict(catgrid=catgrid, form_cat=form_cat) 
>
>
> Checksession only checks for basic session validity and redirects the user 
> to a certain url. 
> def checksession():
>
> if(logged_in_user==None):
> redirect(URL(r=request, f='login'))
> #print "Errors! No sesions defined."
> else: 
> pass
>
> View is simple cat_grid.html in this case and is available 
> in views\default\ folder
>
> {{extend 'layout.html'}} 
>
>
> 
> 
> 
> 
> 
> 
>  Category List
> 
> 
> 
> Actions
> 
> 
>  role="menu">
>  href="{{=URL('Target','default', 'configure_target')}}">Back
> 
>
>  
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Category List 
> New Category
> 
> 
> 
> 
> 
> {{=catgrid}} 
>
>  
> 
> 
> 
>  {{=form_cat}}
>  
> 
>   {{pass}}
>   {{pass}}  
> 
> 
> 
>  
>
>   
> 
>
> 
>
> 
>
>
>
> Note: I even uninstalled and updated my python version 2.7.13 (latest 
> 2.7.x version). Also now I have just tried with latest web2py version 
> 2.15.3. IE11 cache cleared. Same results on chrome. Let me know what might 
> have gone wrong. 
>
> Thanks, 
>
> Rahul 
>
>
> On Monday, August 14, 2017 at 8:11:22 PM UTC+5:30, Anthony wrote:
>>
>> Has the app been compiled? What 

[web2py] Re: Changes with Postgis API with 2.15.2 (st_as_geojson() not working anymore)??

2017-08-15 Thread Leonel Câmara
Please submit a bug on pydal  this is a 
bug.

-- 
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: python 3 web2py2.15.3 url lib has no get proxies

2017-08-15 Thread Leonel Câmara
Please submit an issue in github so we can track this, we need to 
use urllib.request.getproxies() for python 3.

-- 
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: posibility to disable the mobile admin interface

2017-08-15 Thread Paolo Caruccio
Why is it not compatible?
Have you already asked for help from this group?


Il giorno martedì 15 agosto 2017 09:41:23 UTC+2, Vic Ding ha scritto:
>
> Thanks, Paolo. I'll try this after I revert to old version. The component 
> I use to mimic excel for user input is not compatible with new version :(
>
> On Tuesday, August 15, 2017 at 12:40:29 AM UTC+2, Paolo Caruccio wrote:
>>
>> My known way.
>>
>> In the "web2py/applications/admin/controllers/default.py" file at line 
>> nr.3 set EXPERIMENTAL_STUFF to False
>>
>> You must apply the above change every time you update web2py.
>>
>>
>> Il giorno lunedì 14 agosto 2017 12:50:39 UTC+2, Vic Ding ha scritto:
>>>
>>> I know this is pretty old post, but is there a way to do so? Thanks!
>>>
>>> On Tuesday, November 22, 2016 at 10:30:24 AM UTC+1, Oli wrote:

 is there a posibility to disable the mobile interface? there is only a 
 white screen on pythonanywhere.com with web2py version 2.14.6 .
>>>
>>>

-- 
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: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-15 Thread Rahul
Hi Anthony, Jim,
  The application is not compiled. I was trying to use routes files 
attached (applevel and web2py level) which I removed completely and still 
the error persists. They are not even in the application directory. I do 
think that before using the routes the application was working fine. 

Here is the code for one function. There are multiple functions failing 
almost 20+ which were all working flawlessly before. No changes done to 
these. 

Function in default.py controller
def cat_grid():
# Security Check: Checks for a valid session
checksession()
## New Category Grid 
db.cat.id.readable=False
### Query 
query = db((db.cat.workspace == user_workspace))  

fields = (db.cat.categories, db.cat.workspace, )
headers = {'cat.catagories' : 'Category Name',   
   'cat.workspace' : 'Workspace', 
   }
default_sort_order = [~db.cat.categories ] 

links = [
 lambda row: A(SPAN(_class='icon magnifier'),'View',_class='btn 
btn-small btn-default', _title='View Record',_href=URL("default","view_cat",
args=[row.id])),
 lambda row: A(SPAN(_class='icon downarrow'),'Update',_class='btn 
btn-small btn-default', _title='Update Record',_href=URL("default",
"update_cat",args=[row.id])),
 lambda row: A(SPAN(_class='icon downarrow'),'Delete',_class='btn 
btn-small btn-danger', _title='Delete Record',_href=URL("default",
"delete_cat",args=[row.id])),  
 ]
catgrid = SQLFORM.grid( query=query, fields=fields, headers=headers,  
orderby=default_sort_order, user_signature=False, searchable=True, 
sorter_icons=(XML(''), XML('')),
 create=False, deletable=False, editable=False,  csv
=True, maxtextlength=64, paginate=10 ,ui='jquery-ui', links=links, 
 details=False)   

#form category
form_cat=SQLFORM(db.cat, submit_button='Save Category')
if form_cat.accepts(request.vars,session):
response.flash='New Category Added'
elif form_cat.errors:
response.flash='Form has errors'
else: pass

return dict(catgrid=catgrid, form_cat=form_cat) 


Checksession only checks for basic session validity and redirects the user 
to a certain url. 
def checksession():

if(logged_in_user==None):
redirect(URL(r=request, f='login'))
#print "Errors! No sesions defined."
else: 
pass

View is simple cat_grid.html in this case and is available 
in views\default\ folder

{{extend 'layout.html'}} 








 Category List



Actions



Back

   
 
  









Category List 
New Category





{{=catgrid}} 
   
 



 {{=form_cat}}
 

  {{pass}}
  {{pass}}  



 
   
  

   






Note: I even uninstalled and updated my python version 2.7.13 (latest 2.7.x 
version). Also now I have just tried with latest web2py version 2.15.3. 
IE11 cache cleared. Same results on chrome. Let me know what might have 
gone wrong. 

Thanks, 

Rahul 


On Monday, August 14, 2017 at 8:11:22 PM UTC+5:30, Anthony wrote:
>
> Has the app been compiled? What happens if you reload routes or restart 
> the web server?
>
> On Monday, August 14, 2017 at 8:53:51 AM UTC-4, Rahul wrote:
>>
>> Hi All,
>>I have an app and Off late I am strangely getting below error when 
>> accessing a page. I have the cat_grid function in by controller(default.py) 
>> as well have* .html *file in views. 
>>
>>1. Request URL:
>>http://127.0.0.1:8000/Target/default/cat_grid
>>2. Request Method:
>>GET
>>3. Status Code:
>>404 NOT FOUND
>>4. Remote Address:
>>127.0.0.1:8000
>>5. Referrer Policy:
>>no-referrer-when-downgrade
>>
>> I see this in the browser (chrome)
>> invalid function (default/cat_grid)
>>
>> It was all working previously. However I am not sure how come I am 
>> getting this error for almost 60% of my functions. No ticket is thrown. I 
>> am confused as to what got changed. I am using web2py 

[web2py] Current version: 2.15.3-stable+timestamp.2017.08.07.12.51.45 (LGPLv3 License) download link wrong.

2017-08-15 Thread Halili Celik
When I downloaded above link for windows, the web2py version is still '
2.15.2-stable+timestamp.2017.07.19.12.18.41'.

-- 
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] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Martin Weissenboeck
I have tried to use the automatic update to 2.15.3
The following problem occurs:

Internal error ... Ticked issued:...


But appadmin is corrupted, so it is not possible to read the ticket in a
simple way.
*A restart of web2py solves the problem.*
*Maybe there should be an extra hint to restart web2py after an error
message?*

I looked for some details:

The error message is:

type 'exceptions.NameError'> name 'iteritems' is not defined"



In application/admin/controllers/appadmin.py:

line 14:

from gluon._compat import iteritems


line 453:

for key, value in iteritems(cache.ram.storage):


I suppose that without a restart web2py does not find gluon._compat


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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'DAL' object has no attribute ""table_name""

2017-08-15 Thread Halili Celik
Correction: It should be 'TSV (Spreadsheets', not 'csv'.

15 Ağustos 2017 Salı 00:24:44 UTC+3 tarihinde Halili Celik yazdı:
>
> 1. web2py internet download link is wrong for  windows platform. The link 
> points to old version: 2.15.2-stable+timestamp.2017.07.19.12.18.41
>
> 2. With the version: 2.15.2-stable+timestamp.2017.07.19.12.18.41, when I 
> try to export csv format I get  'DAL' 
> object has no attribute ""table_name"".
>

-- 
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: posibility to disable the mobile admin interface

2017-08-15 Thread Vic Ding
Thanks, Paolo. I'll try this after I revert to old version. The component I 
use to mimic excel for user input is not compatible with new version :(

On Tuesday, August 15, 2017 at 12:40:29 AM UTC+2, Paolo Caruccio wrote:
>
> My known way.
>
> In the "web2py/applications/admin/controllers/default.py" file at line 
> nr.3 set EXPERIMENTAL_STUFF to False
>
> You must apply the above change every time you update web2py.
>
>
> Il giorno lunedì 14 agosto 2017 12:50:39 UTC+2, Vic Ding ha scritto:
>>
>> I know this is pretty old post, but is there a way to do so? Thanks!
>>
>> On Tuesday, November 22, 2016 at 10:30:24 AM UTC+1, Oli wrote:
>>>
>>> is there a posibility to disable the mobile interface? there is only a 
>>> white screen on pythonanywhere.com with web2py version 2.14.6 .
>>
>>

-- 
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] python 3 web2py2.15.3 url lib has no get proxies

2017-08-15 Thread Ben Lawrence


*HI*

*trying to **use python 3 because I am having a lot of ascii decode 
issues...*


*python 2.17.12 can run the scheduler no problem, but not python 3.5*


*I was wondering how can I install getproxies attribute into the urllib 
module ?*



*ben@x1*:*/home/www-data/web2py*$ python3 /home/www-data/web2py/web2py.py 
-K app-name

web2py Web Framework

Created by Massimo Di Pierro, Copyright 2007-2017

Version 2.15.3-stable+timestamp.2017.08.07.07.32.04

Database drivers available: pymysql, imaplib, psycopg2, sqlite3, pg8000

Traceback (most recent call last):

  File "/home/www-data/web2py/web2py.py", line 33, in 

gluon.widget.start(cron=True)

  File "/home/www-data/web2py/gluon/widget.py", line 1170, in start

start_schedulers(options)

  File "/home/www-data/web2py/gluon/widget.py", line 1080, in 
start_schedulers

urllib.getproxies()

AttributeError: module 'urllib' has no attribute 'getproxies'



-- 
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.