Permalink
Browse files

Bugfix: Entries missing a parent.

  • Loading branch information...
1 parent f3f3200 commit 4e6c5771363c65b9f9fd3f6b6fdadf2e82e0e216 @alfredo alfredo committed Sep 12, 2012
Showing with 15 additions and 6 deletions.
  1. +1 −1 apps/challenges/admin.py
  2. +4 −2 apps/challenges/models.py
  3. +9 −2 settings_local.py-dist
  4. +1 −1 vendor-local/src/django-haystack
@@ -190,7 +190,7 @@ def mark_as_winner(modeladmin, request, queryset):
class SubmissionAdmin(admin.ModelAdmin):
model = Submission
- list_display = ('title', 'created_by', 'category', 'phase',
+ list_display = ('title', 'created_by', 'category', 'phase', 'parent',
'is_draft', 'is_winner', 'excluded', 'score',
'judge_assignment', 'judgement_count')
list_filter = ('category', 'is_draft', 'is_winner', 'phase__name',
@@ -404,8 +404,10 @@ def phase_slug(self):
def get_absolute_url(self):
"""Return this submission's URL."""
- return self._lookup_url('entry_show', {'entry_id': self.parent_slug,
- 'phase': self.phase_slug})
+ 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."""
@@ -54,7 +54,7 @@ CACHES = {
}
# Browser ID performs the assertion with this url e.g. http://localhost:8000
-SITE_URL = 'https://local.mozillaignite.org'
+SITE_URL = 'http://local.mozillaignite.org'
SESSION_COOKIE_SECURE = False
SESSION_COOKIE_HTTPONLY = False
@@ -86,4 +86,11 @@ HAYSTACK_CONNECTIONS = {
},
}
-EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
+EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
+
+# Create the these directories off media and set to 755 so the app can access them
+USER_AVATAR_PATH = 'img/uploads/avatars/'
+TOPIC_IMAGE_PATH = 'img/uploads/topics/'
+PROJECT_IMAGE_PATH = 'img/uploads/projects/'
+EVENT_IMAGE_PATH = 'img/uploads/events/'
+CHALLENGE_IMAGE_PATH = 'img/uploads/challenges/'

0 comments on commit 4e6c577

Please sign in to comment.