Re: Change render of RadioSelect

2008-05-05 Thread Michael Irani
Karen, That patch is actually kind of beautiful. Just in case someone else is looking at this as of the current codebase the custom renderer would like like this: class MyRenderer(RadioFieldRenderer): def render(self): return mark_safe(u'\n%s\n' % u'\n'.join([u'%s' % w for w in

Change render of RadioSelect

2008-05-05 Thread Michael Irani
Hello, I'm trying to manipulate the rendering for RadioSelect so that the form element shows up within my form differently than a . So far I've come across two options... Use straight form tags in my view, or to rework RadioFieldRenderer and RadioInput from widgets.py locally so that I can have a

Re: Adding ManyToManyField to Django models

2008-03-04 Thread Michael Irani
Michael, Your opinion on this makes sense and in the end I will probably just go with the wrapper approach, since it probably won't make that much of a difference anyways. My biggest qualm is that I'm trying to put together a strong foundation for the projects I'm working on and feel like this is

Re: Adding ManyToManyField to Django models

2008-03-04 Thread Michael Irani
One thing I dislike about the approach that's being pushed by the community, which is to have a one-to-one relationship between auth.User and your own 'Profile' model (or whatever you want to call it) adding all the functionality and relationships to the user-created Model is a bit much. I mean

Re: Adding ManyToManyField to Django models

2008-03-04 Thread Michael Irani
Evert, the situation is that I was trying to use the auth.User as my model and wanted to have it point to itself. Thereby not having my own model at all. I was curious as well about being able to subclass a prebuilt model, but from the reactions I've gotten towards this, it doesn't seem to be an

Re: Adding ManyToManyField to Django models

2008-03-04 Thread Michael Irani
I got some help on IRC and here's the conclusion. There is no way to add that mapping from auth.User to itself without hacking the django code, so what needs to happen is that I add a wrapper Model such as 'Profile' and add the ManyToManyField to 'Profile'. Thereby the mappings will happen within

Adding ManyToManyField to Django models

2008-03-04 Thread Michael Irani
I was wondering if it's possible to add a ManyToManyField onto a prebuilt Django model such as User... I know that it would look like this if I were to have created the model myself: class User(models.Model): watch = models.ManyToManyField('self', null=True, blank=True) I'm unsure how to