# Path: moto/moe/api/views.py
# USER_MODEL = get_user_model()
# class Avatar(GenericAPIView):
# class Post(GenericAPIView):
# class PostList(GenericAPIView):
# class PostDetail(RetrieveUpdateDestroyAPIView):
# class UserList(ListCreateAPIView):
# class UserProfile(RetrieveUpdateDestroyAPIView):
# class UserDetail(RetrieveUpdateDestroyAPIView):
# class CommentMixin(object):
# class CommentListCreateView(CommentMixin, ListCreateAPIView):
# class ReplyView(CommentMixin, ListCreateAPIView,
#         DestroyAPIView):
# class LikeView(ListCreateAPIView,DestroyAPIView):
#     def post(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def create(self,request,*args,**kwargs):
#     def perform_create(self, serializer):
#     def get_success_headers(self, data):
#     def post(self, request, *args, **kwargs):
#     def list(self):
#     def get(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def list(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def content_object_filter(self):
#     def get_queryset(self):
#     def list(self, request, *args, **kwargs):
#     def get_queryset(self):
#     def list(self, request, *args, **kwargs):
#     def delete(self, request, *args, **kwargs):
#      def get_queryset(self):


from django.conf.urls import include, url,patterns
from django.contrib import admin
from django.views.generic import TemplateView
from django.conf import settings
from django_comments_threaded.api import views as comment_views
from moto.moe.api import views
from rest_framework.authentication import SessionAuthentication
from django.conf.urls.i18n import i18n_patterns
    from django.conf.urls.static import static

urlpatterns = patterns('',
    url(r'^$', 'moto.moe.views.home', name='home'),
    url(r'^urls/$', 'django_js_reverse.views.urls_js', name='js_reverse'),
    url(r'^api/', include('moto.moe.api.urls',namespace='api')),
    url(r'^search/', 'moto.moe.views.search',name='search'),
    url(r'^post/(?P<key>[0-9a-zA-Z]+)/$','moto.moe.views.post',name='post_detail'),
    url(r'^user/(?P<username>[0-9a-z]+)/$', 'moto.moe.views.user',name='user_detail'),
    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns('',

    (r'^accounts/', include('allauth.urls')),
)

RE_CONTENT_OBJECT = r'comments/(?P<content_type>\w+)/(?P<object_pk>\d+)/'

urlpatterns += patterns('',
    url(r'^comment/(?P<pk>\d+)/$', views.ReplyView.as_view(authentication_classes=[SessionAuthentication]),
        name='api_reply'),


# Path: moto/moe/api/views.py
# USER_MODEL = get_user_model()
# class Avatar(GenericAPIView):
# class Post(GenericAPIView):
# class PostList(GenericAPIView):
# class PostDetail(RetrieveUpdateDestroyAPIView):
# class UserList(ListCreateAPIView):
# class UserProfile(RetrieveUpdateDestroyAPIView):
# class UserDetail(RetrieveUpdateDestroyAPIView):
# class CommentMixin(object):
# class CommentListCreateView(CommentMixin, ListCreateAPIView):
# class ReplyView(CommentMixin, ListCreateAPIView,
#         DestroyAPIView):
# class LikeView(ListCreateAPIView,DestroyAPIView):
#     def post(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def create(self,request,*args,**kwargs):
#     def perform_create(self, serializer):
#     def get_success_headers(self, data):
#     def post(self, request, *args, **kwargs):
#     def list(self):
#     def get(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def list(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def content_object_filter(self):
#     def get_queryset(self):
#     def list(self, request, *args, **kwargs):
#     def get_queryset(self):
#     def list(self, request, *args, **kwargs):
#     def delete(self, request, *args, **kwargs):
#      def get_queryset(self):


# Path: moto/moe/urls.py
from django.conf.urls import include, url,patterns
from django.contrib import admin
from django.views.generic import TemplateView
from django.conf import settings
from django_comments_threaded.api import views as comment_views
from moto.moe.api import views
from rest_framework.authentication import SessionAuthentication
from django.conf.urls.i18n import i18n_patterns
    from django.conf.urls.static import static


urlpatterns = patterns('',
    url(r'^$', 'moto.moe.views.home', name='home'),
    url(r'^urls/$', 'django_js_reverse.views.urls_js', name='js_reverse'),
    url(r'^api/', include('moto.moe.api.urls',namespace='api')),
    url(r'^search/', 'moto.moe.views.search',name='search'),
    url(r'^post/(?P<key>[0-9a-zA-Z]+)/$','moto.moe.views.post',name='post_detail'),
    url(r'^user/(?P<username>[0-9a-z]+)/$', 'moto.moe.views.user',name='user_detail'),
    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns('',

    (r'^accounts/', include('allauth.urls')),
)

RE_CONTENT_OBJECT = r'comments/(?P<content_type>\w+)/(?P<object_pk>\d+)/'

urlpatterns += patterns('',
    url(r'^comment/(?P<pk>\d+)/$', views.ReplyView.as_view(authentication_classes=[SessionAuthentication]),
        name='api_reply'),


    url(r'^' + RE_CONTENT_OBJECT + '$', views.CommentListCreateView.as_view(authentication_classes=[SessionAuthentication]),