2008-8-20

23:41 jinzo
weird, I think multiple db would be avesome if done right
23:41 damonj
kojiro: by current publisher, i mean the one that's being accessed when the function is executed
23:41 mattmcc
It's theoretically a lot easier to implement multi-db after qsrf.
23:42 damonj
kojiro: for instance, if you try to edit a Publisher, this method will run before it displays the Publisher information
23:42 kojiro
damonj: it's not obvious to me that any is being accessed when render_change_form(...) is run
23:42 gaztanshana
what is qsrf?
23:43 damonj
kojiro: i'm sorry. i'll try to be more clear. this method is overriding a method in the admin so that I can pass more variables to a pre-made admin form
23:43 gaztanshana
So much stuff to read up on.
23:43 kojiro
damonj: render_change_form is a method of a PublisherOption, which afaict doesn't specifically relate to a given Publisher *except* as defined by your database's entity relationships, which are not clearly defined in your paste...
23:43 mattmcc
gaztanshana: The queryset refactor branch, it made some fairly significant changes to the ORM's internals.
23:43 kojiro
damonj: can you paste super?
23:43 damonj
kojiro: super is django.contrib.admin
23:43 kojiro
damonj: ah
23:44 gaztanshana
mattmcc; This is something that will be implemented later?
23:44 mattmcc
No, it was merged some time ago.
23:44 gaztanshana
In what way does it make implementing multi-db easier? Development in django or for me as "end user" hehe
23:45 jinzo
I would bet dev. in django :P
23:45 gaztanshana
Oww, I'd love to find out how to make it available to the world. But some tasks are beyond my scope. :/
23:46 Killarny
can anyone tell me if this is a bug: http://dpaste.com/72803/ or am I doing something wrong? I'm using similar code to what's documented here: http://www.djangoproject.com/documentation/mode...
23:46 djangofan
magus: looks like its working now. i can access the css n js files directly now. let me check. if it does not work then i'll paste the error message using dpaste
23:46 kojiro
damonj: I'm sorry, so far I can only think to search the database itself for some foreign key on Publisher. I don't think that's what you really want.
23:46 djangofan
thanks a lot
23:46 djangofan
i did make some changes in the settings
23:47 mattmcc
Killarny: If you want to keep models in a module that isn't called 'models', you need to do a little hackery with the app_label option.
23:47 Killarny
never heard of that..
23:47 FunkyBob
now you have
23:48 FunkyBob
most people don't split their models out into multiple files
23:48 kojiro
damonj: I guess what I'm saying is that if PublisherOptions has a Publisher object, it should be rather obvious what it is. The programmer hopefully named it something clear, like self.publisher, or self.current_publisher, or something
23:49 kojiro
but it doesn't make contextual sense that a PublisherOptions would have a single Publisher
23:49 jarrod_
hey whats the new method for saving an uploaded file? no longer model.save_member_file() ?
23:49 FunkyBob
jarrod_: check the docs.. it changed a couple of weeks ago
23:50 mattmcc
23:50 jarrod_
do i have to utilize chunks() directly?
23:50 jarrod_
i saw that
23:50 gaztanshana
seemingly all python mysql integration is far at hand
23:50 gaztanshana
for webdevelopment
23:50 kojiro
I've never heard anybody say "far at hand" before
23:51 rozwell
gaztanshana: what exactly does that mean?
23:51 gaztanshana
I like being playful.
23:51 kojiro
it's kind of an ironic juxtaposition
23:51 gaztanshana
hehe, yeah. :)
23:51 damonj
kojiro: sorry about that, i was afk for a sec. thanks for the help anyway. i'm going to try and find a way around this.
23:51 gaztanshana
rozwell, well, like i said, using python for a website admin panel seemed like a cool idea, but there is only a rather minimal db api
23:52 kojiro
damonj: good luck
23:52 rozwell
gaztanshana: compared to what?
23:52 kojiro
damonj: you could always execute a bare SQL statement that matches up a known with an unknonw
23:52 gaztanshana
my own expectations hehe
23:52 kojiro
unknown*
23:52 mattmcc
gaztanshana: Well, libmysqlclient isn't a very elaborate library in the first place.
23:52 kojiro
gaztanshana: you were expecting something from mysql?
23:53 mattmcc
gaztanshana: If you're looking for a lot of higher level features, you probably want to look at higher level tools like sqlalchemy.
23:53 rozwell
i mean you've got a connection and a cursor, what else do you need?
23:53 damonj
is there a self tostring method that's inherent for every object?
23:53 mattmcc
damonj: __unicode__ ?
23:53 gaztanshana
well alright, plus sqlalchemy seems interesting
23:54 damonj
can i do self.__unicode__ ?
23:54 mattmcc
Well, normally you'd do str(obj)
23:54 kojiro
damonj: according to the tute, you need to define __str__(self): return self.name (or something appropriate)
23:54 jinzo
why would you do that ?
23:54 damonj
i want to see what's inside of it
23:54 mattmcc
Oh.
23:54 jinzo
__unicode__ is prefered, as it get's converted down if __str__ is needed.
23:54 mattmcc
Then you're actually asking for introspection, like dir()
23:55 kojiro
jinzo: eh, then the tute needs to be updated! ;)
23:55 jinzo
some python magick yes :)
23:55 damonj
what's dir do?
23:55 jinzo
it'll display all functions/methods that can be done on a object
23:55 mattmcc
The current tutorial doesn't use __str__, only the ones for past releases.
23:55 jinzo
23:55 kojiro
mattmcc: ah
23:55 kojiro
<-- behind the times
23:55 jinzo
^^ damonj
23:55 damonj
ah, is there anything that displays all the variables that something has?
23:56 mattmcc
jinzo: That's... not where dir() comes from.
23:56 jinzo
damonj, scrach that url, I clicked it too quick,
23:56 jinzo
mattmcc, I was too quick, sorry for that
23:56 jinzo
23:57 jinzo
again, I stay corrected ( & note to myself, that I need to sleep as I'm talking/coding nonsense lately )
23:57 kojiro
23:57 kojiro
more general talk about introspection
23:58 kojiro
but dir() is there as well
23:58 jb0t
if i add request to the context processors, and i am allowing users to create emails by providing a template that uses the {{variable}} style replacement, will that be subject to them having the ability to do something like {{request.user}} ?
Page 37 of 37   ← Previous  (3,682 total)