from django.conf.urls import patterns, url

urlpatterns = patterns('mailqueue.views',
                       url(r'^clear$', 'clear_sent_messages', name='clear_sent_messages'),
                       url(r'^$', 'run_mail_job', name='run_mail_job'),
                       )

from django.conf.urls import url
from . import views

urlpatterns = [
    url(r'^clear$', views.clear_sent_messages, name='clear_sent_messages'),
    url(r'^$', views.run_mail_job, name='run_mail_job'),
]

Remove warning "deprecated" in url.py
Remove warning "deprecated" in url.py

version django=1.9.6
RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
