title: Django - link to url from different app in same project
body: <p>I am making a Django project with multiple apps and therefore multiple urls.py files. I am trying to an app for user accounts into a project with apps for the shop, cart, and orders. Specifically, I want to link the account/ pages back to the shop</p>
  <p>Main urls.py:</p>
  <pre><code>urlpatterns = [
  url(r'^admin/', include(admin.site.urls)),
  url(r'^account/', include('account.urls')),
  url(r'^cart/', include('cart.urls', namespace='cart')),
  url(r'^orders/', include('orders.urls', namespace='orders')),
  url(r'^', include('shop.urls', namespace='shop')),
  ]
  </code></pre>
  <p>Urls.py for account/:</p>
  <pre><code>urlpatterns = [
  
  url(r'^login/$', 'django.contrib.auth.views.login', name='login'),
  url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),
  url(r'^logout-then-login/$', 'django.contrib.auth.views.logout_then_login',name='logout_then_login'),
  url(r'^register/$', views.register, name='register'),
  url(r'^$', views.dashboard, name='dashboard'),
  
  ]
  </code></pre>
  <p>Here is the template I am using for the account page</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{% load staticfiles %}
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;{% block title %}{% endblock %}&lt;/title&gt;
    &lt;link href="{% static "css/base.css" %}" rel="stylesheet"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="header"&gt;
      &lt;span class="logo"&gt;Rachel's Stuff&lt;/span&gt;
  
      {% if request.user.is_authenticated %}
        &lt;ul class="menu"&gt;
          &lt;li {% if section == "dashboard" %}class="selected"{% endif %}&gt;
            &lt;a href="{% url "dashboard" %}"&gt;My dashboard&lt;/a&gt;
          &lt;/li&gt;
          &lt;li {% if section == "images" %}class="selected"{% endif %}&gt;
            &lt;a href="{% url 'shop' %}"&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li {% if section == "people" %}class="selected"{% endif %}&gt;
            &lt;a href="#"&gt;People&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      {% endif %}
  
      &lt;span class="user"&gt;
        {% if request.user.is_authenticated %}
          Hello {{ request.user.first_name }},
          &lt;a href="{% url "logout" %}"&gt;Logout&lt;/a&gt;
        {% else %}
          &lt;a href="{% url "login" %}"&gt;Log-in&lt;/a&gt;
        {% endif %}
      &lt;/span&gt;
    &lt;/div&gt;
    &lt;div id="content"&gt;
      {% block content %}
      {% endblock %}
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Here, I want to link from 127.0.0.1:8000/account/ back to <a href="http://127.0.0.1:8000" rel="nofollow noreferrer">http://127.0.0.1:8000</a>, which defaults to the main storefront:</p>
  <pre><code>&lt;li {% if section == &quot;images&quot; %}class=&quot;selected&quot;{% endif %}&gt;
        &lt;a href=&quot;{% url 'shop' %}&quot;&gt;Home&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  <p>But I get an error:</p>
  <blockquote>
  <p>Reverse for 'shop' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []</p>
  <p>Request Method:    GET</p>
  <p>Request URL:   <a href="http://127.0.0.1:8000/account/" rel="nofollow noreferrer">http://127.0.0.1:8000/account/</a></p>
  <p>Django Version:    1.8.6</p>
  <p>Exception Type:    NoReverseMatch</p>
  <p>Exception Value:<br />
  Reverse for 'shop' with arguments '()' and keyword arguments '{}' not &gt;found. 0 pattern(s) tried: []</p>
  </blockquote>
  <p>How can I link back to the main shop page (127.0.0.1:8000/) when I'm already in the account namespace? Sorry if I used any terms wrong.</p>