def get_object(self, request, project=None, url_path=None, model=None): self.model = model self.project = get_object_or_404(Project, url_path=url_pathify(project)) self.url_path = url_path self.object = self.model.objects.get(project=self.project, url_path=url_pathify(url_path))
def get_object(self, request, project = None): if project is not None: self.project = get_object_or_404(Project, url_path=url_pathify(project)) else: self.project = None
def get_object(self, request, project = None, url_path = None, model = None): self.model = model self.project = get_object_or_404(Project, url_path = url_pathify(project)) self.url_path = url_path self.object = self.model.objects.get(project = self.project, url_path = url_pathify(url_path))