Hi all,

I am new to this list (hello btw :), a beginner of Django, and I have
discovered a _very_ strange thing. Basicall I have a view handling a
file upload (see shortened code below). Depending on a select field a
function gets called handling the stuff, and returning. (rtr =
render_to_response). Now. The handler function sets a message.

That does not work.

But. If I copy-and-paste the code of the function
"call_my_other_function" into the if-block in myview, it does.

I don't get it - at all. Can someone please explain?

Thanks in advance & greetings,
Axel.


def myview(request):
    if request.method =="POST":
        call_my_other_func(request)
    else: rtr("index.html")

def call_my_other_func(request):
    # do something with the data
    messages.info(request, "hello world")
    return rtr("index.html", context_instance=RequestContext())

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