title: django-allauth returns error "Reverse ... with arguments '()' and keyword arguments '{}' not found"
body: <p>EDIT:
  Kevin's answer below solved my issue. Turns out "allauth does not support namespaces" so I shouldn't have introduced this into my urls.py</p>
  
  <hr>
  
  <p>ORIGINAL POST:</p>
  
  <p>I have installed django-allauth exactly as per tutorials
  <code>https://github.com/pennersr/django-allauth</code></p>
  
  <p>I have a very basic problem here; can't get basic user login/out pages working even before I add in social integration.</p>
  
  <p>By navigating to /admin, I clicked "log out", so I am not a logged in user.</p>
  
  <p>Now when I visit <code>/accounts/login</code> I am met with this error</p>
  
  <pre><code>NoReverseMatch at /accounts/login/
  Reverse for 'account_signup' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  Request Method: GET
  Request URL:    http://localhost:5000/accounts/login/
  Django Version: 1.6.5
  Exception Type: NoReverseMatch
  Exception Value:    
  Reverse for 'account_signup' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  </code></pre>
  
  <p><strong>Question: Do I need to modify the default allauth views.py to solve this?</strong></p>
  
  <p>In case relevant, here's the same issue when I try via shell</p>
  
  <pre><code>(awe01)MoriartyMacBookAir13:getstartapp macuser$ python manage.py shell
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) 
  &gt;&gt;&gt; from django.core.urlresolvers import reverse
  &gt;&gt;&gt; reverse('account_signup')
  2014-09-30 16:54:29,256 boto [DEBUG]:Using access key found in config file.
  2014-09-30 16:54:29,256 boto [DEBUG]:Using secret key found in config file.
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/core/urlresolvers.py", line 532, in reverse
      return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
    File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/core/urlresolvers.py", line 452, in _reverse_with_prefix
      (lookup_view_s, args, kwargs, len(patterns), patterns))
  NoReverseMatch: Reverse for 'account_signup' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  </code></pre>
  
  <p>Having been googling for the past hour, I don't see what I'm missing.  It's supposed to work out of the box, right?
  I see the default base.html already seems to have the line, <code>{% load url from future %}</code></p>
  
  <p>To confirm, here are some extracts from my main settings.py (in folder shareducate/settings.py)</p>
  
  <pre><code>"""
  
  """
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  import os
  import dj_database_url
  # from unipath import Path # that's from http://djangosteps.wordpress.com/2013/09/19/setting-up-django-allauth/
  BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  TEMPLATE_DEBUG = True
  
  ALLOWED_HOSTS = []
  
  
  TEMPLATE_CONTEXT_PROCESSORS = (
      # from http://django-allauth.readthedocs.org/en/latest/installation.html
      # Required by allauth template tags
      "django.core.context_processors.request",
      # allauth specific context processors
      "allauth.account.context_processors.account",
      "allauth.socialaccount.context_processors.socialaccount",
  
      # and this due to error message
      "django.contrib.auth.context_processors.auth",
  )
  
  
  
  AUTHENTICATION_BACKENDS = (
  #     http://django-allauth.readthedocs.org/en/latest/installation.html 
      # Needed to login by username in Django admin, regardless of `allauth`
      "django.contrib.auth.backends.ModelBackend",
  
      # `allauth` specific authentication methods, such as login by e-mail
      "allauth.account.auth_backends.AuthenticationBackend",
  )
  
  
  # Application definition
  # auth and allauth settings
  LOGIN_REDIRECT_URL = '/'
  SOCIALACCOUNT_QUERY_EMAIL = True
  SOCIALACCOUNT_PROVIDERS = {
      'facebook': {
  #        'AUTH_PARAMS': {'auth_type': 'reauthenticate'},
          'SCOPE': ['email', 'publish_stream'],
          'METHOD': 'js_sdk',  # instead of 'oauth2'
  #        'LOCALE_FUNC': 'path.to.callable',
          'VERIFIED_EMAIL': False
      },
  #     'google':
  #         { 'SCOPE': ['https://www.googleapis.com/auth/userinfo.profile'],
  #           'AUTH_PARAMS': { 'access_type': 'online' } },
  #     'linkedin':
  #       {'SCOPE': ['r_emailaddress'],
  #        'PROFILE_FIELDS': ['id',
  #                          'first-name',
  #                          'last-name',
  #                          'email-address',
  #                          'picture-url',
  #                          'public-profile-url']},
  # 
  }
  # SOCIALACCOUNT_ENABLED = True # @MM completely made that up based on allauth urls.py and https://github.com/flashingpumpkin/django-socialregistration/issues/48
  
  # more settings from allauth
  # http://django-allauth.readthedocs.org/en/latest/configuration.html
  ACCOUNT_PASSWORD_MIN_LENGTH = 5
  # more suggestions from https://speakerdeck.com/tedtieken/signing-up-and-signing-in-users-in-django-with-django-allauth
  # ACCOUNT_AUTHENTICATION_METHOD = "username"
  
  INSTALLED_APPS = (
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'storages', # http://django-storages.readthedocs.org/en/latest/
      'polls',
      'discover',
      'hello',
      'upload', # from https://github.com/Widen/fine-uploader-server/blob/master/python/django-fine-uploader-s3/settings.py
      'south', # http://south.readthedocs.org/en/latest/tutorial/part1.html
      # The Django sites framework is required
      'django.contrib.sites',
  
      'allauth',
      'allauth.account',
      'allauth.socialaccount',
      # ... include the providers you want to enable:
  
      'allauth.socialaccount.providers.facebook',
  
      'allauth.socialaccount.providers.linkedin',
  
      'allauth.socialaccount.providers.twitter',
  
  )
  
  SITE_ID = 5 # this corresponds to "127.0.0.1:5000" since I use heroku's foreman start to run things locally
  # Not sure about this
  # check out https://searchcode.com/codesearch/view/263279/
  # I looked at tables. Ran "select * from django_site and it showed that awedify.org was id num 2
  # awedify.org # originally just the single character, 1
  # that from http://django-allauth.readthedocs.org/en/latest/installation.html
  
  # from http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html
  DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
  # Note I also specify boto in STATICFILES_STORAGE later down this file
  
  
  
  
  
  #    Added and removed when trying fineuploader
  ADMINS = (
      ('Mark', 'm@domain.com'),
      # ('Your Name', 'your_email@example.com'),
  )
  
  
  
  MIDDLEWARE_CLASSES = (
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  )
  
  ROOT_URLCONF = 'shareducate.urls'
  
  WSGI_APPLICATION = 'shareducate.wsgi.application'
  
  
  ALLOWED_HOSTS = ['*']
  
  TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),
           'polls/templates/polls',
           'upload/templates/upload',
           # 'polls/templates/polls',
           'messing/templates/messing',
           'discover/templates/discover',
           'allauth/templates/allauth',
          # or see http://djangosteps.wordpress.com/2013/09/19/setting-up-django-allauth/
  
  )
  
  # List of callables that know how to import templates from various sources.
  TEMPLATE_LOADERS = (
      'django.template.loaders.filesystem.Loader',
      'django.template.loaders.app_directories.Loader',
  #     'django.template.loaders.eggs.Loader',
  )
  
  
  EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' 
  # from http://stackoverflow.com/questions/21563227/django-allauth-example-errno-61-connection-refused
  </code></pre>
  
  <p>I have modified shareducate/urls.py
  <code>url(r'^accounts/', include('allauth.urls', namespace='allauth')),</code>
  but I haven't modified anything inside the allauth folder</p>
  
  <p>Note: by going to /admin, I can log in as the super user. Then sure enough, visiting /accounts/login redirected me to root /, as per <code>settings.py</code>
  And if I commented out that line, <code>#   LOGIN_REDIRECT_URL = '/'</code> then sure enough I would get directed to <code>/accounts/profile/</code> as per <code>http://stackoverflow.com/a/16956071/870121</code></p>
  
  <p>Now that I am logged out though (which I achieved via the /admin interface), the allauth program doesn't seem to be able to deal with me when I visit <code>/accounts/login</code></p>
  
  <p>Note /allauth/templates/account/login.html looks like this... I haven't edited it at all</p>
  
  <pre><code>{% extends "account/base.html" %}
  
  {% load i18n %}
  {% load account %}
  {% load url from future %}
  
  {% block head_title %}{% trans "Sign In" %}{% endblock %}
  
  {% block content %}
  
  &lt;h1&gt;{% trans "Sign In" %}&lt;/h1&gt;
  
  {% if socialaccount.providers  %}
  &lt;p&gt;{% blocktrans with site.name as site_name %}Please sign in with one
  of your existing third party accounts. Or, &lt;a href="{{ signup_url }}"&gt;sign up&lt;/a&gt;
  for a {{site_name}} account and sign in below:{% endblocktrans %}&lt;/p&gt;
  
  &lt;div class="socialaccount_ballot"&gt;
  
    &lt;ul class="socialaccount_providers"&gt;
      {% include "socialaccount/snippets/provider_list.html" with process="login" %}
    &lt;/ul&gt;
  
    &lt;div class="login-or"&gt;{% trans 'or' %}&lt;/div&gt;
  
  &lt;/div&gt;
  
  {% include "socialaccount/snippets/login_extra.html" %}
  
  {% else %}
  &lt;p&gt;{% blocktrans %}If you have not created an account yet, then please
  &lt;a href="{{ signup_url }}"&gt;sign up&lt;/a&gt; first.{% endblocktrans %}&lt;/p&gt;
  {% endif %}
  
  &lt;form class="login" method="POST" action="{% url 'account_login' %}"&gt;
    {% csrf_token %}
    {{ form.as_p }}
    {% if redirect_field_value %}
    &lt;input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /&gt;
    {% endif %}
    &lt;a class="button secondaryAction" href="{% url 'account_reset_password' %}"&gt;{% trans "Forgot Password?" %}&lt;/a&gt;
    &lt;button class="primaryAction" type="submit"&gt;{% trans "Sign In" %}&lt;/button&gt;
  &lt;/form&gt;
  
  {% endblock %}
  </code></pre>
  
  <p>GUESS</p>
  
  <p>(1)</p>
  
  <p>Based on this answer <code>http://stackoverflow.com/a/13202435/870121</code>
  I think I may have to modify line 109 in this allauth/accounts/views.py</p>
  
  <pre><code>84 class LoginView(RedirectAuthenticatedUserMixin,
   85                 AjaxCapableProcessFormViewMixin,
   86                 FormView):
   87     form_class = LoginForm
   88     template_name = "account/login.html"
   89     success_url = None
   90     redirect_field_name = "next"
   91 
   92     def get_form_class(self):
   93         return get_form_class(app_settings.FORMS, 'login', self.form_class)
   94 
   95     def form_valid(self, form):
   96         success_url = self.get_success_url()
   97         return form.login(self.request, redirect_url=success_url)
   98 
   99     def get_success_url(self):
  100         # Explicitly passed ?next= URL takes precedence
  101         ret = (get_next_redirect_url(self.request,
  102                                      self.redirect_field_name)
  103                or self.success_url)
  104         return ret
  105 
  106     def get_context_data(self, **kwargs):
  107         ret = super(LoginView, self).get_context_data(**kwargs)
  108         signup_url = passthrough_next_redirect_url(self.request,
  109                                                    reverse("account_signup"),
  110                                                    self.redirect_field_name)
  111         redirect_field_value = self.request.REQUEST \
  112             .get(self.redirect_field_name)
  113         ret.update({"signup_url": signup_url,
  114                     "site": Site.objects.get_current(),
  115                     "redirect_field_name": self.redirect_field_name,
  116                     "redirect_field_value": redirect_field_value})
  117         return ret
  118 
  119 login = LoginView.as_view()
  </code></pre>
  
  <p>You see it has the <code>reverse("account_signup")</code> with no extra arguments
  I have not edited this as I thought allauth was supposed to work out of the box and am relantant to break things by tinkering</p>
  
  <p>That line is highlighted in the full traceback error.
  Traceback:</p>
  
  <pre><code>File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/views/generic/base.py" in view
    69.             return self.dispatch(request, *args, **kwargs)
  File "/Users/macuser/Dropbox/code/heroku/awe01/getstartapp/allauth/account/views.py" in dispatch
    62.                                             **kwargs)
  File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
    87.         return handler(request, *args, **kwargs)
  File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/views/generic/edit.py" in get
    161.         return self.render_to_response(self.get_context_data(form=form))
  File "/Users/macuser/Dropbox/code/heroku/awe01/getstartapp/allauth/account/views.py" in get_context_data
    109.                                                    reverse("account_signup"),
  File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
    532.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
  File "/Users/macuser/Dropbox/code/heroku/awe01/lib/python2.7/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
    452.                              (lookup_view_s, args, kwargs, len(patterns), patterns))
  </code></pre>
  
  <p>(2) Is SITE_ID important for this, or just for social integration?</p>
  
  <p>Please advise of trouble-shooting steps which might make sense from here.  Thanks in advance, M</p>