Thanks.Another strange thing is that: in the url.py file, I can use "from shape_practice.views import introduction", but I can't use shape_practice.views.but when I type http://127.0.0.1:8000/views.py:url.py:I test a very simple project:Hi all.I use djangoappengine http://www.allbuttonspressed.com/projects/djangoappengine# to manage google app engine.zip-packages
from django.conf.urls.defaults import *
from shape_practice.views import introduction
handler500 = 'djangotoolbox.errorviews.server_error'
urlpatterns = patterns('',
('^_ah/warmup$', 'djangoappengine.views.warmup'),
(r'^introduction/$', introduction),
)
from django.conf import settings
from django.http import HttpResponse
from django.utils.importlib import import_module
from django.template import loader, Context, RequestContext
def introduction(request):
t = loader.get_template('introduction.html')
c = Context({})
return HttpResponse(t.render(c))introduction/ . The browser doesn't show "introduction.html", but another "html", let's say A.html. But A.html can't be found in the urlpatterns. Anywhere else can set .html file?introduction which has an "shape_practice undefined error"
You should ask App Engine questions on the App Engine users group. Presumably you have something in your app.yaml file which is sending the user to static page rather than the Django app.
If you don't import shape_practice, you can't reference it.
--
DR.
-- 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/-/GoDD8oHllVEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment