Every article object has a special directory to store data in from initialization to garbage collection
(self)
| 341 | os.mkdir(res_path) |
| 342 | |
| 343 | def get_resource_path(self): |
| 344 | """Every article object has a special directory to store data in from |
| 345 | initialization to garbage collection |
| 346 | """ |
| 347 | res_dir_fn = 'article_resources' |
| 348 | resource_directory = os.path.join(settings.TOP_DIRECTORY, res_dir_fn) |
| 349 | if not os.path.exists(resource_directory): |
| 350 | os.mkdir(resource_directory) |
| 351 | dir_path = os.path.join(resource_directory, '%s_' % self.link_hash) |
| 352 | return dir_path |
| 353 | |
| 354 | def release_resources(self): |
| 355 | # TODO: implement in entirety |
no test coverage detected