mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
views.py: Changed date format to iso
Changed the day format to iso. Also, the outdated field in the recipes views was changed from days to the date the recipe was last updated. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
d25036232c
commit
45ba3a280d
|
@ -207,7 +207,7 @@ def _get_recipe_list(milestone):
|
||||||
recipe_last_updated_dict_all.get(recipe['id'])
|
recipe_last_updated_dict_all.get(recipe['id'])
|
||||||
if recipe_last_updated:
|
if recipe_last_updated:
|
||||||
recipe_date = recipe_last_updated['date']
|
recipe_date = recipe_last_updated['date']
|
||||||
outdated = (current_date - recipe_date.date()).days
|
outdated = recipe_date.date().isoformat()
|
||||||
else:
|
else:
|
||||||
outdated = 'Unknown'
|
outdated = 'Unknown'
|
||||||
else:
|
else:
|
||||||
|
@ -360,13 +360,14 @@ def _get_recipe_upgrade_detail(recipe_upgrade):
|
||||||
.count() > 0:
|
.count() > 0:
|
||||||
is_recipe_maintainer = True
|
is_recipe_maintainer = True
|
||||||
|
|
||||||
|
commit_date = recipe_upgrade.commit_date.date().isoformat()
|
||||||
commit = recipe_upgrade.sha1[:10]
|
commit = recipe_upgrade.sha1[:10]
|
||||||
commit_url = recipe_upgrade.recipe.layerbranch.layer.vcs_web_url + \
|
commit_url = recipe_upgrade.recipe.layerbranch.layer.vcs_web_url + \
|
||||||
'/commit/?id=' + recipe_upgrade.sha1
|
'/commit/?id=' + recipe_upgrade.sha1
|
||||||
|
|
||||||
rud = RecipeUpgradeDetail(recipe_upgrade.title, recipe_upgrade.version, \
|
rud = RecipeUpgradeDetail(recipe_upgrade.title, recipe_upgrade.version, \
|
||||||
release_name, milestone_name, recipe_upgrade.commit_date, \
|
release_name, milestone_name, commit_date, maintainer_name, \
|
||||||
maintainer_name, is_recipe_maintainer, commit, commit_url)
|
is_recipe_maintainer, commit, commit_url)
|
||||||
|
|
||||||
return rud
|
return rud
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user