hi thanks for the reply i am trying to get django up and running with
googleapp engine as. i understand in django correct me if i am wrong
return is a global variable when a url is matched as defined in the
url.py it calls the class that is matched in views.py and all the
variables are passed in request object. so i am bit confused why i am
getting the error. have i miss configured some thing some how ?  below
is my urls.py if its any help

from django.conf.urls.defaults import *
from portfolio.models import Project

info_dict = {
        'queryset': Project.all()
        }
urlpatterns = patterns('',
    # Example:
    # (r'^foo/', include('foo.urls')),
      (r'^work/$', 'portfolio.views.work'),
    # Uncomment this for admin:
#     (r'^admin/', include('django.contrib.admin.urls')),
)

On Nov 11, 4:07 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Nov 10, 7:34 pm, nash <nash.raf...@gmail.com> wrote:
>
> > hi i have defined a function in my view.py
>
> > from django.http import HttpResponse
>
> > class work(request):
> >         def get(self):
> >                 return HttpResponse("its working")
>
> > but when i browse to mysite/work i am getting "name 'request' is not
> > defined" any one have any idea what is wrong ?
> > cheers nash
>
> Yes: you need to learn some Python. What you've written is a class
> that inherits from 'request', with a 'get' method. 'request' is not a
> parameter here, so it has to exist in the module somewhere.
>
> What are you trying to do?
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to