Repository: wemake-services/wemake-django-template

Issue:
pytest not run
I launched a project.
After creating the model, I'm trying to run tests.
But I get an error.

```
ERROR collecting server/apps/main/admin.py 
server/apps/main/admin.py:12: in <module>
    admin.site.register(File, Dd)
.venv/lib/python3.7/site-packages/django/contrib/admin/sites.py:110: in register
    raise AlreadyRegistered('The model %s is already registered' % model.__name__)
E   django.contrib.admin.sites.AlreadyRegistered: The model File is already registered

ERROR collecting server/apps/main/models.py 
server/apps/main/models.py:28: in <module>
    class File(AbstractDefaultModel):
.venv/lib/python3.7/site-packages/django/db/models/base.py:118: in __new__
    "INSTALLED_APPS." % (module, name)
E   RuntimeError: Model class main.models.File doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
```

my code models.py

```
class AbstractDefaultModel(models.Model):
    is_active = models.BooleanField(
        verbose_name=_('is_active'),
        default=True)

    created_at = models.DateTimeField(
        verbose_name=_('created at'),
        auto_now_add=True)

    updated_at = models.DateTimeField(
        verbose_name=_('updated at'),
        auto_now=True)

    def __str__(self):
        return '{id}'.format(id=self.id)

    class Meta:
        abstract = True

class File(AbstractDefaultModel):
    code = models.PositiveIntegerField(
        verbose_name='code',
        unique=True,
        editable=True)

    profile = models.CharField(
        verbose_name='name',
        max_length=100,
        blank=True,
        null=True)

    class Meta:
        verbose_name = 'file'
        verbose_name_plural = 'files'
```

my code admin.py

```
from server.apps.main.models import File
class FileAdmin(admin.ModelAdmin):
    list_display = ['id', 'profile']

admin.site.register(File, FileAdmin)
```



Discussion:
@folt do you use django2?
> @folt do you use django2?

no, my pyproject.toml file


```
[build-system]
requires = ["poetry==0.12.15"]
build-backend = "poetry.masonry.api"


[tool.poetry]
name = "test_project"
description = "Test Project"
version = "0.1.0"
readme = "README.md"
authors = []


[tool.poetry.dependencies]
python = "3.7.3"
django = "^1.11"
django-split-settings = "^0.3"
django-axes = "^4.5"
django-csp = "^3.5"
django-health-check = "^3.10"
django-feature-policy = "^2.3"
psycopg2 = "^2.8"
gunicorn = "^19.9"
python-decouple = "^3.1"
dump-env = "^0.2"
bcrypt = "^3.1"


[tool.poetry.dev-dependencies]
django-debug-toolbar = "^1.11"
django-querycount = "^0.7"
nplusone = "^1.0"
wemake-python-styleguide = "^0.8"
flake8-pytest = "^1.3"
flake8-django = "^0.0.4"
pytest = "^4.4"
pytest-django = "^3.4"
pytest-cov = "^2.6"
pytest-randomly = "^3.0"
pytest-deadfixtures = "^2.1"
pytest-testmon = "^0.9"
pytest-timeout = "^1.3"
pre-commit = "^1.15"
xenon = "^0.5"
mypy = "^0.701"
ipython = "^7.5"
sphinx = "^2.0"
sphinx-autodoc-typehints = "^1.6"
doc8 = "^0.8"
yamllint = "^1.15"
safety = "^1.8"
dotenv-linter = "^0.1"
polint = "^0.4"
dennis = "^0.9"
```

@folt can you please reformat your code? I cannot read it. And I cannot help you this way.
> @folt can you please reformat your code? I cannot read it. And I cannot help you this way.

from edited description
@folt see: `RuntimeError: Model class main.models.File doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.`

Is it in `INSTALLED_APPS`? 
[test_project.tar.gz](https://github.com/wemake-services/wemake-django-template/files/3207958/test_project.tar.gz)
my code 
Sorry, this is not how it works. Please, provide the code samples that are relevant if you want to get help (since I am 100% sure this is not related to `wemake-django-template`). I do not want to download random binaries from the internet. 
I am creating a new project project.
Then add the model to models.py
I indicated it in the first message.
Then I add the class for admin.py
He, too, is in the first message.
I did not change anything in the template.
i run `pytest`
```
ERROR collecting server / apps / main / admin.py
ERROR collecting server / apps / main / models.py
```
show where the errors are.
The project starts and runs, but the tests do not work.
What else is required of me to describe the problem?
The problem with test, because pydoc builds module path from package (folder with __init__.py). 
For example:
you have server/apps/main/models
Pydoc scans and look into parent folder - models. If __init__.py exists, it add to path  _models_. Then pydoc go up to top folder - main, which have __init_.py. Now current path - main.models, but apps folder - without __init__. Django builds modules path differently. As result main.models (from pydoc) != server.apps.main.models (from django)

Solution: _add_ __init__.py into **apps** _dir_
@vaad2 thanks! Do you want to send a PR with the fix?

Resolving patch:
diff --git a/{{cookiecutter.project_name}}/server/apps/__init__.py b/{{cookiecutter.project_name}}/server/apps/__init__.py
new file mode 100644
--- /dev/null
+++ b/{{cookiecutter.project_name}}/server/apps/__init__.py
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-


Test patch: