Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mattia Rizzolo
nm.debian.org
Commits
4026b800
Commit
4026b800
authored
May 15, 2016
by
Enrico Zini
Browse files
Stop using ratelimit decorator, and do not depend on django-ratelimit anymore
parent
2c23d0ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
4026b800
...
...
@@ -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
...
...
backend/models.py
View file @
4026b800
# 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
...
...
keyring/models.py
View file @
4026b800
# 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
...
...
keyring/views.py
View file @
4026b800
...
...
@@ -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
...
...
nm2/settings.py
View file @
4026b800
...
...
@@ -136,7 +136,6 @@ INSTALLED_APPS = [
# https://github.com/spanezz/django-housekeeping
'django_housekeeping'
,
'django_dacs'
,
'ratelimit'
,
'keyring'
,
'dsa'
,
'deblayout'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment