admin_views.py 989 Bytes
Newer Older
Arnaud Fabre's avatar
Arnaud Fabre committed
1
2
# coding: utf-8

3
# This file is part of mempol.
Arnaud Fabre's avatar
Arnaud Fabre committed
4
#
5
# mempol is free software: you can redistribute it and/or modify
Arnaud Fabre's avatar
Arnaud Fabre committed
6
7
8
9
# 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 any later version.
#
10
# mempol is distributed in the hope that it will
Arnaud Fabre's avatar
Arnaud Fabre committed
11
12
13
14
15
16
17
18
19
20
21
# 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 General Affero Public
# License along with django-representatives.
# If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2015 Arnaud Fabre <af@laquadrature.net>
from __future__ import absolute_import

22
23
24
from django.shortcuts import redirect

from .tasks import representatives_update_all as rpr_update_task
Arnaud Fabre's avatar
Arnaud Fabre committed
25
26


27
28
29
def representatives_update_all(request):
    rpr_update_task.delay()
    return redirect('/admin')