-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dynamic JavaScript trip list (#220)
This brings caves.app to version 2.0.1. See CHANGELOG.md for details.
- Loading branch information
Showing
25 changed files
with
1,943 additions
and
346 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
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from typing import Union | ||
|
||
from django.contrib.auth.models import AnonymousUser | ||
from django.http import HttpRequest | ||
from users.models import CavingUser | ||
|
||
|
||
def get_user(request: HttpRequest) -> CavingUser: | ||
assert request.user.is_authenticated | ||
assert isinstance(request.user, CavingUser) | ||
def get_user(request: HttpRequest) -> Union[AnonymousUser, CavingUser]: | ||
assert isinstance(request.user, (CavingUser, AnonymousUser)) | ||
return request.user |
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
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
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
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
Oops, something went wrong.