storyloops schrieb:
> Hi all,
>
> I'm testing/learning the 20 minute wiki, but have a problem with
> saving the edit. I'm getting a NameError - 'turbogears is not
> defined'. I've not been able to sort out the error. Again, any help
> is greatly appreciated in advance. Thank you.
>
> Below is the traceback:
>
> 500 Internal error
>
> The server encountered an unexpected condition which prevented it from
> fulfilling the request.
>
> Page handler: <bound method Root.save of <test1.controllers.Root
> object at 0x01486C10>>
> Traceback (most recent call last):
> File "c:\python25\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy
> \_cphttptools.py", line 121, in _run
> self.main()
> File "c:\python25\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy
> \_cphttptools.py", line 264, in main
> body = page_handler(*virtual_path, **self.params)
> File "<string>", line 3, in save
> File "c:\python25\lib\site-packages\TurboGears-1.0.4.4-py2.5.egg
> \turbogears\controllers.py", line 365, in expose
> *args, **kw)
> File "<string>", line 5, in run_with_transaction
> File "c:\python25\lib\site-packages\TurboGears-1.0.4.4-py2.5.egg
> \turbogears\database.py", line 356, in so_rwt
> retval = func(*args, **kw)
> File "<string>", line 5, in _expose
> File "c:\python25\lib\site-packages\TurboGears-1.0.4.4-py2.5.egg
> \turbogears\controllers.py", line 380, in <lambda>
> mapping, fragment, args, kw)))
> File "c:\python25\lib\site-packages\TurboGears-1.0.4.4-py2.5.egg
> \turbogears\controllers.py", line 408, in _execute_func
> output = errorhandling.try_call(func, *args, **kw)
> File "c:\python25\lib\site-packages\TurboGears-1.0.4.4-py2.5.egg
> \turbogears\errorhandling.py", line 72, in try_call
> return func(self, *args, **kw)
> File "C:\stephen-turbo\test1\controllers.py", line 26, in save
> turbogears.flash("Changes saved!")
> NameError: global name 'turbogears' is not defined
> --~--~---------~--~----~------------~-------~--~----
You lack an
import turbogears
on the beginning of the file.
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---