# -*- coding: utf-8 -*-
#
# Copyright 2015, Foxugly. All rights reserved.
#
# 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.

from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from categories.views import add_documents, list_documents, view_form, view_category

urlpatterns = (
    url(r'^(?P<category_id>[0-9]+)/add_documents/$', login_required(add_documents), name='add_documents'),
    url(r'^(?P<category_id>[0-9]+)/list/(?P<n>[0-9]+)/$', login_required(list_documents), name='list_documents'),

    url(r'^(?P<category_id>[0-9]+)/form/(?P<field>[0-9]+)/(?P<sens>[a-z]+)/(?P<n>[0-9]+)/$', login_required(view_form),
        name='view_forms'),
    url(r'^(?P<category_id>[0-9]+)/$', login_required(view_category), name='view_category'),
)

@@ -528,37 +528,32 @@
   url(r'%5E(?P%3Ccat
-egory
 _id%3E%5B0-9%5D+)/add_
@@ -630,37 +630,32 @@
   url(r'%5E(?P%3Ccat
-egory
 _id%3E%5B0-9%5D+)/list
@@ -740,37 +740,32 @@
   url(r'%5E(?P%3Ccat
-egory
 _id%3E%5B0-9%5D+)/form
@@ -891,21 +891,16 @@
 %5E(?P%3Ccat
-egory
 _id%3E%5B0-9

Update urls.py