Skip to content

Commit

Permalink
Reintroduced redirect to donate page on path /donate
Browse files Browse the repository at this point in the history
This was requested in #524 and later implemented, but was removed when merging donations pull request #774
  • Loading branch information
ffont committed Jan 23, 2017
1 parent f52c6bd commit f146048
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion donations/views.py
Expand Up @@ -5,7 +5,7 @@
from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.conf import settings
from django.http import HttpResponse, JsonResponse
from django.http import HttpResponse, JsonResponse, HttpResponseRedirect
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.views.generic import ListView
Expand Down Expand Up @@ -93,3 +93,7 @@ class DonationsList(ListView):
model = Donation
paginate_by = settings.DONATIONS_PER_PAGE
ordering = ["-created"]


def donate_redirect(request):
return HttpResponseRedirect(reverse('donate'))
2 changes: 2 additions & 0 deletions freesound/urls.py
Expand Up @@ -34,6 +34,7 @@
import bookmarks.views
import follow.views
import general.views
import donations.views
from utils.tagrecommendation_utilities import *
from apiv2.apiv2_utils import apiv1_end_of_life_message

Expand Down Expand Up @@ -141,6 +142,7 @@
accounts.views.crash_me,
name="crash-me"),

url(r'^donate/', donations.views.donate_redirect, name="donate-redirect"),
url(r'^s/(?P<sound_id>\d+)/$', sounds.views.sound_short_link, name="short-sound-link"),

# old url format redirects
Expand Down

0 comments on commit f146048

Please sign in to comment.