2009-7-3
| 23:29 | rozwell | as that's just going to be a pain |
| 23:30 | zalun|h | I'm building an application where there will be 4 types of users, each one will collect different data in the profile |
| 23:30 | zalun|h | hence the inheritance on the profile level |
| 23:31 | jackieO | all, those whom are in love with django say i. |
| 23:31 | jackieO | I |
| 23:32 | billh | Hello Friends |
| 23:32 | zalun|h | the goal is to add users on one page, as I assume operator will be an idiot |
| 23:32 | zalun|h | (they always are) |
| 23:32 | zalun|h | I'd have to minimize errors |
| 23:33 | zalun|h | as additional difficulty users are identified via email which needs changes in UserAdmin from the start |
| 23:33 | billh | Is there a way to specify the field names in a many-to-many relationship table? I know I can set the table name itself with the ManyToManyField.db_table argument, but can't find a way to set the field names |
| 23:35 | zalun|h | well, actually nobillh - related_name? |
| 23:35 | zalun|h | sry |
| 23:35 | zalun|h | billh: related_name ? |
| 23:35 | rozwell | zalun|h: well you'd probably get better results writing your own interface for this |
| 23:36 | billh | hmmm, I'll try that, but it seems for one side of the relationship only |
| 23:36 | zalun|h | which means standard Django way + Admin look? |
| 23:36 | zalun|h | yeah - I think I'll go for it :) |
| 23:37 | zalun|h | now to find a way to add the links to the stabdard admin... or actually I'll have to modify it anyway |
| 23:37 | Guest63511 | smileychris: sry for the bother, here is what I have: http://pastebin.com/m61a3537c |
| 23:37 | Guest63511 | smileychris: I get "global name 'comment' is not defined" |
| 23:37 | Guest63511 | smileychris: I'm obv misunderstanding a step heh |
| 23:37 | rozwell | zalun|h: what? |
| 23:38 | billh | nope; afraid that's not it, zalun|h |
| 23:38 | rozwell | zalun|h: no, i mean actually write your own interface |
| 23:38 | SmileyChris | |
| 23:38 | zalun|h | rozwell: there's no need to write the whole admin interface for that (I hope) |
| 23:38 | rozwell | zalun|h: you're not talking about an admin interface |
| 23:39 | zalun|h | rozwell: what am I talking about then? |
| 23:39 | rozwell | i don't know |
| 23:39 | zalun|h | rozwell: lol |
| 23:39 | rozwell | but you're talking about something for stupid people to add four different types of users with |
| 23:40 | rozwell | at any rate, do it however you want |
| 23:41 | SmileyChris | billh: you'd have to use the "through" option if you really needed to specify the field names |
| 23:42 | zalun|h | rozwell: Sure I'll do it, just asking for advice. I'd know how to write the app without admin interface - I'd even say it's easy. But the thing is, for unified interface I'd like to use Admin interface. Then you suggested my own interface. I'd think it would be good to write my own view/template which will look the same as the rest of the admin stuff. Do you agree? |
| 23:43 | Guest63511 | smileychris: I cant do a syncdb when I use label='' in the constructor for textarea, i get an unexpected keyword arg |
| 23:43 | SmileyChris | Guest63511: because you're doing it wrong - textarea is a widget, not a field |
| 23:45 | SmileyChris | Guest63511: try forms.CharField(label='', widget=forms.TextArea) |
| 23:45 | Guest63511 | smileychris: yes, just did that, it works! |
| 23:45 | Guest63511 | smileychris: thank you very much for all your help |
| 23:50 | billh | that did it, SmileyChris. Thanks! |
Page 17 of 17
← Previous
(1,641 total)