mumbleapi icon indicating copy to clipboard operation
mumbleapi copied to clipboard

Refactoring models to follow DRY principle

Open sulavmhrzn opened this issue 3 years ago • 4 comments

Is your feature request related to a problem? Please describe.

No, i just saw different model class having the same attribute

created = models.DateTimeFied(...)

Describe the solution you'd like

Can't we move the similar attribute in this case

created = models.DateTimeField(...)

to a separate class and make other class that needs created to inherit from the class?

Describe alternatives you've considered

class DateTimeModel(models.Model):
    created = models.DateTimeField(...)
    
    class Meta:
        abstract = True

class AnotherModel(DateTimeModel):
    ...

sulavmhrzn avatar Jun 27 '21 02:06 sulavmhrzn

how can I take this issue, I want to collaborate.

fredychivalan avatar Jun 30 '21 18:06 fredychivalan

Thank you for your suggestion @sulavmhrzn , i will assign this to you soon @FredyChivalan .

PraveenMalethia avatar Jul 13 '21 21:07 PraveenMalethia

@PraveenMalethia if this is not started I can pick this up. Thanks!

Azeezdot123 avatar Jul 25 '21 21:07 Azeezdot123

@PraveenMalethia pls assign this to me.

Azeezdot123 avatar Jul 26 '21 03:07 Azeezdot123