from django.apps import AppConfig


class PaymentConfig(AppConfig):
    name = 'apps.payment'
    verbose_name = 'Payment'

    def ready(self):
        super(PaymentConfig, self).ready()

        from reversion import revisions as reversion

        from apps.payment.models import PaymentPrice, PaymentTransaction

        reversion.register(PaymentPrice)
        reversion.register(PaymentTransaction)

from django.apps import AppConfig


class PaymentConfig(AppConfig):
    name = 'apps.payment'
    verbose_name = 'Payment'

    def ready(self):
        super(PaymentConfig, self).ready()

        from reversion import revisions as reversion

        from apps.payment.models import PaymentTransaction

        reversion.register(PaymentTransaction)

Fix registering for already registered model
Fix registering for already registered model

  from django.apps import AppConfig
  
  
  class PaymentConfig(AppConfig):
      name = 'apps.payment'
      verbose_name = 'Payment'
  
      def ready(self):
          super(PaymentConfig, self).ready()
  
          from reversion import revisions as reversion
  
-         from apps.payment.models import PaymentPrice, PaymentTransaction
+         from apps.payment.models import PaymentTransaction
  
-         reversion.register(PaymentPrice)
          reversion.register(PaymentTransaction)
  
Fix registering for already registered model
## Code Before:
from django.apps import AppConfig


class PaymentConfig(AppConfig):
    name = 'apps.payment'
    verbose_name = 'Payment'

    def ready(self):
        super(PaymentConfig, self).ready()

        from reversion import revisions as reversion

        from apps.payment.models import PaymentPrice, PaymentTransaction

        reversion.register(PaymentPrice)
        reversion.register(PaymentTransaction)

## Instruction:
Fix registering for already registered model
## Code After:
from django.apps import AppConfig


class PaymentConfig(AppConfig):
    name = 'apps.payment'
    verbose_name = 'Payment'

    def ready(self):
        super(PaymentConfig, self).ready()

        from reversion import revisions as reversion

        from apps.payment.models import PaymentTransaction

        reversion.register(PaymentTransaction)
