def get_json_stats(request, days, step, project=None, subproject=None, lang=None, user=None):
 if ((project is None) and (lang is None) and (user is None)):
  project = None
  subproject = None
  translation = None
  language = None
  user = None
 elif (user is not None):
  project = None
  subproject = None
  translation = None
  language = None
  user = get_object_or_404(User, username=user)
 elif (project is None):
  project = None
  subproject = None
  translation = None
  language = get_object_or_404(Language, code=lang)
  user = None
 else:
  (project, subproject, translation) = get_project_translation(request, project, subproject, lang)
  language = None
  user = None
 return Change.objects.base_stats(days, step, project, subproject, translation, language, user)

def get_json_stats ( request , days , step , project = None , subproject = None , lang = None , user = None ) : if ( ( project is None ) and ( lang is None ) and ( user is None ) ) : project = None subproject = None translation = None language = None user = None elif ( user is not None ) : project = None subproject = None translation = None language = None user = get_object_or_404 ( User , username = user ) elif ( project is None ) : project = None subproject = None translation = None language = get_object_or_404 ( Language , code = lang ) user = None else : ( project , subproject , translation ) = get_project_translation ( request , project , subproject , lang ) language = None user = None return Change . objects . base_stats ( days , step , project , subproject , translation , language , user )
parse json stats url params .