Moving from PIL to Pillow

2013-02-27 Thread Marijonas Petrauskas
Hi all, Why isn't Pillow the recommended Django image library yet? PIL has been unmaintained for almost 3 years and has a number of annoying bugs (e.g. fails to open some valid JPEG files, maybe has some security issues as well). Pillow, on the other hand, is a backwards-compatible community-maint

Re: Proposal: Django Admin Site and "pretty" app name

2012-12-07 Thread Marijonas Petrauskas
This is important not only for internationalization, but also for English app names, consisting of several words. Neither Siteconfig nor Site_config look pretty. I think that app name should not be defined as a static variable in __init__.py file for this reason: if we want to translate the label,

Re: Admin UI improvement - actions displayed as buttons rather than drop-down list

2012-11-04 Thread Marijonas Petrauskas
Yes, it's created by me. Sorry for not referencing it. On Sun, Nov 4, 2012 at 2:06 PM, Łukasz Rekucki wrote: > Hi, > > Isn't this https://code.djangoproject.com/ticket/19235 ? > > Regards, > Łukasz Rekucki > > -- > You received this message because you are subscribed to the Google Groups > "Dja

Admin UI improvement - actions displayed as buttons rather than drop-down list

2012-11-04 Thread Marijonas Petrauskas
Hello, Sorry if this was already discussed before. I find current action interface a bit of an overkill when the number of actions is small. At least 3 clicks are needed to execute an action and sometimes important functionality gets hidden under the drop-down and can be harder to find for inexper

Re: save() method could return the object

2012-10-12 Thread Marijonas Petrauskas
There already exists create method that does exactly what you need: obj = SomeModel.objects.create(name='foo', age=42) On Fri, Oct 12, 2012 at 2:33 PM, David Winterbottom < david.winterbot...@tangentlabs.co.uk> wrote: > While such a change is initially appealing, it violates the command-query > s

Re: A.objects.getdefault

2012-10-11 Thread Marijonas Petrauskas
You can use: obj = next(iter(SomeModel.objects.filter(foo='bar')), None) The 'iter' part is not particularly elegant, but it's the only one-liner known to me. -- Marijonas On Thu, Oct 11, 2012 at 3:45 PM, Ole Laursen wrote: > On Tuesday, October 9, 2012 7:15:55 PM UTC+2, ptone wrote: >> >> E

Re: django 1.3 google3 statics files not found

2012-09-28 Thread Marijonas Petrauskas
Also, you should not post confidential stuff here (the link is only accessible from internal network). On Fri, Sep 28, 2012 at 8:50 PM, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > Hello, > > Please post questions about using Django to django-users. > > The topic of this list i

Re: Upcoming sprint to update Django's tutorial

2012-07-17 Thread Marijonas Petrauskas
+1! Few other thoughts - It would also be nice to have best practices regarding version control system file layout (eg. local settings pattern). Besides, I think that tutorial (and overall Django) recommendation to use absolute paths for project-relative locations (templates, static dirs) in setti