コード例 #1
0
 def __init__(self, request, dates):
     try:
         self.location = Location.objects.get(
             pk=int(request.POST['drill_key']))
     except:
         self.location = Location.tree.root_nodes()[0]
     Report.__init__(self, request, dates)
コード例 #2
0
ファイル: reports.py プロジェクト: unicefuganda/rapidsms-emis
 def __init__(self, request, dates):
     try:
         self.location = get_location_for_user(request.user)
     except:
         pass
     if self.location is None:
         self.location = Location.tree.root_nodes()[0]
     Report.__init__(self, request, dates)
コード例 #3
0
 def __init__(self, request, dates):
     try:
         self.location = Location.objects.get(pk=int(request.POST['drill_key']))
     except:
         self.location = Location.tree.root_nodes()[0]
     Report.__init__(self, request, dates)