0

I am currently using Django third-party application called Django-messages to handle user-user massaging. I'm encountering this Error for some days

ERRORS: ?: (urls.E004) Your URL pattern ('^messages/', (, None, None)) is invalid. Ensure that urlpatterns is a list of path() and/or re_path() instances. HINT: Try using path() instead of a tuple. System check identified 1 issue (0 silenced).

The complain is about the urls.py Can you help me out please? I have tried every single ways but not working out. Thanks

Here is the urls.py file

from django.conf.urls import url
from django.views.generic import RedirectView
from django_messages.views import *

urlpatterns = [
    url(r'^$', RedirectView.as_view(permanent=True, url='inbox/'), name='messages_redirect'),
    url(r'^inbox/$', inbox, name='messages_inbox'),
    url(r'^outbox/$', outbox, name='messages_outbox'),
    url(r'^compose/$', compose, name='messages_compose'),
    url(r'^compose/(?P<recipient>[\w.@+-]+)/$', compose, name='messages_compose_to'),
    url(r'^reply/(?P<message_id>[\d]+)/$', reply, name='messages_reply'),
    url(r'^view/(?P<message_id>[\d]+)/$', view, name='messages_detail'),
    url(r'^delete/(?P<message_id>[\d]+)/$', delete, name='messages_delete'),
    url(r'^undelete/(?P<message_id>[\d]+)/$', undelete, name='messages_undelete'),
    url(r'^trash/$', trash, name='messages_trash'),
]

My Django Version is 2.1 django-messages==0.5.3

ray
  • 95
  • 2
  • 14
  • The problem is where you *include* those urls. – Alasdair Apr 27 '19 at 10:37
  • Note that Django messages 0.5.3 was release in 2016, so it probably won’t work with Django 2.1. You might be able to get it to work if you install the master branch or look for open pull requests with patches. – Alasdair Apr 27 '19 at 12:03
  • pls how do ui install the master branch? @Alasdair.....Thanks – ray Apr 27 '19 at 19:05
  • See [this question](https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch) – Alasdair Apr 27 '19 at 20:25

0 Answers0