# Path: twobuntu/accounts/views.py
# def profile(request, profile):
# def login(request):
# def logout(request):
# def register(request):
# def register_confirm(request, key):
# def reset(request):
# def reset_confirm(request, key):
# def edit(request, id):
# 
# Path: twobuntu/feeds.py
# class UserArticlesFeed(ArticleFeed):
#     """
#     Feed of articles written by a specific user.
#     """
# 
#     def get_object(self, request, id):
#         return get_object_or_404(Profile, pk=id)
# 
#     def title(self, profile):
#         return 'Articles by %s' % profile
# 
#     def link(self, profile):
#         return profile.get_absolute_url()
# 
#     def description(self, profile):
#         return "Recently published articles written by %s." % profile
# 
#     def items(self, profile):
#         return Article.objects.select_related('author', 'category').filter(status=Article.PUBLISHED, author=profile.user)[:20]


from django.conf.urls import url
from twobuntu.accounts import views
from twobuntu.feeds import UserArticlesFeed



urlpatterns = [
    url(r'^(?P<id>\d+)/(?:(?P<slug>[\w-]+)/)?$', views.profile, name='profile'),

    url(r'^login/$', views.login, name='login'),
    url(r'^logout/$', views.logout, name='logout'),

    url(r'^register/$', views.register, name='register'),
    url(r'^register/confirm/(?P<key>[0-9a-f]{32})/$', views.register_confirm, name='register_confirm'),

    url(r'^reset/$', views.reset, name='reset'),
    url(r'^reset/confirm/(?P<key>[0-9a-f]{32})/$', views.reset_confirm, name='reset_confirm'),

    url(r'^edit/(?P<id>\d+)/$', views.edit, name='edit'),

# Path: twobuntu/accounts/views.py
# def profile(request, profile):
# def login(request):
# def logout(request):
# def register(request):
# def register_confirm(request, key):
# def reset(request):
# def reset_confirm(request, key):
# def edit(request, id):
# 
# Path: twobuntu/feeds.py
# class UserArticlesFeed(ArticleFeed):
#     """
#     Feed of articles written by a specific user.
#     """
# 
#     def get_object(self, request, id):
#         return get_object_or_404(Profile, pk=id)
# 
#     def title(self, profile):
#         return 'Articles by %s' % profile
# 
#     def link(self, profile):
#         return profile.get_absolute_url()
# 
#     def description(self, profile):
#         return "Recently published articles written by %s." % profile
# 
#     def items(self, profile):
#         return Article.objects.select_related('author', 'category').filter(status=Article.PUBLISHED, author=profile.user)[:20]


# Path: twobuntu/accounts/urls.py
from django.conf.urls import url
from twobuntu.accounts import views
from twobuntu.feeds import UserArticlesFeed




urlpatterns = [
    url(r'^(?P<id>\d+)/(?:(?P<slug>[\w-]+)/)?$', views.profile, name='profile'),

    url(r'^login/$', views.login, name='login'),
    url(r'^logout/$', views.logout, name='logout'),

    url(r'^register/$', views.register, name='register'),
    url(r'^register/confirm/(?P<key>[0-9a-f]{32})/$', views.register_confirm, name='register_confirm'),

    url(r'^reset/$', views.reset, name='reset'),
    url(r'^reset/confirm/(?P<key>[0-9a-f]{32})/$', views.reset_confirm, name='reset_confirm'),

    url(r'^edit/(?P<id>\d+)/$', views.edit, name='edit'),

    url(r'^rss/(?P<id>\d+)/$', UserArticlesFeed(), name='rss'),