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

Use CBV #34

Merged
merged 4 commits into from
Feb 23, 2016
Merged

Use CBV #34

merged 4 commits into from
Feb 23, 2016

Conversation

arthur-wsw
Copy link

Replace current view with a CBV
Django-brace has been used to handle ajax in view

Fixes #33

Replace current view with a CBV
Django-brace has been used to handle ajax in view

Fixes #33

from django.http import HttpResponse, HttpResponseForbidden
from django.shortcuts import get_object_or_404, redirect
from django.contrib.auth.decorators import login_required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use DUA's login_required decorator if DUA is installed and fall back to contrib auth's version. However, since we are doing CBVs, we should use DUA's account.mixins.LoginRequiredMixin if available, otherwise fall back.

@arthur-wsw
Copy link
Author

Since DUA LoginRequiredMixins with fallback has been added i think it should also close issue :
Use DUA's login_required decorator

Closes #26

paltman added a commit that referenced this pull request Feb 23, 2016
@paltman paltman merged commit 3e8b90c into pinax:master Feb 23, 2016
@arthur-wsw arthur-wsw deleted the CBV branch February 24, 2016 11:10
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

Successfully merging this pull request may close these issues.

2 participants