quiero usar solo la validacion de usuario de django

55 views
Skip to first unread message

JorgeP

unread,
Sep 14, 2009, 12:35:48 AM9/14/09
to Google App Engine
hola grupo, soy nuevo programando en google engine, pues mi pregunta
es la siguiente
he estado configurando el inicio de sesión para que al momento de
subir mi aplicación solo tengan acceso las personas que sean creadas
dentro de está... que no tengan cuentas en google...

he seguido un ejemplo de un articulo que esta publicado el la pagina
de code.google.com pero me sale un error
mi codigo es el siguiente

setting.py

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
# Django authentication
'django.contrib.auth.middleware.AuthenticationMiddleware',
# Google authentication
#'ragendja.auth.middleware.GoogleAuthenticationMiddleware',
# Hybrid Django/Google authentication
#'ragendja.auth.middleware.HybridAuthenticationMiddleware',

)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.admin',
)


views.py

from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
#####################################################################

def crear_nuevo_usuario (request):
form = UserCreationForm()
if request.method == 'POST':
form = UserCreationForm(request.POST)
if form.is_valid():
user = form.save(commit=False)
user.is_active = True
user.put()
return HttpResponseRedirect('/login/')
return shortcuts.render_to_response('crear_usuario.html', {'form':
form})

url.py

(r'^signup/$', 'views.crear_nuevo_usuario'),
(r'^login/$', 'django.contrib.auth.views.login', {'template_name':
'crear_usuario.html'}),
(r'^logout/$', 'django.contrib.auth.views.logout_then_login',
{'login_url': '/'}),


y pues me devuelve un error "You haven't set the DATABASE_ENGINE
setting yet."

le agradesco de ante mano...

Gabriel Robertson

unread,
Sep 14, 2009, 2:44:54 PM9/14/09
to google-a...@googlegroups.com
2009/9/13 JorgeP <jorge0...@gmail.com>:

I do not suppose there are some language specific groups for appengine
that we could link him to?

Reply all
Reply to author
Forward
0 new messages