there is a way of reproducing the bootstrap table-striped effect (changing table rows background color, one white then one grey etc.) using django templates, jinja or something?
Rawrby is now known as Shobo
frog3r
WeiJunLi: there's a special filter, let me look for it
Yeah, that's probably worth filing a documentation bug report for.
dvtester44
ok thanks!
xterm has quit
pilva has quit
jtri has left the channel
saschpe has quit
jessamynsmith joined the channel
saschpe joined the channel
jMyles has quit
eduardomartins joined the channel
garrypolley joined the channel
garrypolley has quit
eduardomartins has quit
veb joined the channel
jessamynsmith has quit
LotusEcho has quit
jiang42 joined the channel
jtri joined the channel
dting joined the channel
jtri
what is the effect of adding a field like this to a model: ufile = models.ManyToManyField(UFile, through='UValue') ? I don't think it's changing the db schema... does it matter for ORM queries?
maybe db indexing...
jiang42 has quit
migrations say: Add field ufile to user ... but no, i don't see any column added to db
is there a way to sql assocated with a migration?
trying sqlmigrate
yeah, there's no sql associated... so does it matter to the django ORM if this field exists?
optikalmouse joined the channel
optikalmouse has quit
mattmcc
It's a many-to-many relationship.
jtri
mattmcc: fully understand it's a m2m, does it matter to the ORM if i remove it? it doesn't matter to postgres it seems
mattmcc
Huh?
jtri
I have this going on: model1 ---> model2 <---model3
so model2 is a join table
and it has some extra properties...
and for some reason, i had tacked on the extra notion about the the "through" relationship... but since I've explicitly made reference in model2 of the fk relationships, does the extra ufile = models.ManyToManyField(UFile, through='UValue', help_text="") on model1 matter?
capella-da-star joined the channel
mattmcc
Oh, so your model has both an FK from model1 to model2 and the M2M?
rray
hi
so i'm using django with postgres
jtri
by virtue of the fk fields on model2, it's a m2m... trying to figure out why i added the extra field to emphasize it
rray
and i try to use Value(now(), output_field=DateTimeField()) in a query
but it produces a syntactically incorrect postgresql query
but it turns out that I can't tell what difffernece the explict ManyToManyField entry makes?
mcspud joined the channel
eka_ joined the channel
hmm, it also seems that "some of the related manager’s methods are disabled" when you use an intermediate model...
arlefreak has quit
so i guess, i'm just wondering, if the ORM depends on that ManyToManyField being specified, but the DB does not
and also i guess, if there's a sacrifice for using intermediate tables explicitly rather than letting djnago create them for ManyToManyField relationships?
mattmcc
Using your own intermediate model has some caveats, but on the other hand, since it's an actual model you can just do the same sort of operations from there instead of from one of the ends.
eka_ has quit
jtri
mattmcc: ok, that makes sense, and it's more explict to me