def package_last_modified(request, *args, **kwargs): return retrieve_latest(Package)
def news_last_modified(request, *args, **kwargs): return retrieve_latest(News, 'last_modified')
def package_etag(request, *args, **kwargs): latest = retrieve_latest(Package) if latest: return hashlib.md5(str(kwargs) + str(latest)).hexdigest() return None
def news_etag(request, *args, **kwargs): latest = retrieve_latest(News, 'last_modified') if latest: return hashlib.md5(str(latest)).hexdigest() return None