2009-7-30

23:09 shadfc
SmileyChris: well thats no good =/
23:09 zanuxzan
Does anyone know what solutions there are for managing app name conflicts in django admin? Example: I have app called MyCompany.Youtube with model VideoManager which uses model Video from Syncr.Youtube. Problem is that both cant exist in the admin page, ie /admin
23:09 FunkyBob
morning
23:09 joshuajonah
Hi FunkyBob
23:09 FunkyBob
zanuxzan: well, you can override the app_name on your models...
23:10 FunkyBob
or, I'm sure there's a way to fiddle with them in the Amin model config
23:10 FunkyBob
or don't use the default admin publisher?
23:10 FunkyBob
have you investigated any of these logical options? or are you asking for help first?
23:10 mattmcc
Django in general doesn't cope well with duplicate app names right now.
23:11 aonweb
shadfc: if you not already looked at this http://www.pointy-stick.com/blog/2009/01/23/adv...
23:11 joshuajonah
I think Magus has a good article on it too ;)
23:11 wolfe
FunkyBob: who needs google when there is prime support on IRC, right? ;)
23:12 SmileyChris
aonweb: what has that got to do with shadfc's problem though?
23:12 zanuxzan
FunkyBob: I've had a brief look into solutions such as http://code.google.com/p/sorl-curator/ which seems a little extreme for what i want to do...
23:12 zanuxzan
il have a look at app_name (i was looking for app_label....)
23:12 aonweb
SmileyChris: wasn't he looking for a formset with kwarg?
23:13 SmileyChris
aonweb: he wants to make a formset of a form with a custom arg
23:13 SmileyChris
aonweb: which reading source doesn't look doable without changing internal methods
23:13 joshuajonah
Def ticket
23:13 joshuajonah
Then it will be in production in 2014
23:13 aonweb
SmileyChris: true , internal methods need to be overridden
23:13 aonweb
based on that article
23:13 SmileyChris
it'd be an easy change
23:14 joshuajonah
I cant sleep at night with a bastardized django installation
23:14 djangoblin
hi. how do I handle TemplateSyntaxError: 'unicodeescape' codec can't decode bytes in position 4-10: truncated \UXXXXXXXX escape ...where the offending word is the {% url ...%} templatetag after switching from py2.4 to 2.5?
23:15 aonweb
SmileyChris: i understand that as it is just passing in some extra param to be passed on
23:15 SmileyChris
aonweb: ah, i missed that CustomBaseFormset section - shadfc: that looks right
23:16 shadfc
yeah, it looks like itll do what I need. messing with formset internals a little though
23:16 aonweb
it is still overriding some private methods
23:16 SmileyChris
the __init__ method of BaseFormset should obviously be rebuilding kwargs and passing them through
23:19 zanuxzan
FunkyBob: mmm, i can find surprisingly little info on this, for instance i found this http://markmail.org/message/bpgmcihkniqnb5e3#qu... which being 2006 is surely not still the case?
23:20 procto
ivazquez|laptop: yesterday I asked about reducing persistent mysql connections and you said that the way to do that is to decrease wsgi processes and threads. I've got 2 p and 25 t. Reducing reduces responsiveness. Is that expected?
23:20 aonweb
Should usage counters be embedded within models or live outside of models? I prefer latter. is there any existing django plugin?
23:20 FunkyBob
zanuxzan: are you telling me you searched google before the docs? or am I misunderstanding yo?
23:21 zanuxzan
FunkyBob: I used the google search on djangoproject.com - for appname and app_name - then i used google
23:23 FunkyBob
fairy nuff
23:24 qwip
I want to hook up a signal handler for post_save for "django.contrib.auth.models.User" for one of my apps. I currently wire it up in the root urls.py file to be sure it is always hooked up first, but it seems out of place there.
23:24 FunkyBob
zanuxzan: did you then resort to reading over the Admin docs, in case your guesses at keywords were wrong?
23:24 qwip
Where does the connect belong?
23:24 ivazquez|laptop
procto: Of course.
23:25 ivazquez|laptop
You know have fewer instances handling connections.
23:25 ivazquez|laptop
*now
23:25 rasca
Hi, is there a way to make manage.py spit out sql for a different type of database than the one specified in settings.py?
23:26 andym_
rasca: no, just change settings.py
23:31 zanuxzan
FunkyBob: Yes i had previously read the ModelAdmin docs (as in 5 mins ago), and after reading it again, i thought i might try setting verbose_name for the Meta options on the model. After which, I realised that, all along there has never been a problem it has been showing up in the admin under the same app name :P
23:31 zanuxzan
FunkyBob: I just wasn't search for the model name... duh
23:31 zanuxzan
FunkyBob: thanks for the pointers anyway
23:34 rasca
andym_: thanks
23:34 FunkyBob
zanuxzan: np
23:36 guacchip
If I want to send data from a dynamically generated for from js to my django app, what's the best way? Other than JSON.stringify
23:36 qwip
If I want to hook up a signal handler in app A to a signal generated by a model in app B, where should the code for registering the handler go? (Right now I do it in the core urls.py file, but that seems wrong.)
23:36 andym_
whats wrong with sending a plain old get or post guacchip
23:37 andym_
qwip: doesn't matter, works anywhere
23:37 mattmcc
guacchip: jQuery's forms plugin makes it pretty straightforward.
23:37 guacchip
andym: I'm generating the form fields dynamically, so I won't know ahead of time how many fields I'll have
23:37 guacchip
matt, can you link me? That's probably the best way, since I'm using jquery already
23:37 andym_
guacchip: so, a browser can still do a post or get of a form
23:38 guacchip
Right, but what should I name my fields?
23:38 mattmcc
I'm fairly certain googling 'jquery forms' would suffice.
23:38 diogo
Hello people, how can I assing a variable for all my templates whithout assign in something like render_to_response ?
23:38 guacchip
Well, I figured there might be more than one forms plugin for jq, but thanks all the same
23:38 alf_makina
hi
23:39 andym_
diogo: you can make a wrapper method or use template context processors
23:39 andym_
or both
23:40 diogo
andym_ Nothing like a middleware ?
23:40 mattmcc
Middleware doesn't deal with templates.
23:40 andym_
no middleware is different
23:41 alf_makina
is there a way to find the real type or to get the specialized object in a query returning superclass instances ?
23:41 procto
ivazquez|laptop: right. that's exactly what I thought. So it seems I'm stuck between having enough wsgi processes and threads to handle the users and keeping few enough to reduce db connections
23:41 diogo
mattmcc andym_ What can I look for ?
23:41 qwip
andym, thanks for the answer, but how could it not matter? (I'll go try it out though, so I'll be back if I have problems.)
23:42 procto
ivazquez|laptop: there is no way to force closing of db connections periodically? transaction.commit() doesn't seem to do quite what I'd like :)
23:42 andym_
qwip: short answer, because thats how signals work, as long as the code is imported, that's all that matters
23:42 procto
ivazquez|laptop: thanks for the help btw!
23:43 ivazquez|laptop
Closing the connection periodically will slow down responsiveness regardless, and what happens if it can't connect due to too many connections?
23:44 procto
the issue is that I have some ajax that keeps hittin the db. I'm already caching responses to reduce, but when a few thousand users are using it at the same time...
23:44 procto
lots of max_user_conections exceeded
23:45 alf_makina
no answer for my question ?
23:45 qwip
andym_, thanks again! I guess I need to go read up on what is imported and in what order.
23:46 phretor
hello!
23:48 phretor
can I limit the content a user can change through the admin interface on a per-user basis? I mean, I need to grant users capability of changing their own user object only.
23:48 diogo
andym_ Thank you, I found that.
23:48 mattmcc
23:50 phretor
mattmcc: it's a greatly written article
Page 33 of 33   ← Previous  (3,284 total)