On Mon, Mar 28, 2016 at 2:49 AM, Deepanshu Sagar <deepansh...@gmail.com> wrote:
> Hello, > > I am getting below error while clicking on logout button on webpage: > > > Hmm, you cut off the interesting stuff underneath this section. The traceback information below is usually super helpful. > boardgames/url.py contains: > > > As mentioned in the other responses, an empty string should not be used in your regular expression list of URL's. It will match every single URL search, which is likely not what you want. You'll want to use just a '/' as others have suggested. However, if you only plan to have the single URL as part of your include, you may want to consider just importing the view from your app back into the above urls.py file and referencing it directly. You may also want to move that particular entry to the bottom of the list so that your auth URL's are searched first, in the event there is any overlap down the road. > main/urls.py and views.py are below. > > > Combine this with your boardgames/urls.py above, and the name of this URL is actually 'boardgames_home:home' give the URL namespacing you've created. I included this link in my other response, but I'll put it here for completeness: https://docs.djangoproject.com/en/1.9/topics/http/urls/#url-namespaces > > > This particular snippet doesn't appear to be relevant. The culprit causing the error is likely in your template code (probably a {% url 'home' %} tag). You'll need to either - Tweak your urls.py files to eliminate the namespacing (remove the name= reference on your include() URL. - Update your {% url %} and reverse() calls to include the namespace that you've provided ('boardgames_home:home'). -James -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWjnpmvKJ-rBRQekd-MGqhM4gJr1P%3DUeMcwBiGfRwkSng%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.