X
X
xxx2017-11-08 14:43:47
JavaScript
xxx, 2017-11-08 14:43:47

Doesn't see the view from another app?

There are 2 applications. In the template of one of them, you need to make a link to the view from the other.

<a class="navbar-brand" href="{% url 'posts:listofposts' %}">Home</a>

Posts.urls
from views import (
  listofposts, )
urlpatterns = [
url(r'^$',
    listofposts ,
    name='listofposts'),
]

I receive
Exception Value: 	

u'posts' is not a registered namespace

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
Xaip, 2017-11-08
@Xaip

specify a variable in urls:
app_name = #name

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question