Saturday, July 31, 2010

Re: Get request path without having a request object

On Sat, Jul 31, 2010 at 12:37 PM, cootetom <cootetom@gmail.com> wrote:
> Thanks Carlos but I'm trying to achieve getting the path without
> having to pass the request object.

In a word: don't.

Instead, design your system to pass the information you need where and
when you need it. This doesn't mean everything always has to sling
around a request object, just that you need to think carefully about
separation of concerns and which code needs to get at the request.

Do this, and in 6-12 months when you have to start making changes to
update your application, you'll be incredibly thankful that you did it
right the first time around.


--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment