from django.conf.urls import patterns, url from django.views.generic.base import TemplateView, RedirectView from postman import OPTIONS from postman.views import (InboxView, SentView, ArchivesView, TrashView, WriteView, ReplyView, MessageView, ConversationView, ArchiveView, DeleteView, UndeleteView) urlpatterns = patterns( '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'),
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/')), )
try: from django.conf.urls import patterns, url # django 1.4 except ImportError: from django.conf.urls.defaults import patterns, url # django 1.3 from django.views.generic.base import RedirectView from . import OPTIONS from postman.views import (InboxView, SentView, ArchivesView, BookmarksView, TrashView, WriteView, ReplyView, MessageView, ConversationView, ArchiveView, UnarchiveView, DeleteView, UndeleteView, BookmarkView, 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]+)/$',
...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)), ]
from django.views.generic.base import RedirectView from lending.views import (ReplyView, MessageView, ConversationView) from postman.views import ( InboxView, SentView, ArchivesView, TrashView, WriteView, ArchiveView, DeleteView, UndeleteView, MarkReadView, MarkUnreadView) if getattr(settings, 'POSTMAN_I18N_URLS', False): from django.utils.translation import pgettext_lazy else: def pgettext_lazy(c, m): return m app_name = 'postman' urlpatterns = [ # Translators: keep consistency of the <option> parameter with the translation for 'm' url(pgettext_lazy('postman_url', r'^inbox/(?:(?P<option>m)/)?$'), InboxView.as_view(), name='inbox'), # Translators: keep consistency of the <option> parameter with the translation for 'm' url(pgettext_lazy('postman_url', r'^sent/(?:(?P<option>m)/)?$'), SentView.as_view(), name='sent'), # Translators: keep consistency of the <option> parameter with the translation for 'm' url(pgettext_lazy('postman_url', r'^archives/(?:(?P<option>m)/)?$'), ArchivesView.as_view(), name='archives'), # Translators: keep consistency of the <option> parameter with the translation for 'm' url(pgettext_lazy('postman_url', r'^trash/(?:(?P<option>m)/)?$'), TrashView.as_view(), name='trash'), url(pgettext_lazy('postman_url', r'^write/(?:(?P<recipients>[^/#]+)/)?$'), WriteView.as_view(), name='write'), url(pgettext_lazy('postman_url', r'^reply/(?P<message_id>[\d]+)/$'), ReplyView.as_view(), name='reply'), url(pgettext_lazy('postman_url', r'^view/(?P<message_id>[\d]+)/$'), MessageView.as_view(), name='view'), # Translators: 't' stands for 'thread' url(pgettext_lazy('postman_url', r'^view/t/(?P<thread_id>[\d]+)/$'), ConversationView.as_view(), name='view_conversation'), url(pgettext_lazy('postman_url', r'^archive/$'), ArchiveView.as_view(), name='archive'), url(pgettext_lazy('postman_url', r'^delete/$'), DeleteView.as_view(), name='delete'), url(pgettext_lazy('postman_url', r'^undelete/$'), UndeleteView.as_view(), name='undelete'), url(pgettext_lazy('postman_url', r'^mark-read/$'), MarkReadView.as_view(), name='mark-read'),
# quote formatters def format_subject(subject): return "Re_ " + subject def format_body(sender, body): return "{0} _ {1}".format(sender, body) postman_patterns = 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'),
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'), ]
from django.conf.urls import patterns, url from django.views.generic.base import TemplateView,RedirectView from postman import OPTIONS from postman.views import (InboxView, SentView, ArchivesView, TrashView, WriteView, ReplyView, MessageView, ConversationView, ArchiveView, DeleteView, UndeleteView) urlpatterns = patterns('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/')), )
# url(r'^profile/messages/', include('postman.urls')), url(r'^admin/', include(admin.site.urls)), # Uncomment the admin/doc line below to enable admin documentation: url(r'^admin/doc/', include('django.contrib.admindocs.urls')), ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # remove for production urlpatterns = format_suffix_patterns(urlpatterns) # below are custom templates for postman urlpatterns += patterns('postman.views', url(r'^profile/messages/inbox/(?:(?P<option>'+OPTIONS+')/)?$', InboxView.as_view(template_name='postman/postman/t_inbox.html'), name='postman_inbox'), url(r'^profile/messages/sent/(?:(?P<option>'+OPTIONS+')/)?$', SentView.as_view(), name='postman_sent'), # 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'),
# auto-moderation function set def moderate_as_51(message): return 51 def moderate_as_48(message): return (48, "some reason") moderate_as_48.default_reason = 'some default reason' # 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)),
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')), )