Re: Multiple fields without manytomanyfield?

2008-06-25 Thread Joel Bernstein
I don't suppose a CommaSeparatedIntegerField would work, would it? You'd lose some querying options that you'd have with a foreign key relationship, but that may not be important to you. On Jun 25, 10:37 am, Xan <[EMAIL PROTECTED]> wrote: > sorry models.list(integer, max=unlimited) > > On Jun 25

Re: Dictionaries, templates and best practices

2008-06-17 Thread Joel Bernstein
le': 'My First Title'}, 1: {'post': 'My > Second Post', 'title': 'My Second Title'}} > > and it goes on and on > > If I could iterate over it, like post.0.title, then post.1.title and so > forth, it would be perfect > > Thank

Re: Media variables confusion

2008-06-17 Thread Joel Bernstein
Generally, Django could not care less where you put most of your static media files. There are two main exceptions, though: 1. Django needs to know the URL to the media files for its admin application (ADMIN_MEDIA_PREFIX) 2. Django needs to know where in the server's filesystem it should put newl

Re: Dictionaries, templates and best practices

2008-06-17 Thread Joel Bernstein
I could be completely mistaken, but can't you replace 'post.0.title' and 'post.0.post' with 'x.title' and 'x.post', respectively? On Jun 17, 1:50 pm, "Juan Hernandez" <[EMAIL PROTECTED]> wrote: > Hey there > > I've been practicing for a while with the template system and I have some > questions:

Re: iterate over alphabet in template

2008-06-17 Thread Joel Bernstein
For an easy (but locale-dependent) way to get a list of the uppercase characters in Python, try string.uppercase http://www.python.org/doc/2.3/lib/module-string.html Just add that list to your context, and you should be ready to go. On Jun 17, 12:03 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote:

Re: Overwriting the delete() Method in a Model

2008-06-17 Thread Joel Bernstein
My fault, I must have skipped right over that part. It seems that it *does* send pre_delete and post_delete signals, but does not call custom delete methods On Jun 17, 9:51 am, Daniel Hepper <[EMAIL PROTECTED]> wrote: > > It isn't very clear from that sentence which of the two methods Django > >

Re: Overwriting the delete() Method in a Model

2008-06-17 Thread Joel Bernstein
The main issue here is that there are two types of batch deletes in Django: 1. You can query for the models you want to delete, loop through the queryset, and delete them each individually. Your custom delete methods (if any) will get called, and you'll get pre_delete and post_delete signals. Tha

Re: Is there a HTML table widget for Django?

2007-12-19 Thread Joel Bernstein
I've always wanted a widget like that to replace the current many-to- many selection widgets with a simple list of checkboxes. On Dec 19, 10:15 am, Jonathan Buchanan <[EMAIL PROTECTED]> wrote: > shabda wrote: > > Is there a widget which can generate HTML tables from within django? > > > My requir