Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (58 sloc) 3.07 KB
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib.auth.decorators import permission_required
from joiarara.produto.views import *
from joiarara.consignacao.views import *
from joiarara.pedido.views import *
from joiarara.revendedora.views import *
from joiarara.pastas.views import *
from joiarara.users.views import *
urlpatterns = patterns(
'',
url(r'^$', ProdutoListView.as_view()),
url(r'^add/$', ProdutoAddView.as_view()),
url(r'^(?P<pk>\d+)/$', ProdutoUpdateView.as_view()),
url(r'^delete/(?P<pk>\d+)/$', ProdutoDeleteView.as_view()),
url(r'^stock/today/$', permission_required('report.view')(ProdutoStockDayView.as_view())),
url(r'^stock/(?P<day>\d+\-\d+\-\d+)/$', permission_required('report.view')(ProdutoStockDayView.as_view())),
url(r'^stock/(?P<pk>\d+)/$', ProdutoStockView.as_view()),
url(r'^entrada/$', EntradaProdutoView.as_view()),
url(r'^relatorio/$', permission_required('report.view')(RelatorioView.as_view())),
url(r'^relatorio/completo/$', permission_required('report.view')(RelatorioCompletoView.as_view())),
url(r'^revendedoras/$', RevendedoraListView.as_view()),
url(r'^revendedoras/add/$', RevendedoraAddView.as_view()),
url(r'^revendedoras/(?P<pk>\d+)/$', RevendedoraUpdateView.as_view()),
url(r'^consignacoes/$', ConsignacaoListView.as_view()),
url(r'^consignacoes/add/$', ConsignacaoAddView.as_view()),
url(r'^consignacoes/attrib/(?P<pk>\d+)/$',
ConsignacaoAttribView.as_view()),
url(r'^consignacoes/produtos/(?P<pk>\d+)/$',
ConsignacaoProdutosView.as_view()),
url(r'^consignacoes/print/(?P<pk>\d+)/$',
ConsignacaoPrintView.as_view()),
url(r'^consignacoes/finish/(?P<pk>\d+)/$',
ConsignacaoFinishView.as_view()),
url(r'^consignacoes/detail/(?P<pk>\d+)/$',
ConsignacaoDetailView.as_view()),
url(r'^consignacoes/by-product/(?P<product_pk>\d+)/$',
ConsignacaoListByProductView.as_view()),
url(r'^pedidos/$', PedidoListView.as_view()),
url(r'^pedidos/add/$', PedidoAddView.as_view()),
url(r'^pedidos/produtos/(?P<pk>\d+)/$',
PedidoProdutosView.as_view()),
url(r'^pedidos/print/(?P<pk>\d+)/$',
PedidoPrintView.as_view()),
url(r'^pedidos/finish/(?P<pk>\d+)/$',
PedidoFinishView.as_view()),
url(r'^pedidos/detail/(?P<pk>\d+)/$',
PedidoDetailView.as_view()),
url(r'^pastas/$', ListPastaView.as_view()),
url(r'^pastas/add/$', AddPastaView.as_view()),
url(r'^users/$', permission_required('users.view')(ListUsersView.as_view())),
url(r'^users/add/$', permission_required('users.add')(AddUserView.as_view())),
url(r'^users/(?P<pk>\d+)/$', permission_required('users.update')(UpdateUserView.as_view())),
url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login'),
url(r'^static/(.*)', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT, 'show_indexes': True})
)