This repository has been archived by the owner on Sep 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- old Map.public behaviour replaced by Map.objects.visible(self.request)
- Loading branch information
Showing
2 changed files
with
7 additions
and
8 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from django.contrib.gis.db import models | ||
from django.db.models import Q | ||
|
||
class MapManager(models.GeoManager): | ||
def visible(self, request): | ||
filter = Q(share_status=self.model.PUBLIC) | ||
|
||
class PublicManager(models.GeoManager): | ||
|
||
def get_queryset(self): | ||
return super(PublicManager, self).get_queryset().filter( | ||
share_status=self.model.PUBLIC) | ||
return self.filter(filter) |
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