[web2py] Re: Web2py: Using images in HTML data

2015-04-18 Thread Joe Magaro
Does anyone have a method for this?

On Friday, April 17, 2015 at 9:14:59 AM UTC-4, Joe Magaro wrote:
>
> Thanks Annet: I am aware of web2py URL helpers. I use them inside of my 
> views.
>
> However in this case, they wont work for me as the data is stored in a 
> table and output to a web page, I require another method.
>
> On Friday, April 17, 2015 at 3:01:17 AM UTC-4, Annet wrote:
>>
>> Hi Joe,
>>
>> In the book is an example of how to embed an image using helpers:
>>
>>
>> A(IMG(_src=URL('static','logo.png'), _alt="My Logo"), 
>> _href=URL('default','index'))
>>
>>
>> In one of my apps I upload images to a separate app and within that app 
>> to separate folders, to 
>> embed these images I use:
>>
>> 
>>
>> where UPLOADSDOMAIN is defined as a constant in a module and references:
>>
>> '/dbmodel/static/uploads'
>>
>> and nodeID{{='%s' %str(request.args(0))}} references the separate folder 
>> and
>> row.image contains image_name.png
>>
>>
>> Kind regards,
>>
>> Annet
>>
>

-- 
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: Using images in HTML data

2015-04-17 Thread Joe Magaro
Thanks Annet: I am aware of web2py URL helpers. I use them inside of my 
views.

However in this case, they wont work for me as the data is stored in a 
table and output to a web page, I require another method.

On Friday, April 17, 2015 at 3:01:17 AM UTC-4, Annet wrote:
>
> Hi Joe,
>
> In the book is an example of how to embed an image using helpers:
>
>
> A(IMG(_src=URL('static','logo.png'), _alt="My Logo"), 
> _href=URL('default','index'))
>
>
> In one of my apps I upload images to a separate app and within that app to 
> separate folders, to 
> embed these images I use:
>
> 
>
> where UPLOADSDOMAIN is defined as a constant in a module and references:
>
> '/dbmodel/static/uploads'
>
> and nodeID{{='%s' %str(request.args(0))}} references the separate folder 
> and
> row.image contains image_name.png
>
>
> Kind regards,
>
> Annet
>

-- 
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] Cant install via git repo

2015-04-16 Thread Joe Magaro
Hi, on my web2py install I tried to install some applications via a git 
repo. I have tried several but keep receiving the error below.

Any idea what is causing this?


Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/admin/controllers/default.py" 
,
 line 1944, in 
  File "/home/www-data/web2py/gluon/globals.py", line 393, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/applications/admin/controllers/default.py" 
,
 line 256, in site
new_repo = git.Repo.clone_from(form_update.vars.url, target)
  File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 844, in 
clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress, 
**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 791, in 
_clone
v=True, **add_progress(kwargs, git, progress))
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 431, in 

return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 802, in 
_call_process
return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 556, in execute
**subprocess_kwargs
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

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


[web2py] Web2py: Using images in HTML data

2015-04-16 Thread Joe Magaro
Hello,

I have an application that uses a rich textbox to insert images into a 
field saved in a table.

So for the image URL, I would have to put 
"/MySiteName/static/images/image.gif" as an example, then save to the 
database.

I really don't like hardcoding the site name, if I copy the project to a 
new one (as I often do) I need to scrub the database and change all entries 
to match.

Is there a way around this?

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

2013-11-17 Thread Joe Magaro
Thanks dave - if I understand this correctly I need to unzip and manuall 
copy into my folders?

On Tuesday, October 22, 2013 11:00:53 PM UTC-4, Dave S wrote:
>
>
>
> On Tuesday, October 22, 2013 6:55:37 PM UTC-7, Joe Magaro wrote:
>>
>> Hi Dave,
>>  
>> Im not sure what source zip to download? Can you provide some more info?
>> [...]
>>
>>> Basically, the update button is still having problems updating the gluon 
>>> files.  (This is mentioned in the followups in the 2.6.1 announcement 
>>> thread, a useful resource.)
>>>
>>> Download the source zip, and copy the gluon, handlers, and so forth into 
>>> your installation.
>>>
>>>
> At <http://www.web2py.com/init/default/download>, pick the green button 
> labeled "Source Code".
>
> /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/groups/opt_out.


[web2py] Re: Web2py admin crashes

