Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Merging up from dev to stage #125

Merged
merged 2 commits into from Jan 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions apps/challenges/models.py
Expand Up @@ -413,15 +413,20 @@ def phase_slug(self):
return 'apps'

def get_absolute_url(self):
"""Return this submission's URL."""
"""
Return this submission's URL
"""
if self.parent_slug and self.phase_slug:
return self._lookup_url('entry_show', {'entry_id': self.parent_slug,
'phase': self.phase_slug})
return u''

def get_edit_url(self):
"""Return the URL to edit this submission."""
return self._lookup_url('entry_edit', {'pk': self.id,
"""
Return the URL to edit this submission, we need to use the submission
parent as that is what holds the key of which submission to edit
"""
return self._lookup_url('entry_edit', {'pk': self.parent_slug,
'phase': self.phase_slug})

def get_delete_url(self):
Expand Down