if you had a class with an attr and a property both named foo, from the foo property, how would you check the instances's foo attribute?
bnprk has quit
tonythomas has quit
ahuang joined the channel
josuebrunel joined the channel
nlh has quit
virusuy joined the channel
FunkyBob
ccmonster: you can't
you can't do that
the latter defined will override the prior
samuel
hello guys, I am trying to deploy a django app, but have run into some trouble. I did all my dev work on sqlite, and now I am trying to deploy to MySQL (5.6.26 @ Google SQL) However I seem to be running into some issue with the dates, they seem to be saved correctly, but when django pulls the values to show them it shows "None". The exact same code works perfectly well in dev mode
any ideas please?
FunkyBob
samuel: bizarre
samuel
yes very much
dcrouch joined the channel
ASonOfGod joined the channel
I can't figure it out. Im deploying to Google App Engine
and on app engine dev server everything is fine
its on MySQL that its now
not
keimlink joined the channel
apollo13
last time I checked app engine had big tables or so
FunkyBob
was about to ask
is it really MySQL? or just "MySQL compatible"?
joke2k has quit
samuel
MySQL 5.6.25
its google cloud sql
as far as I can tell its exactly MySQL
apollo13
also sqlite has no data validation, so whatever worked in sqlite doesn't have to work on another db
check the values with a standard mysql shell then?
samuel
ive been running around trying to "fix" "auto_add" and "auto_now_add" thinking it was that
so I decided to check the actual database
and the dates were there
as expected
nimomo joined the channel
fission6
is there any value using threads in uwsgi for a django application? processes yes, but unsure about threads
bcSquared joined the channel
apollo13
depends
fission6
on
apollo13
your app
ccmonster
there's no way for the property to access the instance attribute of the same name?
fission6
apollo13: go on!
apollo13
no
jMyles
fission6: threads share program state, which can be helpful. However, threads, in most but not all circumstances, are bad at handling concurrent CPU-heavy operations.
(most == almost all)
The main reason to use separate processes is to let the OS handle (in a far, far better way) CPU management. Contrary to popular belief, this is important even in single-core situations, but especially with multiple cores.
fission6
i dont see how threads would help
apollo13
that said you should absolutely enable threads in uwsgi!
samuel
apollo13 checked with a standard shell
fission6
well i am speaking about uwsgi but can think of justification for it
samuel
apollo13 funny thing is: they are there, I can use them to compare, etc...
just not display them
i CAN convert to string and format
apollo13
samuel: if I say, lalalallalalalalala mysql lalalalalallalalala will you hate me?
samuel
but its just nagging me that they dont display
hahahahaha lol
im about to give up and just use helper functions to display as needed
im not about to spend hours on this
just thought I would check first
fission6
not convinced on threads
samuel
django admin filters work too
apollo13
fission6: still, enable them, cause hey fuck uwsgi docs…
josuebrunel has quit
samuel: display where exactly?
samuel
as a column on the admin in the list
fission6 has quit
jMyles
fission6: Or, if you are really needing elegant control over concurrency, use hendrix instead of uwsgi :-)
samuel
thats the ONLY place they don't work
funny....
apollo13
samuel: how did you define them there, show some code please
samuel
just as a list = ['created', 'modified']
er... list_display
and they are DateTimeFields
choki has quit
BUT if i put in a function that returns a string of the datetime THEN it works!
don't ask me why
apollo13
ugh
basix joined the channel
tmTim
I haven't used Django in awhile. I forget how to make a table for a new model. Do I just add the app that the model is in to settings.py and run manage.py migrate? It isn't seeing my new model some how am I forgetting something?
choki joined the channel
using 1.8.3
samuel
apollo13 im on 1.8.7
if that is anything
apollo13
samuel: I'd throw gdb at it
samuel
can't
only happens when its on app engine
running on the app engine dev server it all works as expected
weird
joke2k joined the channel
ccmonster has quit
apollo13
then I am out of ideas to be honest
you can try modifying django source and include traces…
tmTim
I figured it out. makemigrations.
zeioth_ joined the channel
rain0r has quit
bryanp joined the channel
shadowbw has quit
samuel
apollo13 its not such a big deal. I can live with it
just curious
apollo13
lol
bryanp
Anybody know what it’d be called in Haystack search to achieve something like this query - “field:keyword” Doesn’t work by default I don’t think.
zeioth has quit
dcrouch has quit
iron_houzi
I am trying to get my wagtail app to load a query into the context trough a simple templatetag. The template.Node-object gets instantiated, but the .render() method never gets called in the template.. How can I investigate why the template isn't calling the object's .render() method?
FunkyBob
honestly, after Honza's talk this year, I can't see myself using anything by ElasticCache for search indexing
apollo13
that ^
FunkyBob
iron_houzi: can you dpaste your code?
bryanp
FunkyBob: Was taht for me? Search related?
apollo13
yes
oh see, I can answer for the FunkyBob :D
FunkyBob
bryanp: more or less
apollo13: well done, grasshopper :)
apollo13
wup wup :D
bryanp
So you’re saying to use ElasticCache? and not haystack?