djangoApiDec/djangoApiDec.py
def queryString_required_ClassVersion(strList):
	"""	An decorator checking whether queryString key is valid or not
	Args:
		str: allowed queryString key

	Returns:
		if contains invalid queryString key, it will raise exception.
	"""
	def _dec(function):
		@wraps(function)
		def _wrap(classInstance, request, *args, **kwargs):
			for i in strList:
				if i not in request.GET:
					raise Http404("api does not exist")
			return function(classInstance, request, *args, **kwargs)
		return _wrap
	return _dec
def queryString_required_ClassVersion(strList):
	"""	An decorator checking whether queryString key is valid or not
	Args:
		str: allowed queryString key

	Returns:
		if contains invalid queryString key, it will raise exception.
	"""
	def _dec(function):
		@wraps(function)
		def _wrap(classInstance, request, *args, **kwargs):
			for i in strList:
				if i not in request.GET:
					raise Http404("api does not exist")
			return function(classInstance, request, *args, **kwargs)
		return _wrap
	return _dec
def queryString_required_ClassVersion ( strList ) : def _dec ( function ) : @ wraps ( function ) def _wrap ( classInstance , request , * args , * * kwargs ) : for i in strList : if i not in request . GET : raise Http404 ( "api does not exist" ) return function ( classInstance , request , * args , * * kwargs ) return _wrap return _dec
An decorator checking whether queryString key is valid or not
	Args:
		str: allowed queryString key

	Returns:
		if contains invalid queryString key, it will raise exception.
An decorator checking whether queryString key is valid or not Args : str : allowed queryString key