i have a view as following:

def edit_profile(request, slug=None):
    from django.views.generic.create_update import update_object
    try:
        if slug:
            auth_user = User.objects.get(username=slug)
        elif request.user:
            auth_user = request.user
    except(User.DoesNotExist):
        raise Http404

    user_id = auth_user.id
    username = auth_user.username

    try:
      myuser = MyUser.objects.get(user=user_id)
    except:
      create_user_profile(auth_user)

    return update_object(
        request,
        model=MyUser,
        object_id=user_id,
        login_required=True,
        template_name="myuser/user_edit_form.html",
    )

after updating the object, it redirect to /users/xxx, but i want it go
to /user/xxx.
i just wonder where define the redirect url in update_object.

here is my urls.py:
(r'^profile/edit/$',            edit_profile),

thx


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to