from __future__ import unicode_literals from django.conf.urls import patterns, url from django.views.generic.base import RedirectView from postman import OPTIONS from postman.views import (InboxView, SentView, ArchivesView, TrashView, WriteView, ReplyView, MessageView, ConversationView, ArchiveView, DeleteView, UndeleteView) urlpatterns = patterns( '', url(r'^$', RedirectView.as_view(url='inbox/'), name='index'), url(r'^inbox/(?:(?P<option>'+OPTIONS+')/)?$', InboxView.as_view(template_name="vnoimessages/inbox.html", view_name="message:inbox"), name='inbox'), url(r'^sent/(?:(?P<option>'+OPTIONS+')/)?$', SentView.as_view(template_name="vnoimessages/sent.html", view_name='message:sent'), name='sent'), url(r'^archives/(?:(?P<option>'+OPTIONS+')/)?$', ArchivesView.as_view(template_name="vnoimessages/archives.html", view_name="message:archives"), name='archives'), url(r'^trash/(?:(?P<option>'+OPTIONS+')/)?$', TrashView.as_view(template_name='vnoimessages/trash.html', view_name="message:trash"), name='trash'), url(r'^write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(template_name='vnoimessages/write.html'), name='write'), url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(template_name='vnoimessages/reply.html'), name='reply'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(template_name='vnoimessages/view.html'), name='view'), url(r'^view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(template_name="vnoimessages/view.html"), name='view_conversation'), url(r'^archive/$', ArchiveView.as_view(), name='archive'), url(r'^delete/$', DeleteView.as_view(), name='delete'), url(r'^undelete/$', UndeleteView.as_view(), name='undelete'), (r'^$', RedirectView.as_view(url='inbox/')), )
...View.as_view(success_url='postman:inbox'), name='reply'), ...View.as_view(formatters=(format_subject, format_body)), name='reply'), ...View.as_view(formatters=(format_subject, format_body)), name='view'), """ from __future__ import unicode_literals from django.conf.urls import url from django.views.generic.base import RedirectView from postman import OPTIONS from postman.views import (InboxView, SentView, ArchivesView, TrashView, WriteView, ReplyView, MessageView, ConversationView, ArchiveView, DeleteView, UndeleteView) urlpatterns = [ url(r'^inbox/(?:(?P<option>'+OPTIONS+')/)?$', InboxView.as_view(), name='inbox'), url(r'^sent/(?:(?P<option>'+OPTIONS+')/)?$', SentView.as_view(), name='sent'), url(r'^archives/(?:(?P<option>'+OPTIONS+')/)?$', ArchivesView.as_view(), name='archives'), url(r'^trash/(?:(?P<option>'+OPTIONS+')/)?$', TrashView.as_view(), name='trash'), url(r'^write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(), name='write'), url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(), name='reply'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(), name='view'), url(r'^view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(), name='view_conversation'), url(r'^archive/$', ArchiveView.as_view(), name='archive'), url(r'^delete/$', DeleteView.as_view(), name='delete'), url(r'^undelete/$', UndeleteView.as_view(), name='undelete'), url(r'^$', RedirectView.as_view(url='inbox/', permanent=True)), ]
'postman.views', url(r'^inbox/(?:(?P<option>' + OPTIONS + ')/)?$', InboxView.as_view(template_name='messages/inbox.html'), name='postman_inbox'), url(r'^sent/(?:(?P<option>' + OPTIONS + ')/)?$', SentView.as_view(template_name='messages/sent.html'), name='postman_sent'), url(r'^archives/(?:(?P<option>' + OPTIONS + ')/)?$', ArchivesView.as_view(template_name='messages/archives.html'), name='postman_archives'), url(r'^trash/(?:(?P<option>' + OPTIONS + ')/)?$', TrashView.as_view(template_name='messages/trash.html'), name='postman_trash'), url(r'^write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(template_name='messages/write.html'), name='postman_write'), url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(template_name='messages/reply.html'), name='postman_reply'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(template_name='messages/view.html'), name='postman_view'), url(r'^view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(template_name='messages/view.html'), name='postman_view_conversation'), url(r'^archive/$', ArchiveView.as_view(), name='postman_archive'), url(r'^delete/$', DeleteView.as_view(), name='postman_delete'), url(r'^undelete/$', UndeleteView.as_view(), name='postman_undelete'), (r'^$', RedirectView.as_view(url='inbox/')), )
InboxView.as_view(), name='inbox'), url(r'^sent/(?:(?P<option>' + OPTIONS + ')/)?$', SentView.as_view(), name='sent'), url(r'^archives/(?:(?P<option>' + OPTIONS + ')/)?$', ArchivesView.as_view(), name='archives'), url(r'^trash/(?:(?P<option>' + OPTIONS + ')/)?$', TrashView.as_view(), name='trash'), url(r'^write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(), name='write'), url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(), name='reply'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(), name='view'), url(r'^view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(), name='view_conversation'), url(r'^archive/$', ArchiveView.as_view(), name='archive'), url(r'^delete/$', DeleteView.as_view(), name='delete'), url(r'^undelete/$', UndeleteView.as_view(), name='undelete'), (r'^$', RedirectView.as_view(url='inbox/', permanent=True)), # Customized set # 'success_url' url(r'^write_sent/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(success_url='postman:sent'), name='write_with_success_url_to_sent'), url(r'^reply_sent/(?P<message_id>[\d]+)/$', ReplyView.as_view(success_url='postman:sent'),
UnbookmarkView) urlpatterns = [ url(r'^inbox/(?:(?P<option>' + OPTIONS + ')/)?$', InboxView.as_view(), name='inbox'), url(r'^sent/(?:(?P<option>' + OPTIONS + ')/)?$', SentView.as_view(), name='sent'), url(r'^archives/(?:(?P<option>' + OPTIONS + ')/)?$', ArchivesView.as_view(), name='archives'), url(r'^important/(?:(?P<option>' + OPTIONS + ')/)?$', BookmarksView.as_view(), name='bookmarks'), #url(r'^trash/(?:(?P<option>'+OPTIONS+')/)?$', TrashView.as_view(), name='trash'), #url(r'^write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(), name='write'), url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(), name='reply'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(), name='view'), url(r'^view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(), name='view_conversation'), url(r'^bookmark/$', BookmarkView.as_view(), name='bookmark'), url(r'^unbookmark/$', UnbookmarkView.as_view(), name='unbookmark'), url(r'^archive/$', ArchiveView.as_view(), name='archive'), url(r'^unarchive/$', UnarchiveView.as_view(), name='archive'), url(r'^delete/$', DeleteView.as_view(), name='delete'), url(r'^undelete/$', UndeleteView.as_view(), name='undelete'), url(r'^$', RedirectView.as_view(url='inbox/', permanent=True)), ]
url(r'^timeline/item/$', api.ItemTimeline.as_view(), name='item-timeline'), url(r'^timeline/user/$', api.UserTimeline.as_view(), name='user-timeline'), url(r'^images/$', api.ImageList.as_view(), name='image_list'), url(r'^images/(?P<pk>[a-z0-9]+)/$', api.ImageDetail.as_view(), name='image_detail'), url(r'^attendants/$', api.AttendentList.as_view(), name='attendant_list'), ) # postman URL urlpatterns += patterns( "postman", url(r'^user/inbox/(?:(?P<option>' + OPTIONS + ')/)?$', InboxView.as_view(), name='inbox'), url(r'^user/reply/(?P<message_id>[[a-z0-9]]+)/$', ReplyView.as_view(), name='reply'), url(r'^user/view/(?P<message_id>[[a-z0-9]]+)/$', MessageView.as_view(), name='view'), url(r'^user/view/t/(?P<thread_id>[[a-z0-9]]+)/$', ConversationView.as_view(), name='view_conversation'), ) urlpatterns += patterns( "", (r'^user/', include('allauth.urls')), )
from usc_app import views from postman.views import WriteView, MessageView, ConversationView, InboxView urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^rosters', views.roster_table, name='rosters'), url(r'^search', views.search, name='search'), url(r'^team/(?P<team_name>[\w|\W]+)/$',views.team_page, name='team'), url(r'^player/(?P<team_name>[\w|\W]+)/(?P<player_name>[\w|\W]+)/$',views.player_page, name='player'), url(r'^add/(?P<team_name>[\w|\W]+)/(?P<field>[\w|\W]+)/(?P<player_name>[\w|\W]+)/$', views.add_player, name='add_player'), url(r'^drop/(?P<team_name>[\w|\W]+)/(?P<player_name>[\w|\W]+)/$', views.drop_player, name='drop_player'), url(r'^check_username/$', views.check_username, name='check_username'), url(r'^challenge/(?P<team_id>[\w|\W]+)/$', views.challenge, name='challenge'), url(r'^results/$', views.results, name='results'), url(r'^team_register/$', views.team_register, name='team_register'), url(r'^player_register/$', views.player_register, name='player_register'), url(r'^login/$', views.captain_login, name='login'), url(r'^logout/$', views.captain_logout, name='logout'), url(r'^notifications/$', views.notifications, name='notifications'), url(r'^submit/(?P<challenge_id>[\w|\W]+)/$', views.score_submit, name='submit'), url(r'^accept_score/(?P<challenge_id>[\w|\W]+)//(?P<g1_id>[\w|\W]+)//(?P<g2_id>[\w|\W]+)/$', views.accept_score, name='accept_score'), url(r'^reject_score/(?P<challenge_id>[\w|\W]+)/$', views.reject_score, name='reject_score'), url(r'^forfeit/(?P<challenge_id>[\w|\W]+)/$',views.forfeit, name='forfeit'), url(r'^success/$', views.challenge_success, name='success'), url(r'^messages/write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(template_name='write.html'), name='write'), url(r'^messages/inbox/(?:(?P<option>m)/)?$', InboxView.as_view(template_name='inbox.html'), name='inbox'), url(r'^messages/view/(?P<message_id>[\d]+)/$', MessageView.as_view(template_name='view.html'), name='message_view'), url(r'^messages/view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(template_name='view.html'), name='conversation_view'), ]
# url(r'^profile/messages/archives/(?:(?P<option>'+OPTIONS+')/)?$', # ArchivesView.as_view(), name='postman_archives'), # url(r'^profile/messages/trash/(?:(?P<option>'+OPTIONS+')/)?$', # TrashView.as_view(), name='postman_trash'), url(r'^profile/messages/write/(?:(?P<recipients>[\w.@+-:]+)/)?$', WriteView.as_view(template_name='postman/postman/write.html'), name='postman_write'), url(r'^profile/messages/reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(), name='postman_reply'), url(r'^profile/messages/view/(?P<message_id>[\d]+)/$', MessageView.as_view(template_name='postman/postman/view.html'), name='postman_view'), url(r'^profile/messages/view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(template_name='postman/postman/view.html'), name='postman_view_conversation'), url(r'^profile/messages/archive/$', ArchiveView.as_view(), name='postman_archive'), url(r'^profile/messages/delete/$', DeleteView.as_view(), name='postman_delete'), url(r'^profile/messages/undelete/$', UndeleteView.as_view(), name='postman_undelete'),
url(r'^market/(?P<post_id>\d+)$', 'app.market.views.show_post', name="show_post"), url(r'^market/(?P<post_id>\d+)/edit$', 'app.market.views.edit_post', name="edit_post"), url(r'^market/(?P<post_id>\d+)/show-similar$', 'app.market.views.show_similar_posts', name="show_similar_posts"), url(r'^market/(?P<post_id>\d+)/([^/]+)$', 'app.market.views.show_post', name="show_post"), url(r'^market/offer$', 'app.market.views.create_offer', name="create_offer"), url(r'^market/request$', 'app.market.views.create_request', name="create_request"), url(r'^market/news$', 'app.market.views.create_news', name="create_news"), url(r'^market/notifications$', 'app.market.views.notifications', name="show_notifications"), url(r'^market/filter/(?P<type_filter>\w+)$', 'app.market.views.index_filter', name="show_market_filter"), url(r'^market/search/', include('haystack.urls')), url('^/messages/inbox/m/$', 'app.market.views.index'), url('^messages/permdelete/', 'app.market.views.permanent_delete_postman', name="permanent_delete_postman"), url(r'^messages/', include('postman.urls')),) from postman.views import MessageView, ReplyView from app.market.forms import MarketQuickReplyForm from cust_postman import MovementsConversationView, MovementsReplyForm urlpatterns += patterns('postman.views', url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(form_class=MovementsReplyForm), name='postman_reply'), url(r'^view/t/(?P<thread_id>[\d]+)/$', MovementsConversationView.as_view(form_class=MarketQuickReplyForm), name='postman_view_conversation'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(form_class=MarketQuickReplyForm), name='postman_view'),)
# quote formatters def format_subject(subject): return "Re_ " + subject def format_body(sender, body): return "{0} _ {1}".format(sender, body) postman_patterns = [ # Basic set url(r'^inbox/(?:(?P<option>'+OPTIONS+')/)?$', InboxView.as_view(), name='inbox'), url(r'^sent/(?:(?P<option>'+OPTIONS+')/)?$', SentView.as_view(), name='sent'), url(r'^archives/(?:(?P<option>'+OPTIONS+')/)?$', ArchivesView.as_view(), name='archives'), url(r'^trash/(?:(?P<option>'+OPTIONS+')/)?$', TrashView.as_view(), name='trash'), url(r'^write/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(), name='write'), url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(), name='reply'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(), name='view'), url(r'^view/t/(?P<thread_id>[\d]+)/$', ConversationView.as_view(), name='view_conversation'), url(r'^archive/$', ArchiveView.as_view(), name='archive'), url(r'^delete/$', DeleteView.as_view(), name='delete'), url(r'^undelete/$', UndeleteView.as_view(), name='undelete'), # Django 1.9 "HTTP redirects no longer forced to absolute URIs" # and test.Client doesn't support relative-path reference, such as url='inbox/' ; ticket/26428 url(r'^$', RedirectView.as_view( url=reverse_lazy('postman:inbox') if VERSION >= (1, 9) and VERSION < (1, 9, 6) else 'inbox/', permanent=True)), # Customized set # 'success_url' url(r'^write_sent/(?:(?P<recipients>[^/#]+)/)?$', WriteView.as_view(success_url='postman:sent'), name='write_with_success_url_to_sent'), url(r'^reply_sent/(?P<message_id>[\d]+)/$', ReplyView.as_view(success_url='postman:sent'), name='reply_with_success_url_to_sent'), url(r'^archive_arch/$', ArchiveView.as_view(success_url='postman:archives'), name='archive_with_success_url_to_archives'),
url(r'^market/notifications$', 'app.market.views.notifications', name="show_notifications"), url(r'^market/filter/(?P<type_filter>\w+)$', 'app.market.views.index_filter', name="show_market_filter"), url(r'^market/search/', include('haystack.urls')), url('^/messages/inbox/m/$', 'app.market.views.index'), url('^messages/permdelete/', 'app.market.views.permanent_delete_postman', name="permanent_delete_postman"), url(r'^messages/', include('postman.urls')), ) from postman.views import MessageView, ReplyView from app.market.forms import MarketQuickReplyForm from cust_postman import MovementsConversationView, MovementsReplyForm urlpatterns += patterns( 'postman.views', url(r'^reply/(?P<message_id>[\d]+)/$', ReplyView.as_view(form_class=MovementsReplyForm), name='postman_reply'), url(r'^view/t/(?P<thread_id>[\d]+)/$', MovementsConversationView.as_view(form_class=MarketQuickReplyForm), name='postman_view_conversation'), url(r'^view/(?P<message_id>[\d]+)/$', MessageView.as_view(form_class=MarketQuickReplyForm), name='postman_view'), )
api.UserTimeline.as_view(), name='user-timeline'), url(r'^images/$', api.ImageList.as_view(), name='image_list'), url(r'^images/(?P<pk>[a-z0-9]+)/$', api.ImageDetail.as_view(), name='image_detail'), url(r'^attendants/$', api.AttendentList.as_view(), name='attendant_list'), ) # postman URL urlpatterns += patterns( "postman", url(r'^user/inbox/(?:(?P<option>'+OPTIONS+')/)?$', InboxView.as_view(), name='inbox'), url(r'^user/reply/(?P<message_id>[[a-z0-9]]+)/$', ReplyView.as_view(), name='reply'), url(r'^user/view/(?P<message_id>[[a-z0-9]]+)/$', MessageView.as_view(), name='view'), url(r'^user/view/t/(?P<thread_id>[[a-z0-9]]+)/$', ConversationView.as_view(), name='view_conversation'), ) urlpatterns += patterns( "", (r'^user/', include('allauth.urls')), )