-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add seconds to Banana start time info #78
Comments
Has this already been fixed in any AARTFAAC specific banana? Otherwise it seems like with USE_L10N = True, the formatting needs to be stated manually. Changing line 56 in image_list.html to {{ image.taustart_ts|date:"N j, Y, g:i:s a" }} gives Is that what is wanted here? Though perhaps Gijs knows a better way to set it globally? But I thought I'd post this solution here in case it could be used. I think also we should perhaps use 24h instead of am/pm. |
This has not been fixed in any AARTFAAC specific banana. This is a formatting issue and should be set in the template. As far as I know USE_L10N only affects the ordering and formatting of the date and time, but does not add seconds to the representation. |
Yeah I thought this could just go in the base.py file but it seemed like USE_L10N was overwriting everything and I could only get it to change when I specified it in the place where it was being shown. Is there another template file that would do the trick? I'm still learning my way around how the code is set up, so I'd be interested to know. |
What do you mean? 2015-07-06 16:49 GMT+02:00 Adam Stewart [email protected]:
Gijs Molenaar |
I just meant globally instead of entering that to each html page template? But maybe individually is the way. |
hm, interesting point. My first suggestion would be we create a template flag, and then apply that tag everywhere, so you can modify the format in a central location. What we can also do is add an extra property function to the model the formats the field according to our preference: http://stackoverflow.com/questions/28269520/django-custom-representation-of-a-field-in-templates |
Currently if you sort images by 'start time' on Banana it only gives you info to the minute. As AARTFAAC does 1s imaging, it would be great if we could have the second displayed as well.
The text was updated successfully, but these errors were encountered: