
from feincms.content.application.models import *

def __getattr__(key):
    # Work around Django 3.2's autoloading of *.apps modules (AppConfig
    # autodiscovery)
    if key in {
        "ApplicationContent",
        "app_reverse",
        "app_reverse_lazy",
        "permalink",
        "UnpackTemplateResponse",
        "standalone",
        "unpack",
    }:
        from feincms.content.application import models

        return getattr(models, key)

    raise AttributeError("Unknown attribute '%s'" % key)

Add a workaround for the AppConfig autodiscovery crashes with Django 3.2
Add a workaround for the AppConfig autodiscovery crashes with Django 3.2

+ def __getattr__(key):
+     # Work around Django 3.2's autoloading of *.apps modules (AppConfig
+     # autodiscovery)
+     if key in {
+         "ApplicationContent",
+         "app_reverse",
+         "app_reverse_lazy",
+         "permalink",
+         "UnpackTemplateResponse",
+         "standalone",
+         "unpack",
+     }:
+         from feincms.content.application import models
  
- from feincms.content.application.models import *
+         return getattr(models, key)
  
+     raise AttributeError("Unknown attribute '%s'" % key)
+ 
Add a workaround for the AppConfig autodiscovery crashes with Django 3.2
## Code Before:

from feincms.content.application.models import *

## Instruction:
Add a workaround for the AppConfig autodiscovery crashes with Django 3.2
## Code After:
def __getattr__(key):
    # Work around Django 3.2's autoloading of *.apps modules (AppConfig
    # autodiscovery)
    if key in {
        "ApplicationContent",
        "app_reverse",
        "app_reverse_lazy",
        "permalink",
        "UnpackTemplateResponse",
        "standalone",
        "unpack",
    }:
        from feincms.content.application import models

        return getattr(models, key)

    raise AttributeError("Unknown attribute '%s'" % key)
