from django.http import HttpResponseRedirect
from apps.core.models.ratelimit import RateLimitConfig


def beenLimited(request, a):
    try:
        link = RateLimitConfig.get_solo().rate_link
        if link:
            return HttpResponseRedirect(link)
        return HttpResponseRedirect('/')
    except:
        return HttpResponseRedirect('/')
