On Sat, Feb 15, 2014 at 2:47 PM, Andrew Taylor <andydtay...@gmail.com> wrote:
> Hi,
>
> I've been following an online tutorial but been debugging. I've traced my
> issue to this line in the view function below:
>
> return category(request, category_name_url)
>
>
> Is this view effectively calling another view directly without going via the
> urls file (in the exception case)?

Yes.

> If so can you advise me if this is good
> or bad practice?
>

Well, in this case it doesn't make much sense to me. The request is to
an "add_page" view, not to a "view_page" view, and so it seems strange
to not indicate the correct URI for the newly created resource.

On the other hand, if you have lots of views doing similar things, one
view may simply set up/calculate a few variables and then call a
different view.

I guess I would say that if the response generated by the second view
is appropriate for the URI requested for the original view then there
is no problem with doing so.


Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1LXB%2BxWJARP2ZW-S2o%3DyNfyc7502ar-At-OLJfYVPtYCw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to