Hello,

I've been hitting my head pretty hard trying to figure out what the
problem is hope someone here can help.

I've set up the remote backends and middleware as per the docs and
blatantly I'm coding the META remote_user and nothing happens. like
this:

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.RemoteUserMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.RemoteUserBackend',
)

Then on my view:

def login_(request):
    request.META['REMOTE_USER'] = 'test123'
    try:
        user = User.objects.get(username=request.META['REMOTE_USER'])
        logger.debug("got user: %s, %s", user.last_name,
user.first_name)
    except ObjectDoesNotExist:
        logger.debug("username: %s, does not exist",
request.META['REMOTE_USER'])

    return render_to_response('myapp/dashboard.html',
{'section':'dashboard'}, context_instance=RequestContext(request))

All goes as planned, but the user is not being created. Am I missing
something here?

Thank you!!!

-- 
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