2009-7-3
| 22:37 | djangoo | doing a proxy from IIS to apache would.. I think you need some thing that costs. |
| 22:37 | djangoo | true, i could do that |
| 22:37 | djangoo | the other way around would probably be easier |
| 22:37 | JoaoJoao | There is a IIS WSGI lib as well: http://code.google.com/p/isapi-wsgi/ |
| 22:37 | djangoo | i hear it's old and slow |
| 22:38 | rozwell | doesn't django run on ironpython? |
| 22:38 | Chun1 | any way of doing {% if foo in bar %} ? |
| 22:38 | apollo13 | Chun1: write your own tag or use one from djangosnippets |
| 22:39 | djangoo | iih, ironpython, i'm scared, does it ? :P |
| 22:39 | djangoo | i could try that alternative too. |
| 22:40 | rozwell | djangoo: at any rate, you could just compile pyisapie or whatever |
| 22:40 | Guest63511 | Anyone know how to remove the label text that's generated when I create widget? |
| 22:40 | Guest63511 | example: <tr><th>Name:</th><td><input type="text" name="name" class="special"/></td></tr> |
| 22:40 | Guest63511 | I would want Name: removed |
| 22:40 | djangoo | rozwell: yup. |
| 22:40 | djangoo | i have a week to come up with a working solution :P |
| 22:40 | rozwell | djangoo: well you only need an hour or so |
| 22:40 | ikanobori | rozwell: Sublclassing Command does return the same error though. |
| 22:41 | rozwell | ikanobori: then your code is busted |
| 22:41 | ikanobori | rozwell: /usr/bin/python: can't open file 'shell': [Errno 2] No such file or directory |
| 22:42 | djangoo | rozwell: sounds easy, but I don't have the right Visual Studio version for the project that is shipped with PyISAPIe, and i'm not very good at working around that problem :P |
| 22:42 | djangoo | rozwell: i'll have to research it up. |
| 22:43 | rozwell | djangoo: well there are free "express" versions of the last several visual studio releases available from microsoft |
| 22:43 | rozwell | djangoo: so i wouldn't think it's a big deal |
| 22:43 | rozwell | djangoo: and you don't really need the project junk anyway |
| 22:43 | JoaoJoao | you could also try sharpdevelop |
| 22:43 | djangoo cheers | |
| 22:44 | djangoo | i'll research it up |
| 22:44 | rozwell | christ, sourceforge keeps changing things up in completely useless and unpleasant ways |
| 22:44 | apollo13 | rozwell: yep, every version is getting version |
| 22:44 | apollo13 | the don't learn from their mistakes |
| 22:44 | apollo13 | they* |
| 22:45 | JoaoJoao | at least the ui doesn't suck as much as it did before IMHO |
| 22:45 | apollo13 | getting worse* |
| 22:45 | apollo13 | time to go to bed :/ |
| 22:46 | apollo13 | JoaoJoao: even more imo |
| 22:51 | Guest63511 | Anyone know how to remove the label text that's generated when I create a TextArea widget? |
| 22:51 | Guest63511 | This Textarea was created inside of a Form |
| 22:51 | Guest63511 | I can remove the colon via label_suffix, but how do i remove the label itself? |
| 22:53 | insin | Guest63511: how are you using the form in your template? |
| 22:54 | rozwell | Guest63511: widgets don't have anything to do with labels |
| 22:54 | rozwell | Guest63511: the form is responsible for rendering them |
| 22:55 | carlocci | Guest63511, you should check this out: http://docs.djangoproject.com/en/dev/ref/forms/... |
| 22:55 | _jonesy_ | Quick question on using get_or_create(). I have extended Django's User model and added a Profile class to hold extra info. When using User.objects.get_or_create() is it possible to pass in the extra info for the profile so both the User object and Profile objects get created? |
| 22:56 | SmileyChris | Guest63511: give your field a blank label (override __init__, call super, then you can use self.fields[fieldname].label='') |
| 22:57 | Guest63511 | rozwell: ah, ok. That is good to know |
| 22:57 | SmileyChris | _jonesy_: no |
| 22:57 | Guest63511 | carlocci: I will definitely read that |
| 22:57 | Guest63511 | smileyChris: I'm trying that now, thanks |
| 22:59 | xkenneth | where should I put signal handling code? |
| 23:08 | zalun|h | in the page http://docs.djangoproject.com/en/dev/ref/contri... it's said "Here you can do any pre- or post-save operations." is it the only place where the object is saved then? |
| 23:14 | rozwell | zalun|h: why wouldn't it be? |
| 23:14 | Guest63511 | carlocci: thanks for the link, but that's actually what I've already read on the matter and it has no useful info on this problem : / |
| 23:14 | brettgoulder | can someone help me? I am trying to follow along the Practical Django Projects book when I receive an error that says 'instancemethod' object is unscriptable at line 6 http://dpaste.com/63035/ |
| 23:16 | brettgoulder | this is my traceback http://dpaste.com/63036/ |
| 23:16 | brettgoulder | any ideas? |
| 23:16 | rozwell | brettgoulder: yes |
| 23:16 | rozwell | brettgoulder: stop subscripting the instance method |
| 23:17 | brettgoulder | rozwell: I'm brand new to Django, so I don't really understand what you mean |
| 23:17 | rozwell | brettgoulder: this is a python issue really |
| 23:17 | sebleier | brettgoulder should be query = request.GET.get('q', '') |
| 23:17 | rozwell | brettgoulder: but get is a method of dict/QueryDict |
| 23:17 | rozwell | brettgoulder: [] <-- subscript operator |
| 23:17 | rozwell | brettgoulder: () <-- call operator |
| 23:18 | brettgoulder | ok |
| 23:18 | rozwell | brettgoulder: so yes, you'd use request.GET.get('q', '') to get the value for key 'q' from the request.GET dict, or return an empty string if it's not there |
| 23:19 | brettgoulder | okay cool, thanks a lot rozwell |
| 23:19 | rozwell | anyway, i recommend you run through a python tutorial if you haven't |
| 23:20 | rozwell | and if you have perhaps maybe take a deeper look |
| 23:20 | brettgoulder | yea, i probably should |
| 23:20 | brettgoulder | been thinking about Dive Into Python, is that a good one to start on? |
| 23:21 | Guest63511 | SmileyChris: I'm getting super() argument 1 must be type, does this mean Form is an old-style class and thus I cannot use super? |
| 23:21 | zalun|h | rozwell: just asking - trying to understand as I want to create a page which will add/change two connected objects (user and profile) |
| 23:22 | SmileyChris | Guest63511: super(YourForm, self).__init__(*args, **kwargs) |
| 23:22 | rozwell | zalun|h: and the admin app wouldn't really do this |
| 23:22 | rozwell | zalun|h: unless you're talking about making an inline for the profile |
| 23:22 | zalun|h | not the standard one |
| 23:22 | zalun|h | I mean not without my changes |
| 23:22 | rozwell | ? |
| 23:23 | Guest63511 | smileychris: ah ok, ill give it another go, thank you |
| 23:23 | zalun|h | I think I'll need change the form, and views |
| 23:23 | rozwell | zalun|h: no |
| 23:23 | rozwell | zalun|h: just make an inline |
| 23:23 | zalun|h | rozwell: I know - that's simple |
| 23:23 | rozwell | zalun|h: make your own ModelAdmin for User |
| 23:23 | zalun|h | rozwell: The thing is I have more than one type of user profile |
| 23:23 | rozwell | zalun|h: then unregister the default one from the site if necessary and register your own |
| 23:24 | rozwell | zalun|h: then the admin app isn't going to work very well for you |
| 23:24 | flaccid | brettgoulder, rozwell i noticed that error in the book as well |
| 23:25 | zalun|h | rozwell: for the moment I have something like that: http://paste.mootools.net/d3275215d |
| 23:26 | zalun|h | and a template which is displaying standard form for Account with {{ test_val }} for testing |
| 23:27 | rozwell | zalun|h: it looks to me like you're overcomplicating things to begin with |
| 23:27 | rozwell | you're using inheritance for this aren't you? |
| 23:27 | zalun|h | rozwell: that was an idea as well :) |
| 23:28 | zalun|h | yes |
| 23:28 | rozwell | ugh, i dislike inheritance |
| 23:28 | zalun|h | Account(Profile), Profile --foreign_key--> User |
| 23:28 | zalun|h | I start to dislike it as well |
| 23:28 | rozwell | well i don't know why you're doing all this User stuff in the account modeladmin |
| 23:29 | rozwell | or whatever this is |