Skip to content

Instantly share code, notes, and snippets.

@callen23dc
Created March 18, 2010 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save callen23dc/336601 to your computer and use it in GitHub Desktop.
Save callen23dc/336601 to your computer and use it in GitHub Desktop.
def process_bimport(sender, **kwargs):
from bimport.models import Bimport
import ipdb; ipdb.set_trace()
if sender == (Bimport):
inst = kwargs['instance']
if not inst._processing:
inst.status = 'P'
inst._processing = True
inst.save()
if int(inst.content_type.id) == 116:
import_subs(inst)
else:
inst.status = 'E'
inst.error = "Content type unrecognized, don't know what to do with this bulk import."
inst.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment