Prefix for URLs?

2007-01-24 Thread vfoley
Hello, one thing that bugs me about URL patterns is that you can specify a prefix only for the view functions to call, not for the URLs to match. A quick example web request: http://localhost/project/view/1/ urls.py: urlpatterns = patterns('', (r'^view/(?P\d+)/$', 'myproject.myapp.views.view'),

filesizeformat filter

2007-02-01 Thread vfoley
According to the Django template documentation for developpers (http:// www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters), a filter shouldn't raise an exception, it should silently ignore errors. The filesizeformat filter raises an exception for an inexistant

Re: filesizeformat filter

2007-02-01 Thread vfoley
I just saw that filesizeformat expects a number bytes. So the culprit in my case would be get_file_size. Not sure if this one should fail silently... On Feb 1, 12:39 pm, "vfoley" <[EMAIL PROTECTED]> wrote: > According to the Django template documentation for d

Re: filesizeformat filter

2007-02-04 Thread vfoley
ECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > That does sound like a bug to me, can you file a ticket with an > example of where it's going wrong (i.e. what value you're giving it?) > > Cheers, > Simon G. > > On Feb 2, 6:43 am, "vfoley" <[EMA

Newforms: colon after label

2007-03-27 Thread vfoley
Hello, I rewrote the forms portion of an application by using newforms. It's pretty nice, however there is something extremely annoying: newforms automatically adds a colon after labels (hopefully, my formatting is correct): Out[58]: class ExampleForm(forms.Form): name = forms.Char

Ticket #5172 discussion

2007-09-24 Thread vfoley
SmileyChris added a ticket to propose extending the for loop tag to support numerical looping. I posted a patch that adds such a capability and includes a few tests. Documentation is still lacking. Let me know what you think, here are some code examples: {% for i 1 to 5 %} {{ i }} {% endfor

Re: Ticket #5172 discussion

2007-09-25 Thread vfoley
<[EMAIL PROTECTED]> wrote: > On 9/25/07, vfoley <[EMAIL PROTECTED]> wrote: > > > > > SmileyChris added a ticket to propose extending the for loop tag to > > support numerical looping. I posted a patch that adds such a > > capability and includes a few tests.