Ejemplo n.º 1
0
 def _organization_files(self):
     for path in directories.files_in(
         directories.organization_files_dir(self.project.organization)):
         yield {
             'type': 'Handleidingen e.d.',
             'filename': os.path.basename(path),
             'size': directories.human_size(path),
             'url': self._make_url('organization',
                                   self.project,
                                   None,
                                   path)
             }
Ejemplo n.º 2
0
 def _results_files(self):
     for contractor in self.project.contractor_set.all():
         if has_access(self.user, self.project, contractor):
             for path in directories.files_in(
                 directories.results_dir(self.project, contractor)):
                     yield {
                     'type': 'Resultaten {0}'.format(
                         contractor.organization.name),
                     'filename': os.path.basename(path),
                     'size': directories.human_size(path),
                     'url': self._make_url('results',
                                           self.project,
                                           contractor,
                                           path)
                     }
Ejemplo n.º 3
0
 def _shapefile_files(self):
     for contractor in self.project.contractor_set.all():
         if has_access(self.user, self.project, contractor):
             for path in directories.all_files_in(
                 directories.shapefile_dir(
                     self.project, contractor)):
                     yield {
                         'type': 'Ingevulde hydrovakken shapefile '.format(
                             contractor.organization.name),
                         'filename': os.path.basename(path),
                         'size': directories.human_size(path),
                         'url': self._make_url(
                             'contractor_hydrovakken', self.project,
                             contractor, path)
                     }