2013-10-22 Thread Joe Magaro
Hi Dave,
 
Im not sure what source zip to download? Can you provide some more info?
On Friday, October 4, 2013 3:57:32 PM UTC-4, Dave S wrote:

> On Thursday, October 3, 2013 10:51:37 AM UTC-7, Dave S wrote:
>>
>>
>> On Thursday, October 3, 2013 8:28:52 AM UTC-7, Joe Magaro wrote:
>>>
>>> Hi, 
>>>
>>> All was working well, until today I went and clicked "administrative 
>>> interface" for my site, and it issues a ticket.
>>>
>>> Internal errorTicket issued: 
>>> admin/65.94.212.187.2013-10-03.19-26-12.8b8b3b98-0858-4925-a517-59ebed5f1ad1<https://www.wordgurgle.com/admin/default/ticket/admin/65.94.212.187.2013-10-03.19-26-12.8b8b3b98-0858-4925-a517-59ebed5f1ad1>
>>>
>>> When I click to view the ticket, it crashes and issues another ticket. I 
>>> checked the http logs, but cant seem to find anything of importance. Can 
>>> some one give me the next step to help solve this issue?
>>>
>>
>> Can you read the tickets from a local shell?
>>
>> less Web2pyDir/applications/admin/errors/*
>>
>>
>>
>> I just did the upgrade, and it looks like my services are running ok, but 
>> I get a "cannot import name Config", which I think means I missed copying 
>> one of the files from the welcome app or something.  Private server running 
>> web2py+rocket.
>>
>>
>>
> Basically, the update button is still having problems updating the gluon 
> files.  (This is mentioned in the followups in the 2.6.1 announcement 
> thread, a useful resource.)
>
> Download the source zip, and copy the gluon, handlers, and so forth into 
> your installation.
>
> /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/groups/opt_out.


[web2py] Web2py admin crashes

2013-10-03 Thread Joe Magaro
Hi, 

All was working well, until today I went and clicked "administrative 
interface" for my site, and it issues a ticket.

Internal errorTicket issued: 
admin/65.94.212.187.2013-10-03.19-26-12.8b8b3b98-0858-4925-a517-59ebed5f1ad1

When I click to view the ticket, it crashes and issues another ticket. I 
checked the http logs, but cant seem to find anything of importance. Can 
some one give me the next step to help solve this issue?

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


[web2py] Re: Using a recursive select but encountered a broken reference

2013-07-21 Thread Joe Magaro
Hi, Im also having the same issue, and the fix above seemed to work --  I'm 
wondering if there is an official fix for this?

On Saturday, March 2, 2013 2:55:17 PM UTC-5, Marin Pranjić wrote:
>
> This happened to an user multiple times. No idea why it happens.
>
> Error ticket doesn't show much, this is everything I can get from there:
>
> Traceback (most recent call last):
>  File "/home/www-data/web2py/gluon/main.py", line 571, in wsgibase
>  session._try_store_in_cookie_or_file(request, response)
>  File "/home/www-data/web2py/gluon/globals.py", line 738, in 
> _try_store_in_cookie_or_file
>  self._try_store_in_file(request, response)
>  File "/home/www-data/web2py/gluon/globals.py", line 745, in 
> _try_store_in_file
>  if not response.session_id or self._forget or self._unchanged():
>  File "/home/www-data/web2py/gluon/globals.py", line 700, in _unchanged
>  session_pickled = cPickle.dumps(dict(self))
>  File "/usr/lib/python2.7/copy_reg.py", line 74, in _reduce_ex
>  getstate = self.__getstate__
>  File "/home/www-data/web2py/gluon/dal.py", line 7355, in __getattr__
>  self.__allocate()
>  File "/home/www-data/web2py/gluon/dal.py", line 7350, in __allocate
>  raise RuntimeError, "Using a recursive select but encountered a broken 
> reference: %s %d"%(self._table, int(self))
> RuntimeError: Using a recursive select but encountered a broken reference: 
> auth_group 5
>
>
>
> However, auth_group record with id=5 exists. I have no idea why it raises an 
> error.
>
> I'm using web2py 2.2.1, this is production instance so I can't test with 
> other versions right now.
>
>
> Marin
>
>

-- 

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




[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2013-07-21 Thread Joe Magaro
Hi. I have another issue,and in researching it i'm wondering if this is 
somewhat related to having 2 or more domains served from web2py? 

On Tuesday, July 16, 2013 10:44:46 PM UTC-4, Joe Magaro wrote:
>
> Hi, Lately when I'm in the admin section, when I perform an action such as 
> installing a new app, or deleting a view I keep getting the error below. Im 
> not sure what changed to affect this, please help!
>
> raceback (most recent call last):
>   File "/home/www-data/web2py/gluon/main.py", line 606, in wsgibase
> session._try_store_in_cookie_or_file(request, response)
>   File "/home/www-data/web2py/gluon/globals.py", line 757, in 
> _try_store_in_cookie_or_file
> self._try_store_in_file(request, response)
>   File "/home/www-data/web2py/gluon/globals.py", line 763, in 
> _try_store_in_file
> if not response.session_id or self._forget or self._unchanged():
>   File "/home/www-data/web2py/gluon/globals.py", line 719, in _unchanged
> session_pickled = cPickle.dumps(dict(self))
>   File "/usr/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
> raise TypeError, "can't pickle %s objects" % base.__name__
> TypeError: can't pickle function objects
>
> Error snapshot [image: 
> help]<https://www.mywebsonic.com/admin/default/ticket/admin/65.94.90.186.2013-07-17.06-41-06.14386b00-ff0d-47ad-bf32-de51a08fda61#>
>
> (can't pickle function objects)
>

-- 

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




[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2013-07-20 Thread Joe Magaro
Hi Mossimo,

If it helps See below. I first noticed the problem after I installed a 
package (instant press). Now I see it in the admin when I try to delete a 
view. I think its popped up a few other times too.

2.5.1-stable+timestamp.2013.06.06.15.39.19
(Running on Apache/2.2.22 (Ubuntu))

Versionweb2py™Version 2.5.1-stable+timestamp.2013.06.06.15.39.19PythonPython 
2.7.3: /usr/bin/python (prefix: /usr)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/main.py", line 606, in wsgibase
session._try_store_in_cookie_or_file(request, response)
  File "/home/www-data/web2py/gluon/globals.py", line 757, in 
_try_store_in_cookie_or_file
self._try_store_in_file(request, response)
  File "/home/www-data/web2py/gluon/globals.py", line 763, in _try_store_in_file
if not response.session_id or self._forget or self._unchanged():
  File "/home/www-data/web2py/gluon/globals.py", line 719, in _unchanged
session_pickled = cPickle.dumps(dict(self))
  File "/usr/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects

Error snapshot [image: 
help]<https://www.mywebsonic.com/admin/default/ticket/admin/65.94.90.186.2013-07-21.04-18-30.019119b4-b817-4973-be82-a9ca5f490dfd#>

(can't pickle function objects)

inspect attributes
Frames
   
   - 
   
   *File /home/www-data/web2py/gluon/main.py in wsgibase at line 606* code 
   arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in 
   _try_store_in_cookie_or_file at line 757* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in _try_store_in_file at 
   line 763* code arguments variables
   - 
   
   *File /home/www-data/web2py/gluon/globals.py in _unchanged at line 719* 
   code arguments variables
   - 
   
   *File /usr/lib/python2.7/copy_reg.py in _reduce_ex at line 70* code 
   arguments variables
   Function argument list
   
   (self=>, proto=0)
   Code listing
   
   65.
   66.
   67.
   68.
   69.
   70.
   
   71.
   72.
   73.
   74.
   
   base = object # not really reachable
   if base is object:
   state = None
   else:
   if base is self.__class__:
   raise TypeError, "can't pickle %s objects" % base.__name__
   
   state = base(self)
   args = (self.__class__, base, state)
   try:
   getstate = self.__getstate__
   
   Variablesbase.__name__'function'builtinTypeErrorbase
   
Context

locals request session response
In file: Framework

1.


On Tuesday, July 16, 2013 10:44:46 PM UTC-4, Joe Magaro wrote:
>
> Hi, Lately when I'm in the admin section, when I perform an action such as 
> installing a new app, or deleting a view I keep getting the error below. Im 
> not sure what changed to affect this, please help!
>
> raceback (most recent call last):
>   File "/home/www-data/web2py/gluon/main.py", line 606, in wsgibase
> session._try_store_in_cookie_or_file(request, response)
>   File "/home/www-data/web2py/gluon/globals.py", line 757, in 
> _try_store_in_cookie_or_file
> self._try_store_in_file(request, response)
>   File "/home/www-data/web2py/gluon/globals.py", line 763, in 
> _try_store_in_file
> if not response.session_id or self._forget or self._unchanged():
>   File "/home/www-data/web2py/gluon/globals.py", line 719, in _unchanged
> session_pickled = cPickle.dumps(dict(self))
>   File "/usr/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
> raise TypeError, "can't pickle %s objects" % base.__name__
> TypeError: can't pickle function objects
>
> Error snapshot [image: 
> help]<https://www.mywebsonic.com/admin/default/ticket/admin/65.94.90.186.2013-07-17.06-41-06.14386b00-ff0d-47ad-bf32-de51a08fda61#>
>
> (can't pickle function objects)
>

-- 

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




[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2013-07-17 Thread Joe Magaro
Hi Mossimo - Where would I look for this? I haven't done sessions in my 
apps yet, but maybe one of the projects I loaded might have. Also, why 
would an app affect the admin site?
 

On Tuesday, July 16, 2013 10:44:46 PM UTC-4, Joe Magaro wrote:

> Hi, Lately when I'm in the admin section, when I perform an action such as 
> installing a new app, or deleting a view I keep getting the error below. Im 
> not sure what changed to affect this, please help!
>
> raceback (most recent call last):
>   File "/home/www-data/web2py/gluon/main.py", line 606, in wsgibase
> session._try_store_in_cookie_or_file(request, response)
>   File "/home/www-data/web2py/gluon/globals.py", line 757, in 
> _try_store_in_cookie_or_file
> self._try_store_in_file(request, response)
>   File "/home/www-data/web2py/gluon/globals.py", line 763, in 
> _try_store_in_file
> if not response.session_id or self._forget or self._unchanged():
>   File "/home/www-data/web2py/gluon/globals.py", line 719, in _unchanged
> session_pickled = cPickle.dumps(dict(self))
>   File "/usr/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
> raise TypeError, "can't pickle %s objects" % base.__name__
> TypeError: can't pickle function objects
>
> Error snapshot [image: 
> help]<https://www.mywebsonic.com/admin/default/ticket/admin/65.94.90.186.2013-07-17.06-41-06.14386b00-ff0d-47ad-bf32-de51a08fda61#>
>
> (can't pickle function objects)
>

-- 

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




[web2py] Is there an issue with my web2py install? "can't pickle function objects"

2013-07-16 Thread Joe Magaro
Hi, Lately when I'm in the admin section, when I perform an action such as 
installing a new app, or deleting a view I keep getting the error below. Im 
not sure what changed to affect this, please help!

raceback (most recent call last):
  File "/home/www-data/web2py/gluon/main.py", line 606, in wsgibase
session._try_store_in_cookie_or_file(request, response)
  File "/home/www-data/web2py/gluon/globals.py", line 757, in 
_try_store_in_cookie_or_file
self._try_store_in_file(request, response)
  File "/home/www-data/web2py/gluon/globals.py", line 763, in _try_store_in_file
if not response.session_id or self._forget or self._unchanged():
  File "/home/www-data/web2py/gluon/globals.py", line 719, in _unchanged
session_pickled = cPickle.dumps(dict(self))
  File "/usr/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects

Error snapshot [image: 
help]

(can't pickle function objects)

-- 

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




[web2py] Re: Using a python module in web2py

2013-06-18 Thread Joe Magaro
Well, I didn't know I needed to restart Apache.

Now I get a different error. I did the nltk download in python, but do I 
need to do something in web2py?

  Resource 'corpora/wordnet' not found.  Please use the NLTK
  Downloader to obtain the resource: >>> nltk.download().
  Searched in:
- '/var/www/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'

- '/usr/local/lib/nltk_data' 




On Sunday, June 16, 2013 8:47:10 PM UTC-4, Joe Magaro wrote:
>
>
> Hi, I have a thesaurus(nltk-wordnet) working from the python command line. 
> However when I try to use it in Web2Py I get an error.
>
> Can someone help, please --- all the details are Below:
>
> Simple example Code:
> -
> import nltk
> from nltk.corpus import wordnet as wn
>
> def get_thes():
> wn.synset('car.n.01').lemma_names
> return dict()
>
> error
> -
> web2py™Version 2.5.1-stable+timestamp.2013.06.06.15.39.19PythonPython 
> 2.7.3: /usr/bin/python (prefix: /usr)Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
>
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/restricted.py", line 212, in restricted
> exec ccode in environment
>   File "/home/www-data/web2py/applications/Wordgf/controllers/thes.py" 
> <https://www.mywebsonic.com/admin/default/edit/WordGurgle/controllers/thes.py>,
>  line 1, in 
> import nltk
>   File "/home/www-data/web2py/gluon/custom_import.py", line 95, in 
> custom_importer
> raise e2  # there is an error in the module
> AttributeError: 'module' object has no attribute 'error'
>
>

-- 

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




[web2py] Using a python module in web2py

2013-06-16 Thread Joe Magaro

Hi, I have a thesaurus(nltk-wordnet) working from the python command line. 
However when I try to use it in Web2Py I get an error.

Can someone help, please --- all the details are Below:

Simple example Code:
-
import nltk
from nltk.corpus import wordnet as wn

def get_thes():
wn.synset('car.n.01').lemma_names
return dict()

error
-
web2py™Version 2.5.1-stable+timestamp.2013.06.06.15.39.19PythonPython 
2.7.3: /usr/bin/python (prefix: /usr)Traceback

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

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 212, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/Wordgf/controllers/thes.py" 
, 
line 1, in 
import nltk
  File "/home/www-data/web2py/gluon/custom_import.py", line 95, in 
custom_importer
raise e2  # there is an error in the module
AttributeError: 'module' object has no attribute 'error'

-- 

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




[web2py] Thesaurus for Web2py?

2013-06-15 Thread Joe Magaro
Hi, Can someone recommend a thesaurus that works with Web2py?

-- 

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




[web2py] Re: Web2py Grid: Hiding from the main grid but show on other views

2013-06-12 Thread Joe Magaro
Thanks Villas! 

That did it!

On Wednesday, June 12, 2013 5:41:56 PM UTC-4, villas wrote:
>
> I seem to remember doing something like this once - worth a try:
>
> if not 'view' in request.args:
> db.CodeMaster.Code_Example.readable = False
> db.CodeMaster.Code_Example.writable = False
> else:
> db.CodeMaster.Code_Example.readable = True
> db.CodeMaster.Code_Example.writable = False
>
>

-- 

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




[web2py] Re: Web2py Grid: Hiding from the main grid but show on other views

2013-06-12 Thread Joe Magaro
Hi Massimo.

Perhaps I explained this incorrectly.

When I added db.CodeMaster.Code_Example.readable = False that did two 
things:
a) Removed the Code_Example Field from the Grid (good!)
b) Removed the Code_Example Field from the display view. (Not what I want)

(a) is what I want, but I when I display the record, I need the field 
output on (b) the display view.  Is it possible to do this using the grid?


On Tuesday, June 11, 2013 5:49:08 PM UTC-4, Massimo Di Pierro wrote:
>
> I tried db.CodeMaster.Code_Example.readable = False
> I tried db.CodeMaster.Code_Example.writable = False
>
> Now put the two lines in the action before the grid(...) and it will only 
> apply to that grid.
>
> On Tuesday, 11 June 2013 15:34:30 UTC-5, Joe Magaro wrote:
>>
>> Hi, I am just learning web2py and I have a working grid: 
>> form=SQLFORM.grid(db.CodeMaster,editable=auth.has_membership('Editor_Group'),
>>  
>> create=auth.has_membership('Editor_Group'),deletable=auth.has_membership('Editor_Group')
>> )
>>  
>> There is a field in db.CodeMaster that I would like to hide from the grid 
>> view, but have it shown in other views.
>>  
>> I tried db.CodeMaster.Code_Example.readable = False
>>  
>> That seemed to work except it removed it from all views except edit.
>>  
>> Any help is appreciated!
>>
>

-- 

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




[web2py] Web2py Grid: Hiding from the main grid but show on other views

2013-06-11 Thread Joe Magaro
Hi, I am just learning web2py and I have a working grid: 
form=SQLFORM.grid(db.CodeMaster,editable=auth.has_membership('Editor_Group'), 
create=auth.has_membership('Editor_Group'),deletable=auth.has_membership('Editor_Group')
)
 
There is a field in db.CodeMaster that I would like to hide from the grid 
view, but have it shown in other views.
 
I tried db.CodeMaster.Code_Example.readable = False
 
That seemed to work except it removed it from all views except edit.
 
Any help is appreciated!

-- 

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