def _require_project(code, name, source_language, **kwargs):
 from pootle_project.models import Project
 criteria = {'code': code, 'fullname': name, 'source_language': source_language, 'checkstyle': 'standard', 'treestyle': 'auto'}
 criteria.update(kwargs)
 new_project = Project.objects.get_or_create(**criteria)[0]
 return new_project

def _require_project ( code , name , source_language , ** kwargs ) : from pootle_project . models import Project criteria = { 'code' : code , 'fullname' : name , 'source_language' : source_language , 'checkstyle' : 'standard' , 'treestyle' : 'auto' } criteria . update ( kwargs ) new_project = Project . objects . get_or_create ( ** criteria ) [ 0 ] return new_project
helper to get/create a new project .