setlang and translated url patterns

2012-08-13 Thread Michel Thadeu Sabchuk
Hi guys, I'm doing a site in english and portuguese and a cool thing I'm using is translated urls. The only problem is that changing the language through django.views.i18n.set_language fails because it try to redirect to the HTTP_REFERER and I didn't see how to set the proper next value so the

Re: Proposal: make app index optional

2012-01-03 Thread Michel Thadeu Sabchuk
Hi Russ, > it would seem logical that improved > configurability of these views (e.g., making the "home" view > user-configurable) would be a logical outcome. In fact, I propose an configurable option to keep backward compatibility but, in a refactoring, I would suggest to get rid of the app inde

Proposal: make app index optional

2011-12-27 Thread Michel Thadeu Sabchuk
Hi guys, Me and some grappelli developers are talking about the possibility of grappelli make the app index optional. This would be very useful once I can customize the index page and therefore, sometimes the app index messy the things reather than organize access. We all agree that this configur

Re: Field localize useless

2010-10-19 Thread Michel Thadeu Sabchuk
Hi Russell! > Even if you are using L10N, there are occasions when localized widgets > *aren't* the right thing to do. > > Consider as an example: Australian postcodes are 4 digit numbers. It's > entirely reasonable that they might be stored as an IntegerField. But > it would be completely inappro

Re: Field localize useless

2010-10-11 Thread Michel Thadeu Sabchuk
Hi Russel! > > While I digging to find the bug, I see that the DecimalField (and even > > the Field class) uses a "localize" attribute. I think this localize > > attribute is useless and I not alone: > > Well, no - it isn't useless. It was introduced for a very specific reason. > > Even if you are

Field localize useless

2010-10-08 Thread Michel Thadeu Sabchuk
Hi guys, how are you? I had problems with DecimalField and localize input/output. I found the bug and I'm working on it: http://code.djangoproject.com/ticket/14101 While I digging to find the bug, I see that the DecimalField (and even the Field class) uses a "localize" attribute. I think this lo

Generic views and select_template

2008-11-25 Thread Michel Thadeu Sabchuk
Hi guys, I try to use generic views whenever possible in my projects. Sometimes, the generic view isn't sufficient to me, then I write a view that returns a generic view. The common case is a detail page with a list of objects related to it. This page can be a forum and his posts, a user and his

Re: form error get escaped on _html_output even if is a SafeString instance

2008-09-12 Thread Michel Thadeu Sabchuk
By the way, If you agree I can create a ticket and send a patch over the django1.0... Thanks On 12 set, 17:04, Michel Thadeu Sabchuk <[EMAIL PROTECTED]> wrote: > Hi guys, > > When I define a form and call it on a template like: > > ... > {{ form }} > ... > > The

form error get escaped on _html_output even if is a SafeString instance

2008-09-12 Thread Michel Thadeu Sabchuk
Hi guys, When I define a form and call it on a template like: ... {{ form }} ... The function as_table is called. The function calls _html_output to render the widget, the errors and help messages. The error is escaped with django.utils.html.escape function but I think django.utils.html.condit

Re: contrib.thumbnails approval?

2007-06-20 Thread Michel Thadeu Sabchuk
Hi, > The other option might be some sort of cron cleanup script. Since we > already need one to cleanup sessions, adding a thumbnail cleanup > wouldn't be too difficult. I think this is the best approach, just one note, how to identify thumbnails? Maybe we can create a "thumbnails" folder insi

Re: contrib.thumbnails approval?

2007-06-19 Thread Michel Thadeu Sabchuk
Very thanks guy! > I was thinking that perhaps this could alternately go in an `images` > contrib package in case there are other related image functions (the > captcha image generator discussed in the users group for example) I agree with you! But coming back to discussion again :D, what does

thumbnails bug

2007-06-16 Thread Michel Thadeu Sabchuk
Hi guys! I've found 2 bugs in thumbnails contrib package, in the file django/ contrib/thumbnails/base.py: 1) in the line 33-34: ... if os.path.splitext(filename)[1] != '.jpg': filename.append('.jpg') ... The filename variable is a string, this should be: ... if os.path.splitext(filename)[

Re: Resize images on demand

2007-04-23 Thread Michel Thadeu Sabchuk
Hi guys! I test your application and enjoy it SmileyChris, there is just a bug :), contrib/thumbnails/templatestags/__init__.py is missing, a "touch __init__.py" solves the problem ;) I like the way you return a Thumbnail object reather than just the string. Congratulations, very thanks to you!

Re: Resize images on demand

2007-04-19 Thread Michel Thadeu Sabchuk
Hi guys, On the user list I found a more complete solution: http://code.google.com/p/django-utils/wiki/Thumbnail Maybe this could be add as a contrib package? Best regards! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Resize images on demand

2007-04-19 Thread Michel Thadeu Sabchuk
Hi Jacob, how are you? > I'd be +1 on adding something as a contrib app. I've got some code we > use at work, but it'll likely be some time before I'm able to > generalize it enough for public consumption, so I'd be thrilled to see > an effort by a few committed community members... I done some

Re: Resize images on demand

2007-04-18 Thread Michel Thadeu Sabchuk
Hi Ok, sorry about that Jacob! Thanks for pointing me at right place! Best Regards, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers

Resize images on demand

2007-04-17 Thread Michel Thadeu Sabchuk
Hi guys! I done a cool functionality to my site, the possibility to resize images on demand. It's not 100% done yet but my goal is to do something like: ... class Article(models.Model): photo = models.ImageField(upload_to='some/path/some/where') def get_photo_200x200(self): retur

ImageField upload_to keyword could get a id wildcard

2007-04-17 Thread Michel Thadeu Sabchuk
Hi guys! I thinking on the possibility to put the id of object on the path where a image will be uploaded. Ex: class Test(models.Model): image = models.ImageField(upload_to='path/%Y/%m/%d/%(id)d') This way I can preserve the file name untouched and can be sure will have a unique filename. I