I want to give my frontend a list of img links/srcs. the goal is to make the front end as smooth as a web-app. I plan on having those images preloaded everytime a certain action is performed (like turning on a set of list view filters). Whats the best way to achieve this type of thing?
rjco joined the channel
Nemus has quit
destnicek joined the channel
anthony25 has quit
dman777_alter
On a normal 404 django doesn't try to get the 404.html page ether
sligodave has quit
clime has left the channel
van- joined the channel
FunkyBob
it would normally look for a 404.html
mattmcc
It just doesn't require one anymore.
destnicek
hi i would like to ask.. I've created loop database data on production server and one page cannot be loaded because of memory error.. I would like to ask what can happen when I delete one item of this loop? If I remove item in the database it should fix the problem but I am not sure what happen what can occur in python/django thankou
dman777_alter
FunkyBob: ya, I looked in the chromium debug network and it doesn't send one. But I have one in my template directory.
FunkyBob: oh wait, sorry...there was a templating issue in it
boos3y has quit
natea has quit
FunkyBob
destnicek: that's rather vague
destnicek: are we to guess you have a model with a foreign key to self?
destnicek
FunkyBob, the structure is many2many for user groups which should be a tree but accidentally its a loop now
mitha has quit
harijay has quit
Itkovian has quit
Nemus joined the channel
rakiru
just asking this once more before i go make an SO post: i'm wondering how to go about doing this admin inline thing: http://dpaste.com/1802232/
unstable
I have some query set with Comment objects, how can I make it so out of my potentially hundreds of COmment objects.. I only want objects that has a unique attribute/instance variable in the comment model, foobar
Goopyo has quit
jessep_ joined the channel
rjco has quit
FunkyBob
destnicek: m2m for a tree? how unusual...
destnicek: so... what are you worried about?
rjco joined the channel
jessep has quit
jessep_ is now known as jessep
MultiColourPixel joined the channel
cjwelborn
unstable: mycomments.filter(myattribute=whatever)
destnicek
FunkyBob, what happen if i delete one item which is reference to another one via m2m table in django..
maugzoide has quit
FunkyBob
delete the item? or the m2m reference?
dshap has quit
destnicek
FunkyBob, does it trigger the database command which remove all cascading fields or python try to find all child ones and them by one?
unstable
cjwelborn: So there might be 20 comment objects, all with the same foobar instance variable. so foobar links to the same object on all 20 comment objects. I want to find the 1/20 comment objects that has the latest 'created' attribute date, out of the 20, and get rid of the rest in the filter.
This is what I have so far.. but I want uniqueness in the comment objects, so comment.goal is unique.. and it picks the comment.created that is the most in the future, for each comment.goal that is the same.
Destos has quit
anthony25 joined the channel
cjwelborn
unstable: maybe use .latest('created_gt') (like: Comment.objects.filter(...).latest('created__gt')
knownasilya has quit
willingc has quit
or latest('created') .. i think
JerryT has quit
unstable
cjwelborn: That only returns me one object if I do that.
cjwelborn
unstable: sorry, i'm misunderstanding the question..
dman777_alter has quit
unstable
So I have say 200 comment objects, but some of the comment objects have the same goal attribute object, say "goala", so 5 of the comment objects have comment.goal = "goala", I want to take the 1/5 comment objects, where comment.created is the latest.
So that would make it 196 comments, instead of 200
but the .latest('created') give me 1
ctcg joined the channel
MultiColourPixel joined the channel
cjwelborn
oh, you want to remove the latest comments from that queryset, and keep the rest?
MultiColourPixel has quit
samuel has quit
natea joined the channel
MultiColourPixel joined the channel
samuel joined the channel
schinckel joined the channel
magicflakes joined the channel
unstable
If any of the queryset has an attribute 'goal' that is non-unique, I want to make the queryset have uniqueness with the 'goal' attribute. The way I decide what to pick, is the comment with the latest 'created' attribute should be kept, the rest I don't want in the queryset.
sorry if my language/communication is confusing, my English isn't good.
oblikoamorale has quit
VadtecWk has quit
Vadtec has quit
b10n1k joined the channel
ctcg has quit
Vadtec joined the channel
VadtecWk joined the channel
msheiny joined the channel
cjwelborn
I think I understand what you are saying now, but I personally don't know of a quick django chained function to do that. I personally would have to move the operation in to a for-loop after getting the initial queryset. (and then remove the non-unique comments, keeping only the latest comment)
Leeds joined the channel
Ergo has quit
unstable
So there might be multiple non-unique goals, so 5 comments might have comment.goal = "goala", another 8 comment objects might ahve comment.goal = "goalb", etc. So I would pick 1/5 and 1/6 that have the latest comment.created time
CodenameTim has quit
joelones
: i have a form with two submit buttons, but on click on the second submit button, i'd like to skip validation of certain fields, is this possible?
samuel has quit
oblikoamorale joined the channel
arietis joined the channel
dlogs has quit
emorrow joined the channel
dlogs joined the channel
nkuttler
joelones: isn't the value attribute of the submit button passed along? then you could decide what to valuate
validate..
Nemus has left the channel
joelones
nkuttler: yes i do know what button is pressed and how to test for it, but how exactly do you validate certain fields?
I'm getting a 'DataError' 'integer out of range' on a django model I'm making, even using the admin interface. So, I believe there's an issue with the table structure (using Postgres). Anyone know a way to nuke a table and remake it?
^ without nuking the entire app...
joepeg joined the channel
maugzoide joined the channel
vovanbo has quit
atlasloewenherz joined the channel
mihow has quit
HowardwLo
mattmcc: when using urlencode, it only gives whats already in the url. Is there a way to convert GET params to the url? Like displaying POST input's in the url