[go: up one dir, main page]

Menu

[r1823]: / trunk / cmbarter / urls.py  Maximize  Restore  History

Download this file

118 lines (109 with data), 7.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
## The author disclaims copyright to this source code. In place of
## a legal notice, here is a poem:
##
## "Metaphysics"
##
## Matter: is the music
## of the space.
## Music: is the matter
## of the soul.
##
## Soul: is the space
## of God.
## Space: is the soul
## of logic.
##
## Logic: is the god
## of the mind.
## God: is the logic
## of bliss.
##
## Bliss: is a mind
## of music.
## Mind: is the bliss
## of the matter.
##
######################################################################
## This file defines the urls for the whole django-project.
##
from django.conf.urls.defaults import *
from django.views.defaults import page_not_found
from django.views.generic.simple import redirect_to
from django.conf import settings
urlpatterns = patterns('',
(r'^$', redirect_to, {'url': '/login/'}),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.CMBARTER_DEV_STATIC_ROOT }),
)
urlpatterns += patterns('cmbarter.users.views',
url(r'^login/$', 'login', {'tmpl': 'login.html'}, name='users-login'),
(r'^login-captcha/$', 'login_captcha', {'tmpl': 'login_captcha.html'}),
(r'^about/$', 'show_about', {'tmpl': 'about.html'}),
(r'^about/([a-z-]{2,5})/$', 'set_language'),
(r'^signup/$', 'signup', {'tmpl': 'signup.html'}),
(r'^search/(\d{1,9})/$', 'search', {'tmpl': 'search.html'}),
(r'^(\d{1,9})/logout/$', 'logout'),
(r'^(\d{1,9})/$', 'show_trader'),
(r'^(\d{1,9})/signup-success/$', 'report_signup_success', {'tmpl': 'signup_success.html'}),
url(r'^(\d{1,9})/create-profile/$', 'create_profile', {'tmpl': 'create_profile.html'}, name='users-profile'),
)
urlpatterns += patterns('cmbarter.profiles.views',
url(r'^(\d{1,9})/traders/(\d{1,9})/$', 'show_profile', {'tmpl': 'contact_information.html'}, name='profiles-trader'),
(r'^(\d{1,9})/traders/(\d{1,9})/add-to-partners/$', 'add_partner', {'tmpl': 'add_partner.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/images/(\d{1,9})/$', 'show_image'),
(r'^(\d{1,9})/traders/$', 'find_trader', {'tmpl': 'find_trader.html'}),
(r'^(\d{1,9})/find-partner/$', 'find_trader', {'tmpl': 'find_partner.html'}),
(r'^(\d{1,9})/edit-profile/$', 'edit_profile', {'tmpl': 'edit_contact_information.html'}),
(r'^(\d{1,9})/upload-photograph/$', 'upload_photograph', {'tmpl': 'upload_photograph.html'}),
(r'^(\d{1,9})/change-password/$', 'change_password', {'tmpl': 'change_password.html'}),
(r'^(\d{1,9})/change-password/success/$', 'report_change_password_success', {'tmpl': 'change_password_success.html'}),
(r'^(\d{1,9})/partners/$', 'show_partners', {'tmpl': 'partners.html'}),
(r'^(\d{1,9})/partners/(\d{1,9})/remove/$', 'remove_partner', {'tmpl': 'remove_partner.html'}),
(r'^(\d{1,9})/partners/(\d{1,9})/suggested-partners/$', 'show_suggested_partners', {'tmpl': 'suggested_partners.html'}),
url(r'^static/no_img.png$', page_not_found, name='profiles-no-image'),
)
urlpatterns += patterns('cmbarter.products.views',
url(r'^(\d{1,9})/pricelist/$', 'update_pricelist', {'tmpl': 'pricelist.html'}, name='products-pricelist'),
(r'^(\d{1,9})/pricelist/(\d{1,9})/remove/$', 'remove_pricelist_item'),
(r'^(\d{1,9})/pricelist/success/(\d{1,9})/$', 'report_update_pricelist_success', {'tmpl': 'pricelist_success.html'}),
(r'^(\d{1,9})/pricelist/new/$', 'create_product', {'tmpl': 'create_product.html'}),
(r'^(\d{1,9})/pricelist/new/success/$', 'report_create_product_success', {'tmpl': 'create_product_success.html'}),
url(r'^(\d{1,9})/shopping-list/$', 'update_shopping_list', {'tmpl': 'shopping_list.html'}, name='products-shopping-list'),
(r'^(\d{1,9})/shopping-list/success/(\d{1,9})/$', 'report_update_shopping_list_success', {'tmpl': 'shopping_list_success.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/products/(\d{1,9})/$', 'show_product', {'tmpl': 'product.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/products/(\d{1,9})/add/$', 'add_shopping_list_item'),
url(r'^(\d{1,9})/traders/(\d{1,9})/unknown-product/$', 'show_unknown_product', {'tmpl': 'unknown_product.html'}, name='products-unknown-product'),
url(r'^(\d{1,9})/partners/(\d{1,9})/$', 'show_partner_pricelist', {'tmpl': 'partner_pricelist.html'}, name='products-partner-pricelist'),
)
urlpatterns += patterns('cmbarter.deposits.views',
url(r'^(\d{1,9})/unconfirmed-transactions/$', 'show_unconfirmed_transactions', {'tmpl': 'unconfirmed_transactions.html'}, name='deposits-unconfirmed-transactions'),
(r'^(\d{1,9})/unconfirmed-transactions/confirmation/(\d{1,9})/$', 'report_transactions_confirmation', {'tmpl': 'transactions_confirmation.html'}),
(r'^(\d{1,9})/find-customer/$', 'find_customer', {'tmpl': 'find_customer.html'}),
(r'^(\d{1,9})/transaction-commit/$', 'report_transaction_commit', {'tmpl': 'transaction_commit.html'}),
(r'^(\d{1,9})/receipt/$', 'show_unconfirmed_receipts', {'tmpl': 'unconfirmed_receipt.html'}),
(r'^(\d{1,9})/receipt/confirmation/$', 'report_receipts_confirmation', {'tmpl': 'receipt_confirmation.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/deposits/$', 'show_deposits', {'tmpl': 'deposits.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/deposits/new/$', 'make_deposit', {'tmpl': 'make_deposit.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/deposits/(\d{1,9})/$', 'make_withdrawal', {'tmpl': 'make_withdrawal.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/transactions/$', 'show_customer_transactions', {'tmpl': 'customer_transactions.html'}),
(r'^(\d{1,9})/partners/(\d{1,9})/transactions/$', 'show_partner_transactions', {'tmpl': 'partner_transactions.html'}),
)
urlpatterns += patterns('cmbarter.orders.views',
(r'^(\d{1,9})/orders/$', 'show_my_order_list', {'tmpl': 'my_orders.html'}),
(r'^(\d{1,9})/orders/(\d{1,9})/$', 'show_my_order', {'tmpl': 'my_order.html'}),
(r'^(\d{1,9})/orders/(\d{1,9})/deleted/$', 'report_my_order_deleted', {'tmpl': 'my_order_deleted.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/orders/$', 'show_customer_order_list', {'tmpl': 'customer_orders.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/orders/(\d{1,9})/$', 'review_customer_order', {'tmpl': 'customer_order.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/products/(\d{1,9})/order/$', 'create_order', {'tmpl': 'create_order.html'}),
(r'^(\d{1,9})/traders/(\d{1,9})/products/(\d{1,9})/payments/$', 'show_payments', {'tmpl': 'pending_payments.html'}),
)
urlpatterns += patterns('cmbarter.deals.views',
(r'^(\d{1,9})/customer-deals/(\d{1,4})-(\d{1,2})-(\d{1,2})/$', 'show_customer_deals', {'tmpl': 'customer_deals.html'}),
(r'^(\d{1,9})/customer-deals/$', 'show_todays_customer_deals'),
(r'^(\d{1,9})/my-deals/(\d{1,4})-(\d{1,2})-(\d{1,2})/$', 'show_my_deals', {'tmpl': 'my_deals.html'}),
(r'^(\d{1,9})/my-deals/$', 'show_my_todays_deals'),
(r'^(\d{1,9})/completed-deals/$', 'show_unconfirmed_deals', {'tmpl': 'unconfirmed_deals.html'}),
(r'^(\d{1,9})/completed-deals/confirmation/(\d{1,9})/$', 'report_deals_confirmation', {'tmpl': 'deals_confirmation.html'}),
)