Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-18 Thread Alex Glaros
wait...it does work... only time the above error is raised is when a link 
is attempted to be made for a text string in ckeditor

seems a little too buggy for users at this time though

is there a safer, less fancy alternative to ckeditor?

thanks

Alex

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-18 Thread Alex Glaros
that error disappeared with your fix but was replaced with new error
 'NoneType' object has no attribute 'id'
Versionweb2py™Version 2.9.12-stable+timestamp.2015.01.17.06.11.03PythonPython 
2.7.6: C:\Program Files\web2py\web2py\web2py.exe (prefix: )Traceback

1.
2.
3.
4.
5.
6.
7.
8.

Traceback (most recent call last):
  File "gluon/restricted.py", line 224, in restricted
  File "C:/Program 
Files/web2py/web2py/applications/ES1/controllers/plugin_ckeditor.py" 
, 
line 61, in 
  File "gluon/globals.py", line 393, in 
  File "C:/Program 
Files/web2py/web2py/applications/ES1/controllers/plugin_ckeditor.py" 
, 
line 33, in browse
set = db(table_upload.id>0)
AttributeError: 'NoneType' object has no attribute 'id'

Error snapshot [image: help] 


('NoneType' object has no attribute 'id')

inspect attributes
Frames
   
   - 
   
   *File C:\Program Files\web2py\web2py\gluon\restricted.py in restricted 
   at line 224* code arguments variables
   - 
   
   *File C:\Program 
   Files\web2py\web2py\applications\ES1\controllers\plugin_ckeditor.py in 
at line 61* code arguments variables
   - 
   
   *File C:\Program Files\web2py\web2py\gluon\globals.py in  at 
   line 393* code arguments variables
   - 
   
   *File C:\Program 
   Files\web2py\web2py\applications\ES1\controllers\plugin_ckeditor.py in 
   browse at line 33* code arguments variables
   Function argument list
   
   ()
   Code listing
   
   28.
   29.
   30.
   31.
   32.
   33.
   
   34.
   35.
   36.
   37.
   
   
   def browse():
   db = current.plugin_ckeditor.db
   table_upload = current.plugin_ckeditor.settings.table_upload
   browse_filter = current.plugin_ckeditor.settings.browse_filter
   set = db(table_upload.id>0)
   
   for key, val in browse_filter.items():
   if value[0] == '<':
   set = set(table_upload[key]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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-18 Thread Anthony
Here you 
showed a snippet of code from the plugin. That assignment to the "requires" 
attribute should be moved into the original field definition, not set 
afterwards.

Anthony

On Friday, April 17, 2015 at 3:55:30 PM UTC-4, Alex Glaros wrote:
>
> sorry, didn't see your question above.  
>
> can you please describe details of how to make the change?
>
>

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Alex Glaros
sorry, didn't see your question above.  

can you please describe details of how to make the change?

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Anthony
On Friday, April 17, 2015 at 3:26:12 PM UTC-4, Alex Glaros wrote:
>
> if plugin code is not compatible with lazy tables, should should someone 
> report a bug or make fix request?
>

I don't know if the plugin is being maintained (it is not part of web2py). 
If not, you can simply make the change yourself.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Anthony


On Thursday, April 16, 2015 at 5:30:35 PM UTC-4, Alex Glaros wrote:
>
> Anthony,
>
> editor already only defined in field, but error persists.
>

The error results from the plugin code -- have you fixed that?

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Alex Glaros
if plugin code is not compatible with lazy tables, should should someone 
report a bug or make fix request?

Alex

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-16 Thread Alex Glaros
Anthony,

editor already only defined in field, but error persists. Below are only 
places referenced.

MODEL
from plugin_ckeditor import CKEditor
ckeditor = CKEditor(db)
ckeditor.define_tables()
ckeditor.settings.url_upload = URL(request.app, 'plugin_ckeditor', 
'upload', extension='html')
ckeditor.settings.url_browse = URL(request.app, 'plugin_ckeditor', 
'browse', extension='html')


auth.settings.extra_fields['auth_user']= [
Field('summarySelfDescription','text', widget=ckeditor.widget),










-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-15 Thread Anthony
Looks like the current plugin code is not compatible with lazy tables. A 
quick fix is to just move the "requires" assignment into the field 
definition within the table definition, rather than doing it after the 
table definition.

Anthony

On Wednesday, April 15, 2015 at 5:52:54 PM UTC-4, Alex Glaros wrote:
>
> )
> #lazy tables breaks this. Need to force the load of the table
> self.settings.table_upload.upload.requires = [
> IS_NOT_EMPTY(),
> IS_LENGTH(maxsize=self.settings.file_length_max,
>   minsize=self.settings.file_length_min),  ## this is 
> line #69
> ]
>
>
> def widget(self, field, value, **attributes):
>

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-15 Thread Alex Glaros
)
#lazy tables breaks this. Need to force the load of the table
self.settings.table_upload.upload.requires = [
IS_NOT_EMPTY(),
IS_LENGTH(maxsize=self.settings.file_length_max,
  minsize=self.settings.file_length_min),  ## this is
line #69
]


def widget(self, field, value, **attributes):

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-15 Thread Niphlod
the code to post to be helped is the INNER exception, not the OUTER one. 
What's on line 69 of plugin_ckeditor ?

On Wednesday, April 15, 2015 at 11:37:35 PM UTC+2, Alex Glaros wrote:
>
> When setting lazy_tables = True
>
> I get this error 
>  'NoneType' object has no attribute 'upload'
>
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 224, in restricted
>   File "C:/alex/web2py/web2py/web2py/applications/ES1/models/db.py", line 
> 56, in 
> ckeditor.define_tables()
>   File "applications\ES1\modules\plugin_ckeditor.py", line 69, in 
> define_tables
> minsize=self.settings.file_length_min),
> AttributeError: 'NoneType' object has no attribute 'upload'
>
>
>
> from plugin_ckeditor import CKEditor
> ckeditor = CKEditor(db)
> ckeditor.define_tables()  ## here is my line # 56
> ckeditor.settings.url_upload = URL(request.app, 'plugin_ckeditor', 
> 'upload', extension='html')
> ckeditor.settings.url_browse = URL(request.app, 'plugin_ckeditor', 
> 'browse', extension='html')
>
> Alex
>
>
>

-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-15 Thread Alex Glaros
When setting lazy_tables = True

I get this error 
 'NoneType' object has no attribute 'upload'

Traceback (most recent call last):
  File "gluon/restricted.py", line 224, in restricted
  File "C:/alex/web2py/web2py/web2py/applications/ES1/models/db.py", line 
56, in 
ckeditor.define_tables()
  File "applications\ES1\modules\plugin_ckeditor.py", line 69, in 
define_tables
minsize=self.settings.file_length_min),
AttributeError: 'NoneType' object has no attribute 'upload'



from plugin_ckeditor import CKEditor
ckeditor = CKEditor(db)
ckeditor.define_tables()  ## here is my line # 56
ckeditor.settings.url_upload = URL(request.app, 'plugin_ckeditor', 
'upload', extension='html')
ckeditor.settings.url_browse = URL(request.app, 'plugin_ckeditor', 
'browse', extension='html')

Alex


-- 
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: Does Lazy Tables setting only have relevance if migration = True?

2015-04-15 Thread Anthony
No, it saves time in both cases (turning off migrations saves additional 
time).

Anthony

On Wednesday, April 15, 2015 at 3:29:52 PM UTC-4, Alex Glaros wrote:
>
> Does Lazy Tables setting only have relevance if migration = True?
>
> Is it not necessary if migration = False?
>
> thanks
>
> Alex Glaros
>
>

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