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

urlpatterns = [
    url(r'^$', views.index, name = 'index'),
    url(r'^sender', views.sender, name = 'sender'),
    url(r'^notification_list', views.notification_list, name = 'notification_list'),
    url(r'^settings', views.settings, name = 'settings'),
    url(r'^notification', views.notification, name = 'notification'),
    url(r'^register', views.device_token_register, name = 'device_token_register'),
    url(r'^delete/device_token/(?P<device_token_id>\d+)/$', views.delete_device_token, name = 'delete_device_token'),
]

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

urlpatterns = [
    url(r'^$', views.index, name = 'index'),
    url(r'^sender', views.sender, name = 'sender'),
    url(r'^notification_list', views.notification_list, name = 'notification_list'),
    url(r'^settings', views.settings, name = 'settings'),
    url(r'^notification', views.notification, name = 'notification'),
    url(r'^(?P<username>\w+)/register', views.device_token_register, name = 'device_token_register'),
    url(r'^delete/device_token/(?P<device_token_id>\d+)/$', views.delete_device_token, name = 'delete_device_token'),
]

Modify device_token register URL dispatcher
Modify device_token register URL dispatcher

  from django.conf.urls import url
  from push import views
  
  urlpatterns = [
      url(r'^$', views.index, name = 'index'),
      url(r'^sender', views.sender, name = 'sender'),
      url(r'^notification_list', views.notification_list, name = 'notification_list'),
      url(r'^settings', views.settings, name = 'settings'),
      url(r'^notification', views.notification, name = 'notification'),
-     url(r'^register', views.device_token_register, name = 'device_token_register'),
+     url(r'^(?P<username>\w+)/register', views.device_token_register, name = 'device_token_register'),
      url(r'^delete/device_token/(?P<device_token_id>\d+)/$', views.delete_device_token, name = 'delete_device_token'),
  ]
  
Modify device_token register URL dispatcher
## Code Before:
from django.conf.urls import url
from push import views

urlpatterns = [
    url(r'^$', views.index, name = 'index'),
    url(r'^sender', views.sender, name = 'sender'),
    url(r'^notification_list', views.notification_list, name = 'notification_list'),
    url(r'^settings', views.settings, name = 'settings'),
    url(r'^notification', views.notification, name = 'notification'),
    url(r'^register', views.device_token_register, name = 'device_token_register'),
    url(r'^delete/device_token/(?P<device_token_id>\d+)/$', views.delete_device_token, name = 'delete_device_token'),
]

## Instruction:
Modify device_token register URL dispatcher
## Code After:
from django.conf.urls import url
from push import views

urlpatterns = [
    url(r'^$', views.index, name = 'index'),
    url(r'^sender', views.sender, name = 'sender'),
    url(r'^notification_list', views.notification_list, name = 'notification_list'),
    url(r'^settings', views.settings, name = 'settings'),
    url(r'^notification', views.notification, name = 'notification'),
    url(r'^(?P<username>\w+)/register', views.device_token_register, name = 'device_token_register'),
    url(r'^delete/device_token/(?P<device_token_id>\d+)/$', views.delete_device_token, name = 'delete_device_token'),
]
