I'm building a Django template in the Book app and using URL tag to redirect to the Account app's URLs. But it says account' is not a registered namespace.
book.urls:
app_name = 'book'
urlpatterns = [
path('', views.HomePageView.as_view(), name='home'),
path('account/', include('account.urls', namespace='account'))
]
book.views:
class HomePageView(generic.TemplateView):
template_name = 'book/home.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['all_books'] = Book.objects.all()
return context
templates/book/home.html:
<div id="register">
<p>
<a href="{% url 'account:register' %}"> Sign Up </a>
</p>
</div>
account/urls:
app_name='account'
urlpatterns=(
path('register/', views.RegisterView.as_view(), name='register'),
path('successful/', views.successful_created, name='successful'),
)