On Wed, 2009-08-05 at 10:45 +0100, Paulo Almeida wrote:
> Ok, so with APPEND_SLASH = False , I get a 404 (so no
> response['location']) , but the response.context still has all the
> variables like MEDIA_URL, LANGUAGES, LANGUAGE_BIDI, and not the ones
> it should have. It still has also: 
> 
> {'request_path': u'/myflow/experiment/1'}
> 
> I also tested another view, with URL:
> 
> response = self.client.get('/myflow/experiments')
> 
> This one works, and it has a list of experiments which links to the
> view that isn't working. The link in response.content is:
> 
> a href="/myflow/experiment/1"
> 
> as it should be, and as it works outside tests. Also, from
> that /myflow/experiments response.content I can tell that the fixtures
> are being loaded, so it should not be a problem of experiment 1 not
> existing.
> 
> If you can suggest anything else I may try, please do.

It's time to use the scientific method. Make the smallest self-contained
example possible that exhibits the problem. A single test case in a file
that uses Django.TestCase. A single view that does nothing but returns a
constant string. A single URL pattern, etc. Remove everything that you
possibly can. If you find you cannot remove a particular chunk of
functionality (a URL pattern or a view or a template or whatever), then
you know where to look for the problem.

You have a lot of things in flight here all at once. Throw as many
overboard as you and eliminate the moving parts. What's left is the
problem you're trying to solve.

Regards,
Malcolm


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