title: NoReverseMatch at /accounts/home_page/
body: <pre><code>#Reverse for 'user_profile_view' with arguments '(u'Emmanuel',)' and keyword arguments '{}' not found. 0 pattern(s) tried: [] :
  
  #project/urls.py:
          from django.conf.urls import url, include
          from django.contrib import admin
          from django.conf import settings
          from django.conf.urls.static import static
  
          urlpatterns = [
                url(r'^admin/', admin.site.urls),
                url(r'^accounts/', include('registration.backends.default.urls')),
                url(r'', include('app.urls', namespace='app')),
            ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  
  
  
   #app/urls.py
  
          from .views import *
          from . import views
          from django.conf import settings
          from django.conf.urls import url
          from django.views.generic import TemplateView
          from django.conf.urls.static import static
  
          app_name = 'app'
          urlpatterns = [
                url(r'^$', views.IndexView.as_view(), name='index'),
                url(r'^accounts/home_page/$', home_page),
                url(r'^accounts/home_page/(?P&lt;username&gt;[\w-]+)/$', UserProfileView.as_view(), name='user_profile_view'),
                        # url(r'^accounts/profile/$', views.user_profile, name='user_profile'),
                # url(r'^accounts/profile/edit/$', views.edit_user_profile,
                #    name='edit_user_profile'),
                    ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  
  
  #views.py
  
          class UserProfileView(View):
          @method_decorator(login_required)
          def get(self, request, user):
              if request.user.username == user:
                  profile = get_object_or_404(User, user=request.user)
                  return render(request, 'registration/home.html', {'profile': profile})
              else:
                  raise Http404
  
  
            @login_required
            def home_page(request):
                return HttpResponseRedirect(
                    reverse('user_profile_view', args=[request.user.username],    current_app='app'))
  </code></pre>
  
  <p>So what I'm actually trying to do is allow a user login with is name appearing in the url but since the LOGIN_REDIRECT_URL = '/accounts/home_page' cannot take a dynamic parameter like  I am using a redirect. But I get this error please what am I doing wrong.
  Thanks in advance!!!</p>