"""Views at the configuration root level."""

from django.views.generic import TemplateView
from imager_images.models import Photo

DEFAULT_IMG_URL = 'media/django-magic.jpg'


class HomeView(TemplateView):
    """Generic home view showing public image to any user."""

    template_name = "home.html"

    def get_context_data(self, *args, **kwargs):
        """Return dictionary of context information for home view."""
        img_url = DEFAULT_IMG_URL
        user_photo = Photo.public.random()
        if user_photo:
            img_url = user_photo.img_file.url

        return {'img_url': img_url}


class ProfileView(TemplateView):
    """Shows a User's profile page."""

    template_name = "profile.html"

    def get(request, *args, **kwargs):
        """Stand in for get."""
        pass
"""Views at the configuration root level."""

from django.views.generic import TemplateView
from imager_images.models import Photo

DEFAULT_IMG_URL = 'media/django-magic.jpg'


class HomeView(TemplateView):
    """Generic home view showing public image to any user."""

    template_name = "home.html"

    def get_context_data(self, *args, **kwargs):
        """Return dictionary of context information for home view."""
        img_url = DEFAULT_IMG_URL
        user_photo = Photo.public.random()
        if user_photo:
            img_url = user_photo.img_file.url

        return {'img_url': img_url}


class ProfileView(TemplateView):
    """Shows a User's profile page."""

    template_name = "profile.html"

    def get(self, request, *args, **kwargs):
        """Stand in for get."""
        pass

Set ProfileView for improvement.