hello. after implementing pagination, i got some very strange behaviour. my app searches the js and css files no more in the static_url dir. instead it is looking in my shop path and finds nothing. has anybody an idea? thanks
is there an easy way to get the "uptime" of my django app (programatically) ... in my case that would probably be the last time runserver was launched
(or uwsgi was restarted)
void
rocky: set in settings.py a variable, like START_TIME = datetime.datetime.now()
rocky: it will be initialized only once - when the server is started
home joined the channel
jderosa has quit
rocky
perfect, thanks
codepython777 joined the channel
void, i need the START_TIME to be timezone aware, i've enabled timezones in settings but if i use django.utils.timezone.now() i get a dumb DATABASES is improperly configured error
lyrae joined the channel
void
rocky: that's because utils.timezone import settings to check whether USE_TZ is True or not
rocky
void, any way around that?
void
rocky: possible workaround would be to define variable in the models.py of one of installed apps, I think
rocky
i guess i could just do what timezone.now() does manually with tzinfo since it always uses UTC
void
rocky: yup, that's other variant
myusuf3 joined the channel
myusuf3 has quit
home
so
if you dont indent stuff
you get messed up?
having trouble enabling admin page.. in 1.5
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
Im trying to display nested comments by comparing the depth of the current comment with the previous comment depth. But problem is how would i refer to "previous" item in a loop, and that too in a django template. Any ideas?
unbit has quit
unbit joined the channel
void
pandu101: as far as I know, there is no built-in possibility for that.
pandu101: you need to write some custom filter or template tag
pandu101
ok... I was trying to avoid that but looks like that might be the only way. ok thanks.
hoot has quit
pandu101 has quit
ambar joined the channel
wfq
hi guys
fernandogrd joined the channel
is there anyway to retrieve data from database in which timestamp are already json-formatted? I'd like to avoid just going through the all the rows again to format with json standards
Dettorer has quit
Dettorer joined the channel
when using simple json it does not like it datetime objects so I have to firstly convert it to string
cro has quit
home
hey guys
I am new to using databases and django
kenbolton joined the channel
but I am getting an error from the Writing your first Django app, part 2
I keep getting a database error..
rocky has quit
For example: column polls_choice.poll_id does not exist
I think I might have deleted it..by mistake XD
NVM fixed it
it was looking for poll_id, so I changed polls_id, to poll_id