from django.conf.urls import patterns, url

from polls import views

# from sitemaps import PollSitemap

# sitemaps collection
sitemaps = {  #'poll':PollSitemap()
}

urlpatterns = patterns('polls.views',  #Sitemaps url
                       #url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps':sitemaps}),
                       #ex: /polls/
                       url(r'^$', views.IndexView.as_view(), name='index'),  #ex: /polls/5/
                       url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),  #ex: /polls/5/results/
                       url(r'^(?P<pk>\d+)/results/$', views.ResultsView.as_view(), name='results'),  #ex: /polls/5/vote/
                       #url(r'^(?P<question_id>\d+)/vote/$', views.vote, name='vote'),
                       url(r'^list/$', 'list', name='list'),  #profile from views.py, TWD
                       url(r'^core_profile/$', views.profile, name='profile'),
                       url(r'^login/$', views.user_login, name='login'),
                       url(r'^register/$', views.register, name='register'),  #photo upload
                       #url(r'^upload/', views.upload, name='upload'),
                       url(r'^about', views.about, name='about'),  #home
                       url(r'^add_category/$', views.add_category, name='add_category'),
                       url(r'^restricted/$', views.restricted, name='restricted'),
                       url(r'^logout/$', views.user_logout, name='logout'),
                       url(r'^category/(?P<category_name_url>\w+)/$', views.category, name='category'),
                       url(r'^category/(?P<category_name_url>\w+)/add_page/$', views.add_page, name='add_page'),
                       url(r'^goto/$', views.track_url, name='track_url'),
                       #url(r'^$', 'core.views.trending',name='trending'),
                       # the three feed pages
                       #url(r'^feed/$','core.views.feed', name='feed'),
                       #url(r'^aggregated_feed/$', 'core.views.aggregated_feed', name='aggregated_feed'),
                       #url(r'^notification_feed/$','core.views.notification_feed', name='notification_feed'),
                       # a page showing the users profile
                       #url(r'^core_profile/(?P<username>[\w_-]+)/$','core.views.profile', name='profile'),
                       # backends for follow and pin
                       #url(r'^pin/$','core.views.pin', name='pin'),
                       #url(r'^follow/$','core.views.follow', name='follow'),
                       #url(r'^people/$','core.views.people', name='people'),
                       #url(r'^auto_follow/$','core.views.auto_follow', name='auto_follow'),
                       # the admin
                       # url(r'^admin/', include(admin.site.urls)),
                       #url(r'^accounts/', include('allauth.urls')),
                       #url(r'^auth/', include('django.contrib.auth.urls')),
                       )

