-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d1393c
commit 19c94a2
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from accounts.middleware import LoginRequiredMiddleware | ||
|
||
class CustomLoginMiddleware(LoginRequiredMiddleware): | ||
def add_new_exempt_urls(self): | ||
exempt_urls = [] | ||
|
||
self.EXEMPT_URLS.extend(exempt_urls) | ||
# EXAMPLE USAGE | ||
# self.EXEMPT_URLS.append(r"^accounts/new_exempt_url/$") | ||
# This can be overriden in the subclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters