Commit e0173e2f authored by Okhin's avatar Okhin
Browse files

Update plugins and fix the decorators name for DRF and the way urlpattern are now loaded

parent 2314060a
from django_fsm import has_transition_perm, can_proceed
from rest_framework.decorators import detail_route
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
from rest_framework.response import Response
......@@ -7,7 +7,7 @@ import inspect
def get_transition_viewset_method(model, transition_name):
@action(methods=['post'], detail=True)
def inner_func(self, request, pk=None, *args, **kwargs):
object = self.get_object()
transition_method = getattr(object, transition_name)
......@@ -22,11 +22,11 @@ urlpatterns = [
url(r'^i18n/', include('django.conf.urls.i18n')),
url(r"^api/", include(router.urls, namespace="api")),
url(r"^feeds/", include("rp.feeds.urls", namespace="feeds")),
url(r"^rp/", include("rp.urls", namespace="rp")),
url(r"^api/", include((router.urls, "api"))),
url(r"^feeds/", include(("rp.feeds.urls", "feeds"))),
url(r"^rp/", include(("rp.urls", "rp"))),
url(r'^accounts/', include('allauth.urls')),
url(r"^users/", include('userprofile.urls', namespace="users")),
url(r"^users/", include(('userprofile.urls', "users"))),
url(r"^docs/api/", include_docs_urls(title="API de la revue de presse")),
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