Commit 4026b800 authored by Enrico Zini's avatar Enrico Zini
Browse files

Stop using ratelimit decorator, and do not depend on django-ratelimit anymore

parent 2c23d0ab
......@@ -25,18 +25,6 @@ Debian earlier than Stretch, use the following procedure:
# install the package
dpkg -i ../python-django-housekeeping_0.1-1_all.deb
#### django-ratelimit
The ‘django-ratelimit’ library is not yet in Debian.
# https://github.com/jsocol/django-ratelimit
git clone https://github.com/jsocol/django-ratelimit.git
(you can either build the package from it or symlink the module directory
into the nm.debian.org sources)
Since I do not trust random stuff pulled via github, I performed a code
review of commit d58c489797405db348b30dec6103dcfff73160ec and it looks
safe to me (Enrico)
### Configuration
mkdir data # required by default settings
......
# coding: utf-8
# nm.debian.org website backend
#
# Copyright (C) 2012--2014 Enrico Zini <enrico@debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
Core models of the New Member site
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
......
# coding: utf-8
# nm.debian.org keyring access functions
#
# Copyright (C) 2012--2013 Enrico Zini <enrico@debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
Code used to list entries in keyrings
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
......
......@@ -24,7 +24,6 @@ from . import models as kmodels
from backend import models as bmodels
from django import http
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from ratelimit.decorators import ratelimit
import json
import time
......@@ -41,7 +40,6 @@ def json_response(val, status_code=200):
json.dump(val, res, cls=Serializer, indent=1)
return res
@ratelimit(method="GET", rate="3/m")
def keycheck(request, fpr):
"""
Web-based keycheck.sh implementation
......
......@@ -136,7 +136,6 @@ INSTALLED_APPS = [
# https://github.com/spanezz/django-housekeeping
'django_housekeeping',
'django_dacs',
'ratelimit',
'keyring',
'dsa',
'deblayout',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment