# Path: mineid/mcaccounts/views.py
# class MinecraftList(MinecraftViewMixin, ListView):
#     template_name = 'mineid/mcaccounts/list.html'
# 
#     def get_queryset(self):
#         return MinecraftAccount.objects.filter(user=self.request.user)
# 
# class MinecraftCreate(MinecraftViewMixin, FormView):
#     form_class = MinecraftAccountForm
#     template_name = 'mineid/mcaccounts/create.html'
#     success_url = reverse_lazy('minecraft:list')
# 
#     def form_valid(self, form):
#         form.save(self.request.user)
#         return redirect(self.get_success_url())
# 
# class MinecraftDelete(MinecraftViewMixin, DeleteView):
#     model = MinecraftAccount
#     template_name = 'mineid/mcaccounts/delete.html'
#     success_url = reverse_lazy('minecraft:list')


from django.conf.urls import patterns, include, url
from .views import MinecraftList, MinecraftCreate, MinecraftDelete


urlpatterns = patterns(
    '',
    url(r'^$', MinecraftList.as_view(), name='list'),
    url(r'^create/$', MinecraftCreate.as_view(), name='create'),
    url(r'^delete/(?P<pk>\d+)/$', MinecraftDelete.as_view(), name='delete'),

# Path: mineid/mcaccounts/views.py
# class MinecraftList(MinecraftViewMixin, ListView):
#     template_name = 'mineid/mcaccounts/list.html'
# 
#     def get_queryset(self):
#         return MinecraftAccount.objects.filter(user=self.request.user)
# 
# class MinecraftCreate(MinecraftViewMixin, FormView):
#     form_class = MinecraftAccountForm
#     template_name = 'mineid/mcaccounts/create.html'
#     success_url = reverse_lazy('minecraft:list')
# 
#     def form_valid(self, form):
#         form.save(self.request.user)
#         return redirect(self.get_success_url())
# 
# class MinecraftDelete(MinecraftViewMixin, DeleteView):
#     model = MinecraftAccount
#     template_name = 'mineid/mcaccounts/delete.html'
#     success_url = reverse_lazy('minecraft:list')


# Path: mineid/mcaccounts/urls.py
from django.conf.urls import patterns, include, url
from .views import MinecraftList, MinecraftCreate, MinecraftDelete



urlpatterns = patterns(
    '',
    url(r'^$', MinecraftList.as_view(), name='list'),
    url(r'^create/$', MinecraftCreate.as_view(), name='create'),
    url(r'^delete/(?P<pk>\d+)/$', MinecraftDelete.as_view(), name='delete'),

)