Re: Redirect middleware

2007-04-26 Thread Laurie Harper
oggie rob wrote: >> (r'^%s(?P[^?#]*)' % (root_url), 'apps.cms.views.render'), > Note that '?' is a special character, ... Nope; it's special outside a character class ([...]), but in a character class ? has no special meaning. L. --~--~-~--~~~---~--~~ You recei

Re: Select widget choices

2007-04-26 Thread Laurie Harper
Christian Markwart Hoeppner wrote: > I just noticed that it needs an iterable ot two-tuples. I wonder if > there's a way to automate the creation of such a sequence, when I need a > numbered sequence. Something like "for i in range(): list.push((i,i))" > or so? I'm pretty new to python :) Perhaps

Re: Recieving XML Documents over HTTP

2007-04-08 Thread Laurie Harper
johnny wrote: > I am doing REST, xml over http (sending and receiving xml documents), Those are two different and unrelated concepts. > which is simpler for me than XML-RPC. I am having problem with > receiving xml documents. You'll need to provide a much more detailed description of what you

Re: Related foreign fields in admin application

2007-03-17 Thread Laurie Harper
Atilla wrote: > Weeel, there is the newforms-admin branch. I haven't tried it myself > though, I've just seen people om the IRC channel discuss it. Judging > from the roadmap, it should be pretty usable. > > http://code.djangoproject.com/wiki/NewformsAdminBranch Awesome, thanks for the pointer :

Re: model relationship filtering

2007-03-16 Thread Laurie Harper
[EMAIL PROTECTED] wrote: > Hello, > > I have a site that offers a bunch of appartments for rent. Each of > these rentals has a image gallery showing the look&feel of that place. > My models currently look like this: > > class Photo( models.Model ): > name = models.ImageField( upload_to='rent

Re: Related foreign fields in admin application

2007-03-16 Thread Laurie Harper
Atilla wrote: > ... If you're using the newforms admin ... Is there one? The code in django/contrib/admin looks like it's using oldforms to me. If there's a version based on newforms somewhere I'd love to take a look :-) L. --~--~-~--~~~---~--~~ You received thi

Implementing an 'extent' query

2007-03-13 Thread Laurie Harper
Say I have two model classes, one of which is a sub-class of the other: class Place(models.Model): ... class Restaurant(Place): objects = models.Manager() ... [Note, I'm using model inheritance here, **not** a OneToOneField. The explicit assignment of 'objects' seems to be necessary or Re

'table per sub-class' mapping strategy

2007-03-10 Thread Laurie Harper
I'm trying to write a Django app on top of an existing database which was created for another project. That project was written in Java using Hibernate for the ORM, and the resulting schema is based on a 'class per table' strategy, giving something like this: Table: Page ID INTEGER PRIMARY KEY Nam