Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthorListView didn't return an HttpResponse object error #12

Open
Mirdalan opened this issue Dec 4, 2016 · 0 comments
Open

AuthorListView didn't return an HttpResponse object error #12

Mirdalan opened this issue Dec 4, 2016 · 0 comments

Comments

@Mirdalan
Copy link

Mirdalan commented Dec 4, 2016

Po konfiguracji wymogu zalogowania dla widoku autorów, otrzymuję błąd jak w tytule.

Rozwiązanie problemu znalazłem tutaj:
http://stackoverflow.com/questions/29744637/django-class-view-didnt-return-an-httpresponse-object-it-returned-none-instead

Wykorzystana w kursie przeciążona metoda dispatch nie zwraca żadnej wartości. W moim przypadku dodanie instrukcji return załatwiło sprawę. Rozwiązanie poniżej.

kurs_django/shelf/views.py linie 20:22

@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
    return super(AuthorListView, self).dispatch(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant