less locking in the db and less connection overhead
Fuyou
setting atomic on particular views you mean?
apollo13
yeah, only set atomic where you really need it and leave the rest in autocommit
Fuyou
OK, thx
well, my purpose originally is [for a in many_a: a.save()] [b.save() c.save()]
where [] is atomic
Cromulent joined the channel
so a save()s uncoditionally and b, c only together. Am I doing it right?
mmcardle joined the channel
apollo13
depends on your requirements
if that's what you need, probably yes
Fuyou
a is tags. New tags should be created any way. Items ItemContainer and tag m2m binding should be created only together
otherwise my view is f***ed
mmcardle has quit
apollo13
that's one way of putting it :)
Fuyou
It's still view problem as well
apollo13
but yeah, you can wrap stuff which should get created together in "with atomic"
Fuyou
That is how I did it
stwe joined the channel
scott_w has quit
scott_w joined the channel
zhost joined the channel
bmispelon joined the channel
scott_w has quit
hm, it seems it was not my js which messed up
ripping image from remote site gives me preview on my page
it gets 403ed by remote
but if I copy link to my browser it loads
xchu joined the channel
Leeds joined the channel
apollo13
Fuyou: remote sites often block you
also security policies in the browser might be in effect
vakaras has quit
Fuyou
if I manually type http:// before image (remote) url it loads
I don't get what's going on
what_larks has quit
but http:// is in href ofc
arietis joined the channel
loads now
Oo
_Qman joined the channel
Cromulent has quit
Titanomachy has quit
Cromulent joined the channel
notleigh has quit
Guess is that FF is messed up somehow, but ... oh, that Konqueror >.<
Cromulent has quit
hm, no it's not FF problem
Konqueror doesn't load image to my page, but still I can view it
Tjati joined the channel
If remote server were blocking me (which would be plausible) how come I can urllib.read it ?
Titanomachy joined the channel
wwpeletroniks joined the channel
jeffisabelle joined the channel
kezabelle joined the channel
hhatch joined the channel
and I can see no pattern on how it gets or doesn't get displayed. Except that reloading my page has high probability it won't display even if did before
sry for offtop, but today is full of weird shit going on
scott_w joined the channel
jeffisabelle has quit
what_larks joined the channel
zeissoctopus has quit
Reflow joined the channel
Ariel_Calzada joined the channel
djangonoob
I have JS-code with {% url %} tags in templates and now I want to put the code in an external file, what is good practice to not hard code the urls?
shredding has quit
kezabelle
attach the URL to a DOM node, and have the JS ask for the value
[there's also a couple of packages which expose functions which return named urlconf patterns to JS, but I've never used any of them]
bigmatt joined the channel
what_larks has quit
mmcardle joined the channel
zexcriz joined the channel
zexcriz
is python more faster and secure than php ?
was just curious
Tjati has quit
hhatch has quit
arietis has quit
mmcardle has quit
fesener_ joined the channel
mattboll_ joined the channel
mattboll_
hi, i've got an IntegerField in my model, but when i make a for like that : for x in xrange(board.tailleX): it says an integer is required
scott_w has quit
when i print board.tailleX i've got u'7'
any idea ?
what_larks joined the channel
scott_w joined the channel
arietis joined the channel
Ariel_Calzada has quit
iqualfragile has quit
shredding joined the channel
leandroa joined the channel
scott_w has quit
Tjati joined the channel
quetzakubica joined the channel
ionelmc joined the channel
young001 joined the channel
culturelabs has quit
ok, u means unicode, i had to cast with int();
greg_f joined the channel
zexcriz has quit
hhatch joined the channel
hyperair joined the channel
Fuyou
mattboll you doing something strange, if it's integerfield it should return integer values
jarshwah has quit
winmutt joined the channel
winmutt
hi
For camel case model names like class PersonType(models.Model) will this turn into my_app_person_type? Also is there a way to remove my_app_ for all models? Do I just set db_table='' in Meta?
mattboll_
Fuyou: yeah i know, i don't really understand why it was put as unicode, i get it with request.POST['sizeY'] and it comes from a select <option value={{i}}>{{i}}</option>
kezabelle
winmutt: no, db_table is literally the table name
mattboll_: request data is *always* strings
what_larks has quit
Fuyou
yeap, why you don't use django form?
kezabelle
This is why forms exist. So you can map crap request strings into real useful values
Fuyou
which would coerce it to int if set properly
tomchristie joined the channel
demi has quit
newzen has quit
Cromulent joined the channel
Tjati has quit
djm- joined the channel
rafales has quit
valgrind has quit
tomchristie has quit
rafales joined the channel
wwpeletroniks has quit
hm, it seems my image display problem is with remote site scaling images
what is still weird as I considered that feature and fetch url from "original" link
adrian_lc joined the channel
hoot is now known as Masha
Masha is now known as Masha_
newzen joined the channel
huh, I declare remote site to be messed up. And my js not guilty. ^__^