Re: rewriting urls

2006-08-13 Thread Matt McDonald
And in a more generic sense the APPEND_SLASH setting of the CommonMiddleware may be what you are looking for. http://www.djangoproject.com/documentation/middleware/#django- middleware-common-commonmiddleware On 13/08/2006, at 5:17 PM, Ivan Sagalaev wrote: > > a wrote: >> http://localhost/tod

Re: dynamic limit_choices_to issues

2006-07-04 Thread Matt McDonald
Shouldn't that be: limit_choices_to= {'meeting__application__name__exact':meeting.application.name} On 05/07/2006, at 6:53 AM, william wrote: > > I'm running with svn r-3275. > > I have the following models: > > class Application(models.Model): > name = models.CharField(maxlength=50) >

Re: Problem with DRY and feeding parent's template block

2006-06-22 Thread Matt McDonald
You can also make use of Inclusion Tags. Very easy to use: http://www.djangoproject.com/documentation/templates_python/ #inclusion-tags I use them for all dynamic sections that appear across templates. On 22/06/2006, at 8:32 PM, Malcolm Tredinnick wrote: > > On Thu, 2006-06-22 at 10:01 +,

Re: POST to view loses POST data

2006-06-18 Thread Matt McDonald
I have to agree that it should return false if there is no data. Otherwise how are you going to tell the difference between a POST with no data and a POST with data. Another alternative is maybe request.method.POST and request.method.GET for testing the method. On 18/06/2006, at 9:20 PM, B

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Matt McDonald
Hi John, The $ at the end of a regular expression means that it is the end of the string and nothing else comes after it. So '^polls/' would match 'polls/things' where '^polls/$' wouldn't. On a similar note the ^ character means the beginning of a string. On 06/06/2006, at 12:26 PM, John M w

Re: Ajax support, there is no need for reinventing the wheel

2006-06-02 Thread Matt McDonald
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jaroslaw Zabiello wrote: > I have heard that in Django 0.92 we will have added Ajax. We are having > 0.95 now (svn) and still nothing was added. :( > > Why? The idea is simple. Ajax is pain in ass if we would like to use > only pure JavaScript. So we

Re: xml

2006-05-24 Thread Matt McDonald
wiz wrote: > On 5/24/06, Mary Adel <[EMAIL PROTECTED]> wrote: >> How could i return the data from the database in a xml file with certain >> format using the views in Django > You can use generic_views + templates for printing XML in your format. > Or views + some pythonic XML-streamer. > > > Is

Re: xml

2006-05-24 Thread Matt McDonald
You might be able to use Django's Syndication Framework to output the XML by setting up a custom feed that uses your required format instead of RSS. Lots of information can be found at http://www.djangoproject.com/documentation/syndication/ Hope it helps. : ) Mary Adel wrote: > Can any one help i

Re: CharField with utf-8 handling

2006-05-24 Thread Matt McDonald
hironobu wrote: > nkeric wrote: >>> I guess it should be something reated to mysql's internal encoding? >>> AFAIK, you will need to specified mysql's encoding to utf-8 before >>> using it :) >> - since mysql version >= 5.0 :) > > Thank you. > > MySQL version is 4.1, so it may differ a little fro