Figured this out somewhat: To get around this, you can do something
like this when referencing external apps in auth templates:

{% url project.other_app.views.other_view as view %}

This won't raise an error if that reference doesn't work.

Still, this feels a bit hackish. I think brittle auth tests are
something of a recurring theme here.

On May 20, 5:18 pm, Andrew Fong <fongand...@gmail.com> wrote:
> I have the contrib.auth app installed, and in order for its tests to
> pass, I have to define certain registration templates. When defining
> those templates, if I use the url tag / reverse to point to a view
> outside the auths app, the auth tests fail.
>
> This occurs because the auth tests use a custom urlconf and have no
> knowledge of views elsewhere in the project -- on one hand, this makes
> sense since the auth app shouldn't be expected to know about the URLs
> in the project it's included in.
>
> On the other hand, the auth app invites us to write its own template
> -- and it seems reasonable that the template used for a login page
> might also have a link to another page in the app. For example, my
> registration templates extend a base template that has a nav bar
> pointing to views in other apps.
>
> Any ideas on how to work around this?
>
> -- Andrew
--~--~---------~--~----~------------~-------~--~----~
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