Re: Value of tightening URLValidator/EmailValidator regular expressions?

2016-03-15 Thread Joakim Saario
Is there a reason for having a backend validation at all? There is no reliable way to validate an email-address without actually sending a message to it. In my opinion EmailField should use a widget that uses `type="email"` to trigger frontend validation. It may also set a max length for the da

Re: Choosing migration with relative syntax

2016-03-11 Thread Joakim Saario
t rebase. However, when > you remove a field from a database table the data is pretty much lost. > > Cheers, > > /Markus > > On Friday, March 11, 2016 at 11:39:53 PM UTC+11, Joakim Saario wrote: >> >> Hello! >> >> Today if you just need to unmigrate the

Choosing migration with relative syntax

2016-03-11 Thread Joakim Saario
Hello! Today if you just need to unmigrate the *n* migrations before the last one you would typically run `migrate --list` and then `migrate ` where `migration_name` is the migration you want to roll back to. To reduce the steps of this procedure i think it would be nice to introduce a synta

Re: Copy-from-base inheritance

2016-03-03 Thread Joakim Saario
le adds another dimension. It should in this case inherit the definition only. Den torsdag 3 mars 2016 kl. 12:36:08 UTC+1 skrev Aymeric Augustin: > > Hi Joakim, > > On 03 Mar 2016, at 11:03, Joakim Saario > > wrote: > > > The problem is that django hijacks the clas

Re: Copy-from-base inheritance

2016-03-03 Thread Joakim Saario
m/?hl=sv#!topic/django-developers/koRZDDCQREc > instead. > > Den onsdag 2 mars 2016 kl. 10:52:07 UTC+1 skrev Aymeric Augustin: >> >> In that case, I believe this is the ticket you’re looking for: >> https://code.djangoproject.com/ticket/24305 >> >> There seems t

Re: Copy-from-base inheritance

2016-03-02 Thread Joakim Saario
; You may want to review these discussions and see how you can help. Thanks! > > -- > Aymeric. > > On 02 Mar 2016, at 10:25, Joakim Saario > > wrote: > > I'm sorry, this is a typo, local fields overrides parent fields of course. > Look at the patch. > >

Re: Copy-from-base inheritance

2016-03-02 Thread Joakim Saario
xample 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. > > On 02 Mar 2016, at 01:57, Joakim Saario > > wrote

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