In my main urlconf, I’m including an app’s urlconf:
url(r"^items/$", include("items.urls")),
In items/urls.py I have:
urlpatterns = patterns("",
url(r"^profile/", ProfileView.as_view(), name="accounts_profile"),
url(r"^$", DashboardView.as_view(), name="items_home"),
)
The problem is that no matter what I enter to urlconf — except for r"^$" — I’m getting a NoReverseMatch error in the template calling one of these urlconfs via e.g. {% url accounts_profile %}. I’ve tried with different views from different apps, different urlconf names etc, but no luck. Any ideas?
I’m using Django 1.3.1, FWIW.
Nevermind, I got it — the problem was with the
$sign in the import statement above, which signified the end of the line. Feeling so silly. :-/