Question: I'm trying to make a view restricted unless login is done. Was following tuts+plus django unchained tutorial

However login\_required decorator somehow is not doing the job. What am I doing wrong?

that part at views.py (login\_required has been imported)

```
@login_required
def story(request):
    if request.method == "POST":
        form = StoryForm(request.POST)
        if form.is_valid():
                form.save()
                return HttpResponseRedirect('/')
    else:
        form = StoryForm()
    return render(request, 'stories/story.html', {'form': form})

```

no changes has been brought in urls.py. So I am hoping for an error where it can't find /login. But that somehow is not happening.

settings.py has LOGIN\_URL = "/login/"

Answer: 
I had the same issue. I cleared Chrome chache but it didn't work . Now i am running it on Firefox and its running correctly
Make sure your chrome browser has cleared all of the browsing data, mind that time range choice all time, and then you will solve this problem. I alse encountered this issue, after using Firefox to work well, I got it.