[google-appengine] How set the GAE django URL ?

2008-12-07 Thread KissDragon

When I retrieve the url it encounter "No such module",  I set the
same as a single django project, it can normally run. but in "GAE
django" can not.

This is the "urls.py" setting(my project name is djest, under the
folder, there are two subfolder named "view" and "templates", and has
a mainV.py include a process(request) method):

from django.conf.urls.defaults import *

urlpatterns = patterns('',
# Example:
(r'^$', 'djtest.view.mainV.process'),

# Uncomment this for admin:
#(r'^admin/', include('django.contrib.admin.urls')),
)

This is the setting.py:

ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DIRS = (
os.path.join(ROOT_PATH, 'templates')
)


I want to now , is there need to set something in the app.yaml ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] My "return HttpResponseRedirect" doesn't work

2009-01-03 Thread KissDragon

Here is the py file content:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from model.BlogModel import *

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

def process(request):
  blog = BlogModel()
  blog.author = str(request.POST['author'])
  blog.title = str(request.POST['title'])
  blog.content = str(request.POST['content'])
  blog.put()
  return HttpResponseRedirect("/")

When I  execute this process methed,  it can put the data into
database but doesn't redirect to "/".

what's wrong with it?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---