| |
@@ -1,23 +1,25 @@
|
| |
from __future__ import unicode_literals
|
| |
|
| |
- from django.conf.urls import url
|
| |
+ from django.urls import re_path
|
| |
|
| |
from .views import (StartView, MessageSearchView, MessageSendView, MessageSenderConfirmationSentView, MessageSenderConfirmationView,
|
| |
MessageSenderConfirmedView, MessageRecipientMessageUpdate, FaqView, ArchiveView, InspirationView,
|
| |
BlacklistEmailView, ReceivedMessagesView, SentMessagesView)
|
| |
|
| |
+ app_name = 'messaging'
|
| |
+
|
| |
urlpatterns = [
|
| |
- url(r'^$', StartView.as_view(), name='start'),
|
| |
- url(r'^faq/$', FaqView.as_view(), name='faq'),
|
| |
- url(r'^archive/$', ArchiveView.as_view(), name='archive'),
|
| |
- url(r'^inspiration/$', InspirationView.as_view(), name='inspiration'),
|
| |
- url(r'^received-messages/$', ReceivedMessagesView.as_view(), name='received_messages'),
|
| |
- url(r'^sent-messages/$', SentMessagesView.as_view(), name='sent_messages'),
|
| |
- url(r'^blacklist-email/(?P<email>[\w\.@\+-]+)/(?P<digest>\w+)/$', BlacklistEmailView.as_view(), name='blacklist_email'),
|
| |
- url(r'^send/$', MessageSendView.as_view(), name='send'),
|
| |
- url(r'^send/confirmation-sent/$', MessageSenderConfirmationSentView.as_view(), name='sender_confirmation_sent'),
|
| |
- url(r'^send/confirmation/(?P<identifier>[\w-]+)/(?P<token>[\w-]+)/$', MessageSenderConfirmationView.as_view(), name='sender_confirm'),
|
| |
- url(r'^send/confirmed/$', MessageSenderConfirmedView.as_view(), name='sender_confirmed'),
|
| |
- url(r'^recipient/(?P<identifier>[\w-]+)/(?P<token>[\w-]+)/$', MessageRecipientMessageUpdate.as_view(), name='recipient_message_update'),
|
| |
- url(r'^search/?$', MessageSearchView.as_view(), name='search'),
|
| |
+ re_path(r'^$', StartView.as_view(), name='start'),
|
| |
+ re_path(r'^faq/$', FaqView.as_view(), name='faq'),
|
| |
+ re_path(r'^archive/$', ArchiveView.as_view(), name='archive'),
|
| |
+ re_path(r'^inspiration/$', InspirationView.as_view(), name='inspiration'),
|
| |
+ re_path(r'^received-messages/$', ReceivedMessagesView.as_view(), name='received_messages'),
|
| |
+ re_path(r'^sent-messages/$', SentMessagesView.as_view(), name='sent_messages'),
|
| |
+ re_path(r'^blacklist-email/(?P<email>[\w\.@\+-]+)/(?P<digest>\w+)/$', BlacklistEmailView.as_view(), name='blacklist_email'),
|
| |
+ re_path(r'^send/$', MessageSendView.as_view(), name='send'),
|
| |
+ re_path(r'^send/confirmation-sent/$', MessageSenderConfirmationSentView.as_view(), name='sender_confirmation_sent'),
|
| |
+ re_path(r'^send/confirmation/(?P<identifier>[\w-]+)/(?P<token>[\w-]+)/$', MessageSenderConfirmationView.as_view(), name='sender_confirm'),
|
| |
+ re_path(r'^send/confirmed/$', MessageSenderConfirmedView.as_view(), name='sender_confirmed'),
|
| |
+ re_path(r'^recipient/(?P<identifier>[\w-]+)/(?P<token>[\w-]+)/$', MessageRecipientMessageUpdate.as_view(), name='recipient_message_update'),
|
| |
+ re_path(r'^search/?$', MessageSearchView.as_view(), name='search'),
|
| |
]
|
| |
This commit upgrades FHP from Python 2 to Python 3 and Django 1.11
to Django 2.0.
The following changes have been done with the reasons listed below:
django.core.urlresolvers
=>django.urls
url
=>re_path
app_name = 'messaging'
is required for url namespacing in Django 2.0render_to_response
=>render
MIDDLEWARE_CLASSES
=>MIDDLEWARE
static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
SetRemoteAddrFromForwardedFor
using this{% load static from staticfiles %}
=>{% load static %}
rb
to solveUnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
.Test suite is passed successfully after upgrading to Python3 and Django 2.1