def delete_entry(request, author, object_id): dict_info = dict( model = Entry, login_required = True, post_delete_redirect = reverse('blogs-entry-list', kwargs={'author': author}), extra_context = {'author': author}, ) return create_update.delete_object(request, object_id=object_id, **dict_info)
def delete_report(request, product, object_id): kwargs = { 'model': Report, 'post_delete_redirect': reverse('bugwaz-report-list', kwargs={'product': product.pk}), 'extra_context': { 'product': product, } } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_entry(request, project, slug, slug_field='title'): obj = get_object_or_404(Entry, project=project, title=slug) kwargs = { 'model': Entry, 'post_delete_redirect': obj.get_absolute_url(), 'extra_context': { 'project': project, } } return create_update.delete_object(request, object_id=obj.pk, **kwargs)
def delete_announcement(request, object_id): kwargs = {"model": Announcement, "post_delete_redirect": reverse("announcements-announcement-list")} return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_task(request, object_id): kwargs = { 'model': Task, 'post_delete_redirect': reverse('tasks-task-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_tweet(request, object_id): kwargs = { 'model': Tweet, 'post_delete_redirect': reverse('tweets-tweet-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_product(request, object_id): kwargs = { 'model': Product, 'post_delete_redirect': reverse('bugwaz-product-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_flatpage(request, object_id): kwargs = { 'model': FlatPage, 'post_delete_redirect': reverse('flatpages-flatpage-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_event(request, object_id): kwargs = { 'model': Event, 'post_delete_redirect': reverse('events-event-list') } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_thread(request, object_id): kwargs = { 'model': Thread, 'post_delete_redirect': reverse('threads-thread-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_permissiongroup(request, object_id): kwargs = { 'model': models.PermissionGroup, 'post_delete_redirect': reverse('permissiongroups-permissiongroup-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)
def delete_material(request, object_id): kwargs = { 'model': Material, 'post_delete_redirect': reverse('commons-material-list'), } return create_update.delete_object(request, object_id=object_id, **kwargs)