Re: Copy-from-base inheritance

2016-03-01 Thread Aymeric Augustin
Hello, The “locally declared field gets overriden by parent definition” behavior shown in your example looks counter-intuitive to me. Inheritance means that children inherit and possibly specialize their parent’s behavior, not that the parent overrides the child. Best regards, -- Aymeric.

Re: Copy-from-base model inheritance.

2016-03-01 Thread Anssi Kääriäinen
The recommended way to do what you are after is: class AbstractBase(models.Model): f1 = models.IntegerField() class Meta: abstract = True class Base(AbstractBase): pass class Derived(AbstractBase): f2 = models.IntegerField() If you can't use the above way, then the

Re: Django admin and messages

2016-03-01 Thread Cristiano Coelho
Actual file with the issue: https://github.com/django/django/blob/master/django/contrib/admin/locale/es/LC_MESSAGES/django.po#L168 El martes, 1 de marzo de 2016, 22:42:05 (UTC-3), Cristiano Coelho escribió: > > Looking it deeper it seems mostly like a translation issue for the spanish > (and

Re: Django admin and messages

2016-03-01 Thread Cristiano Coelho
Looking it deeper it seems mostly like a translation issue for the spanish (and maybe other) languages, since in some cases both gender articles are added ( "el/la" ) to make it generic but for the specific case I pointed above it is missing. msgid "" "The %(name)s \"%(obj)s\" was added

Re: [Question] jsi18n - get_javascript_catalog a bit obscure?

2016-03-01 Thread Cristiano Coelho
Looking through git history seems like the "always load english translations" code is quite a few years old. There's a 5 y.o ticket in here: https://code.djangoproject.com/ticket/16284 Which leads to here: https://code.djangoproject.com/ticket/3594 with a fix that adds the "discard if english

Re: Should tutorial start with minimal Django?

2016-03-01 Thread Curtis Maloney
When we were teaching MelbDjango, I did start by writing views in the root urls.py this avoided students having to create a bunch of files and apps and references and imports and... For some of the students transitioning from PHP, it was much easier to deal with only learning one thing

Should tutorial start with minimal Django?

2016-03-01 Thread Bobby Mozumder
Hi, Here’s an example of minimal Django, where one can output run an full site from a single file: https://github.com/rnevius/minimal-django The author made the comparison to Flask. I believe the tutorial should start out with this, as the initial Part 0, to introduce the audience to the

Copy-from-base inheritance

2016-03-01 Thread Joakim Saario
Hello! I'd like to propose another inheritance strategy for django's models. Think of it sort of like reversed abstract models For example: class NormalModel(models.Model): foo = models.CharField(max_length=10) bar = models.CharField(max_length=10) class CopiedBaseModel(NormalModel):

Copy-from-base model inheritance.

2016-03-01 Thread Joakim Saario
Hello! Wouldn't it be great to be able to inherit django models like any other python class? I.e not like the default multi-table inheritance. "How would this differ from an abstract model" you may ask. Well, it is sort of like an abstract model inheritance, except for the abstract part where

Re: [Question] jsi18n - get_javascript_catalog a bit obscure?

2016-03-01 Thread Tim Graham
Have you tried looking through history with git blame to find related tickets? Another tip is to search Google with a query like "javascript_catalog site:code.djangoproject.com". This will let you find tickets to see if the issue was raised before. This is how I try to answer questions like

Re: [Question] jsi18n - get_javascript_catalog a bit obscure?

2016-03-01 Thread Cristiano Coelho
Maybe I wasn't clear neither, but the main issue is this: when using a language equals to the default one, and if that language does not define any translation text (because ids are the same as values so it is not necessary), the server side translations will always correctly return the

[Question] jsi18n - get_javascript_catalog a bit obscure?

2016-03-01 Thread Cristiano Coelho
https://github.com/django/django/blob/master/django/views/i18n.py#L204 Can someone explain me why does it have to always load english as the first fallback? Also, line 248: # If the currently selected language is English but it doesn't have a # translation catalog (presumably due to being

Override the default form field for a model field

2016-03-01 Thread James Pic
Hi all, Currently, the model field defines the default form field that's used by the modelform metaclass. It would be nice if an external app could overwrite this. For example, a user installs an app which provides a more elaborated relation select field. They configure the app to be able

[ANNOUNCE] Django security releases issued: 1.9.3 and 1.8.10

2016-03-01 Thread Tim Graham
Today the Django team issued 1.9.3 and 1.8.10 as part of our security process. This releases address two security issues, and we encourage all users to upgrade as soon as possible. Details are available on the Django project weblog: