human
Complete this python program:
def map_project_slug(view_func):
assistant
#Here is the Python program you requested.

    """A decorator that maps a ``project_slug`` URL param into a Project.
    :raises: Http404 if the Project doesn\t exist
    .. warning:: Does not take into account any kind of privacy settings.
    """
    @wraps(view_func)
    def inner_view(request, project=None, project_slug=None, *args, **kwargs):
        if (project is None):
            if (not project_slug):
                project_slug = request.slug
            try:
                project = Project.objects.get(slug=project_slug)
            except Project.DoesNotExist:
                raise Http404('Project    does    not    exist.')
        return view_func(request, project=project, *args, **kwargs)
    return inner_view