python


Django tables2 dispalys time as am/pm instead of 24H standard


I'm currently working on a website in Django, where data from a MySQL database is shown with Django-Tables2. The issue is that all TIME fields in the database gets converted into am/pm instead of 24 hours as the standard should be from what I've gathered. I've seen multiple of people with the opposite issue but none of those solutions has worked. After googling and trying for almost a week, I'm not asking the community.
Is there a way to force the time standard for the TimeFormat fields in Django to correspond to the same format as the MySQL TIME (unlimited/24 hours)?
It would be very helpful as I'm currently displaying time intervals, and 00:25 which should be 25 minutes is shown as 12:25 pm.
class LoggTable(TableReport):
glider = tables.Column(accessor = 'glider.glider_id')
towing = tables.Column(accessor = 'towing.towing_id')
glider_pilot = tables.Column(accessor = 'glider_pilot.pilot_id')
towing_pilot = tables.Column(accessor = 'towing_pilot.pilot_id')
class Meta :
model = FlightData
exclude = ('max_height')
attrs = {'class': 'paleblue'}
We solved the issue, by including
TIME_FORMAT = 'H:i'
In our settings.py file, we tried similar different solutions before but didn't find this until now. We also set
USE_L10N = False

Related Links

Pyspark aggregation using groupBy is very slow compared to Scala
Multiple delimiters in single CSV file
Is it safe to use scipy.sparse functions with Pandas sparse dataframes?
I got error : UnboundLocalError: local variable 'porc' referenced before assignment
Trigger a delete when inserting a new entry on django
How does gauss laguerre integration works for large limits?
Selenium: Runtime.executionContextCreated has invalid 'context':
Python 3.5 csv input shows extra character 'b'
Python Error 104, connection reset by peer
css not getting loaded in flask webpage?
Regarding the regex in search module with and without raw text
How to calculate the mean of a column by decade in Python
How to read webpages that are without .htm* extension using Python?
can I use python's 'socket' module to connect to a wireless ethernet host?
Requests VS Urllib 2 [closed]
Call python class from another Python script

Categories

HOME
cluster-computing
admin-on-rest
elixir
tinyos
puzzle
winapi
wsdl
mapping
bing
antivirus
docker-swarm
tomcat7
schemacrawler
httpclient
structuremap
google-plus
google-shopping
cortex-a
ctypes
mod-pagespeed
bootstrap-popover
flexlm
boolean-expression
marathon
nmake
uiautomator
hhvm
csh
samsung-mobile
switching
continuous-deployment
unpack
vcard
hana-studio
vegan
rowcount
clockwork
oracle-xml-db
pox
.net-assembly
nodeclipse
rhel.net
codesys
haskell-pipes
alchemy.js
tic-tac-toe
floating-accuracy
dojox.mobile
apiary
asmx
webdatagrid
chrome-remote-desktop
slidesjs
execl
keycode
atlassian-crowd
push-diffusion
windows-azure-pack
dts
gherkin
kendo-combobox
proxygen
post-processing
git-rebase
galaxy
license-key
acm
self-hosting
eyeql
retro-computing
visual-studio-code
manjaro
rx-groovy
ffprobe
debian-based
callstack
git-checkout
pisa
django-1.6
alphablending
ultrawingrid
author
magic-numbers
delphi-xe3
winrt-httpclient
visual-c++-2010-express
dynamic-binding
qt4.6
snapjs
tridion2009
mvs
sequelpro
bulbs
xgettext
pstree
responsetext
rubycas
adsl
pantheios
mvccontrib-grid
yajl
webrat
associativity

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App