Re: why Eclipse showed "Undefined Variable"

27 views
Skip to first unread message

Mitesh Patel

unread,
Sep 25, 2012, 11:16:05 AM9/25/12
to django...@googlegroups.com
as you have imported "hello" from zxcfa.views, and not zxcfa.

do like this:
import zxcfa

or just replace for urls with ths:
(r'^$/', hello),

Thanks,
With Best Regards,

Mitesh Patel


On 25 September 2012 20:40, Maysxuan <mays...@gmail.com> wrote:
I am new to Python & Django ,and I created a test project for Django in Eclipse ,then got a "Undefined Variable".
 
And who would tell me what happened?
 
(Attachment is the screenshot)
 
 
 

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eWFg1qgyma0J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Paul Backhouse

unread,
Sep 25, 2012, 11:21:03 AM9/25/12
to django...@googlegroups.com
On Tue, 2012-09-25 at 08:10 -0700, Maysxuan wrote:
> I am new to Python & Django ,and I created a test project for Django
> in Eclipse ,then got a "Undefined Variable".
>
> And who would tell me what happened?
>
> (Attachment is the screenshot)
>

You've imported "hello" from "zxcfa.views". So try changing
"zxcfa.views.hello" to just "hello".


Luiz A. Menezes Filho

unread,
Sep 25, 2012, 11:21:34 AM9/25/12
to django...@googlegroups.com
Because there's no variable called zxfca. 
I believe this is what you actually want to do: 'zxfca.views.hello' instead of zxfca.views.hello

Att,

On Tue, Sep 25, 2012 at 12:10 PM, Maysxuan <mays...@gmail.com> wrote:
I am new to Python & Django ,and I created a test project for Django in Eclipse ,then got a "Undefined Variable".
 
And who would tell me what happened?
 
(Attachment is the screenshot)
 
 
 

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eWFg1qgyma0J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Luiz Menezes

Maysxuan

unread,
Sep 25, 2012, 11:34:55 AM9/25/12
to django...@googlegroups.com
Thank all of you , and the answers are all correct .
 
I choosed "I believe this is what you actually want to do: 'zxfca.views.hello' instead of zxfca.views.hello" .
Reply all
Reply to author
Forward
0 new messages