# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals

from django.conf.urls import url

from . import views

urlpatterns = [
    # URL pattern for the UserListView
    url(
        regex=r'^abort/(?P<pk>[0-9]+)/$',
        view=views.GroupsAbortView.as_view(),
        name="groups-abort"
    ),    
    url(
        regex=r'^all/$',
        view=views.GroupsListView.as_view(),
        name="groups-alllist"
    ),    
    url(
        regex=r'^create/$',
        view=views.GroupsCreateView.as_view(),
        name="groups-create"
    ),
    url(
        regex=r'^(?P<pk>[0-9]+)/$',
        view=views.GroupsDetailView.as_view(),
        name='groups-detail'
    ),
    url(
        regex=r'^join/(?P<pk>[0-9]+)/$',
        view=views.GroupsJoinView.as_view(),
        name="groups-join"
    ),    
    url(
        regex=r'^$',
        view=views.GroupsMyListView.as_view(),
        name='groups-mylist'
    ),
    url(
        regex=r'^following/$',
        view=views.GroupsFollowingListView.as_view(),
        name='groups-followinglist'
        ),
    url(
        regex=r'^update/(?P<pk>[0-9]+)/$',
        view=views.GroupsUpdateView.as_view(),
        name='groups-update'
    ),

    # Follow Group
    url(
        regex=r'^follow/(?P<pk>[0-9]+)/$',
        view=views.follow_group,
        name='groups-follow'
    ),
    # Unfollow Group
    url(
        regex=r'^unfollow/(?P<pk>[0-9]+)/$',
        view=views.unfollow_group,
        name='groups-unfollow'
    ),
]

@@ -176,15 +176,18 @@
 the 
-UserLis
+GroupsAbor
 tVie
@@ -311,36 +311,73 @@
 ps-abort%22%0A    ),
+%0A
     
+# URL pattern for the GroupsListView
 %0A    url(%0A      
@@ -468,36 +468,75 @@
 -alllist%22%0A    ),
+%0A
     
+# URL pattern for the GroupsCreateView
 %0A    url(%0A      
@@ -632,32 +632,75 @@
 -create%22%0A    ),%0A
+    # URL pattern for the GroupsDetailView%0A
     url(%0A       
@@ -803,32 +803,73 @@
 -detail'%0A    ),%0A
+    # URL pattern for the GroupsJoinView%0A
     url(%0A       
@@ -980,20 +980,59 @@
 %22%0A    ),
+%0A
     
+# URL pattern for the GroupsMyListView
 %0A    url
@@ -1133,24 +1133,74 @@
 ist'%0A    ),%0A
+    # URL pattern for the GroupsFollowingListView%0A
     url(%0A   
@@ -1321,19 +1321,58 @@
 st'%0A
-    
     ),%0A
+    # URL pattern for the GroupsUpdateView%0A
     
@@ -1506,16 +1506,35 @@
  ),%0A
-%0A
     # 
-F
+URL pattern for the f
 ollo
@@ -1532,32 +1532,39 @@
 the follow Group
+ action
 %0A    url(%0A      
@@ -1676,16 +1676,36 @@
 %0A    # U
+RL pattern for the u
 nfollow 
@@ -1709,16 +1709,23 @@
 ow Group
+ action
 %0A    url

更新 modules groups/urls.py, 修正 PEP8 警告，同時新增註解