Example #1
0
#from django.conf.urls.defaults import *
from django.conf.urls.defaults import patterns, url
from djangoextension.djangorestframework.views import ListOrCreateModelView, InstanceModelView, ModelView, ListModelView, ListOrCreateModelUserView
from resources import AccountsResource, TransactionsResource

from views import *
from django.conf import settings
import django.contrib.auth.views


urlpatterns = patterns('djangoextension.financial.views',
    url(r'index/$', "financial_index", name='financial_index'),
    url(r'faccounts/create/$', "account_create_view", name='account_create'),
    url(r'faccounts/$', "account_list_view", name='account_list'),
    url(r'ftrans/$', "transaction_list_view", name='transaction_list'),
    url(r'ftrans/list/$', "Transaction_list_view2", name='transaction_list2'),
    url(r'ftrans/comission/$', "Transaction_list_comission", name='comission'),
    url(r'ftrans/transfer/$', "Transaction_list_transfer", name='internal_transfer'),
    url(r'ftrans/list/search/$', "Transaction_list_view_search", name='transaction_list_search'),
    url(r'faccount/list/$', "Account_list_view", name='transaction_list2'),
    url(r'faccount/list/search/$', "Account_list_view_search", name='transaction_list_search'),
    )

urlpatterns += patterns('',
    url(r'faccounts/api/$', ListOrCreateModelUserView.as_view(resource=AccountsResource), name='account-root'),
    url(r'faccounts/api/(?P<id>[^/]+)/$', InstanceModelView.as_view(resource=AccountsResource), name='account-post'),
    url(r'ftrans/api/$', ListModelView.as_view(resource=TransactionsResource), name='transaction-root'),
    url(r'ftrans/api/(?P<id>[^/]+)/$', InstanceModelView.as_view(resource=TransactionsResource), name='transaction-post'),
)

Example #2
0
#from django.conf.urls.defaults import *
from django.conf.urls.defaults import patterns, url
from djangoextension.djangorestframework.views import ListOrCreateModelView, InstanceModelView, ModelView, ListModelView, ListOrCreateModelUserView
from resources import ItemProductResource

from views import *
from django.conf import settings
import django.contrib.auth.views


urlpatterns = patterns('manufacture.views',
    url(r'products/create/$', "Product_create_view", name='product_create'),
    url(r'manufacturers/create/$', "Manufacturer_create_view", name='Manufacturer_create'),
    url(r'products/create/batch$', "Product_create_batch_view", name='product_create_batch'),
    url(r'products/$', "Product_list_view", name='product_list'),
    url(r'products/null/$', ListOrCreateModelView.as_view(resource=ItemProductResource), name='product_list2'),
    )

urlpatterns += patterns('',
    url(r'products/api/$', ListOrCreateModelView.as_view(resource=ItemProductResource), name='product-root'),
    url(r'products/api/(?P<id>[^/]+)/$', InstanceModelView.as_view(resource=ItemProductResource), name='product-post'),

)

Example #3
0
#from django.conf.urls.defaults import *
from django.conf.urls.defaults import patterns, url
from djangoextension.djangorestframework.views import ListOrCreateModelView, InstanceModelView, ModelView, ListModelView, ListOrCreateModelUserView
from resources import ItemTemplateResource

from views import *
from django.conf import settings
import django.contrib.auth.views


urlpatterns = patterns('supply.views',
    url(r'supplies/create/$', "Supplies_create_view", name='supplies_create'),
    url(r'items/create/$', "items_create_view", name='items_create'),
    url(r'supplies/create/batch$', "Supplies_create_batch_view", name='supplies_create_batch'),
    url(r'supplies/create/search.*/$', "Supplies_create_search_view", name='supplies_create_search'),
    url(r'supplies/create/post/$', "Supplies_create_search_view_post", name='supplies_create_search_post'),
    url(r'add/$', "Supplies_add_view", name='supplies_add_view'),
    url(r'add/local.*/$', "Supplies_add_view_local", name='supplies_add_view_local'),
    url(r'add/search.*/$', "Supplies_add_view_search", name='supplies_add_view_search'),
    url(r'index/$', "Supplies_index_view", name='supplies_index'),
    )

urlpatterns += patterns('',
    url(r'supplies/api/$', ListOrCreateModelView.as_view(resource=ItemTemplateResource), name='product-root'),
    url(r'supplies/api/(?P<id>[^/]+)/$', InstanceModelView.as_view(resource=ItemTemplateResource), name='product-post'),

)