Question about upload / FileField

2007-08-03 Thread ZhangshenPeng
Question 1: When I removed "blank=True" from FileField ,then use below method to upload file , but no matter whether your choosed file , the from valid will report error "This field is required." How can FileField work with newform without blank=True ? def file_fix_callback(field,

Question about {% url %}

2007-07-29 Thread ZhangshenPeng
when you use url pattern [a-z]+ and named it , then use in {% url %} ,everything is all right . when I change [a-z]+ into (title|attachment|date) django report error "unbalanced parenthesis". how to fix my code to do the right thing ? think code as below