import logging

from django.views.generic import TemplateView

from pictures.models import PicturePost

LOGGER = logging.getLogger(__name__)

class EndlessPictureView(TemplateView):
    """Shows the user's profile"""

    template_name = "pictures/endless-pictures.html"

    def get_context_data(self, *args, **kwargs):
        context = super().get_context_data(*args, **kwargs)
        queryset = PicturePost.objects.all().order_by('-id')

        context["picture_posts"] = queryset

        return context
