def job_confirm(request, job_id, auth):
    job = get_object_or_404(Job, pk=job_id, auth=auth)
    if job.status not in (Job.ACTIVE, Job.TEMPORARY):
        raise Http404
    new_post = job.is_temporary()
    requires_mod = not job.email_published_before() and \
                 djobberbase_settings.DJOBBERBASE_ENABLE_NEW_POST_MODERATION
    if requires_mod:
        messages.add_message(request, 
                       messages.INFO, 
                       _('Your job post needs to be verified by a moderator.'))
        if djobberbase_settings.DJOBBERBASE_POSTER_NOTIFICATIONS:
            pending_email = MailPublishPendingToUser(job, request)
            pending_email.start()
    else:
        messages.add_message(request, 
                             messages.INFO, 
                             _('Your job post has been published.'))
        if not job.is_active():
            job.activate()
        if new_post:
            if djobberbase_settings.DJOBBERBASE_POSTER_NOTIFICATIONS:
                publish_email = MailPublishToUser(job, request)
                publish_email.start()    
    queryset = Job.objects.all()
    if djobberbase_settings.DJOBBERBASE_ADMIN_NOTIFICATIONS:
        admin_email = MailPublishToAdmin(job, request)
        admin_email.start()
    return object_detail(request, queryset=queryset,
                         object_id=job_id,
                         extra_context={'page_type':'confirm'})
A view to confirm a recently created job, if it has been published
dataset/ETHPy150Open wtrevino/django-djobberbase/djobberbase/views.py/job_confirm