2008-8-26

22:58 dgrant
graham: define a foreign key from nickname to person
22:58 beetle_b
Question: Please see http://dpaste.com/74081/
22:58 graham
Magus-, dgrant: I understand that, but can i create something for Person so that it would be easier to query all the records that point to it?
22:59 wmealing
FunkyBob: hows it going ?
22:59 dgrant
in the Nickname class, define person=models.ForeignKey(Person)
22:59 ViRUS
ViRUS, vertical center is not possible with CSS alone. One needs the image height. Or half of it when tricking it with the margin.
22:59 Magus-
graham: you do NOT understand it - IT ALREADY EXISTS
22:59 Magus-
reverse relations are made for every relation pointing to it
22:59 Magus-
automatically
22:59 Magus-
if you're wanting to combine MULTIPLE relations, you need to be clear on that - if that's the case, no, you can't do that quickly
22:59 dgrant
graham: what more do you want than person.nickname_set.all()
23:00 _pye_
what's the best practice these days for uploading an image and resizing it to fit within certain dimensions? Should I use ImageField to upload or URLField?
23:00 dgrant
Sorry above I wrote "Person.nickname_set.all()" which implies I that nickname_set was like a static attribute, but I meant lower case "person", which is an instance of Person
23:01 _mattd
why would i get "Unknown command: 'startproject'" from django-admin.py ?
23:02 ViRUS
ok. I'll just stick to a custom tag or filter.
23:03 graham
dgrant, Magus- : Now I understand, i didn't realize that it was automatic, Thank you.
23:05 ViRUS
sorl-, are you the author of sorl?
23:06 mattmcc
Heh.
23:06 Zalamander
_mattd you're actually getting that from running django-admin.py, or from running code that emulates it?
23:06 _mattd
Zalamander: getting that from running django-admin.py in a dir that is not a django app
23:07 Magus-
because you have DJANGO_SETTINGS_MODULE set
23:07 Magus-
when that's set, startproject is unavailable
23:08 sorl-
ViRUS: yes, and there is i think a processor in the wiki that makes an image so and so big and places the image inside, use something like that or a table is what id do, with css and vertical positioning its so much harder
23:09 ViRUS
sorl-, mind a query. I'd like to discuss two ideas for sorl with you where I'm not sure wether this should be a sorl thing or something else.
23:09 sorl-
ViRUS: sure
23:09 _mattd
Magus-: huh. interesting.
23:12 davidcramer
tbh im getting pissed, non stop spam calls to my cell and home phone the last few days
23:12 davidcramer
cant get anything done i get interuppted every 2 seconds
23:12 amagee
hi.. i'm using django with pyisapie on iis and at the top of most responses i get this: http://dpaste.com/74085/ .. any ideas how to get rid of that?
23:14 wmealing
while(1)
23:15 wmealing
;
23:26 henbone
the template tags for the new comments work fine but when I try to put a comment form into a page, I get errors that seem related to comment_form_target
23:33 fuffwork
anyone know of a simple "counter" app for django that i can snap into a template?
23:34 envisean
anyone run into "incorrect integer value" warnings?
23:34 envisean
w/ mysql?
23:42 envisean
I'm getting a: Incorrect integer value: '' for column...
23:43 envisean
error, been googling this issue for a while
23:43 envisean
seems like other people have ran into it in the past
23:43 Magus-
yes, we saw the first time you asked it
23:43 Magus-
its still in the screen :)
23:43 Magus-
repeating it doesn't make us know the answer :)
23:44 sorl-
envisean: trying to set an integer field to ""?
23:45 sorl-
if you want an empty integer field you need null=True
23:46 envisean
sorl-: not quite, it's a model that's based off an existing table from another application
23:47 sorl-
so?
23:47 envisean
sorl-: wasn't having this problem earlier, but it's starting to throw it now
23:47 envisean
sorl-: what's interesting is that I don't even have any rows that have an empty value for that column
23:48 sorl-
because you cant...
23:48 envisean
sorl-: right, but i don't understand why it's throwing this warning
23:48 envisean
if that's the case
23:49 sorl-
do you have null=True?
23:49 sorl-
do you try to save a blank field to this column?
23:49 envisean
sorl-: no, i don't
23:50 Pilzbauer
when I use datetime.datetime.now() in a Model as default, the result is damn buggy..... is this known?
23:50 envisean
sorl-: i tried adding it in a second ago, but it didn't help
23:50 sorl-
envisean: you need to change the db too of course
23:50 osmosis
where can I read about implementing a web service using django ?
23:50 envisean
sorl-: not to my knowledge, i'm simply using objects.get() or filter()
23:50 sorl-
envisean: so only fetching data?
23:51 envisean
sorl-: yes
23:51 sorl-
so mysql complains... about incorrect data... and you are only fetching data... that means mysql has incorrect data?
23:52 sorl-
suspicious
23:53 netzwurm
Hm. it would be nice if the contrib.auth.admin would be able to work with UserProfiles.
23:53 netzwurm
or is that possible and I am missing something?
23:53 sorl-
netzwurm: inlines
23:53 envisean
sorl-: yep, which is weird, i try to do this in the shell, and it works fine
23:53 envisean
sorl-: doesn't throw the warning
23:54 envisean
ran the same commands my view is
23:55 sorl-
netzwurm: or just edit the extended part with fk to User...
23:56 envisean
sorl-: ok i think i found the issue, it's w/ the urls
23:56 sorl-
urls is painful to debug sometimes
23:58 netzwurm
sorl-: I am somewhat reluctant to do inlines as long as that means I have to redeclare UserAdmin in my application. Is there a way to add an inline to UserAdmin without rewriting the entire class? can I inherit?
23:58 Magus-
have you tried it?
23:58 sorl-
of course you can subclass
Page 28 of 28   ← Previous  (2,774 total)