{"action":"created","issue":{"url":"https://api.github.com/repos/django/django/issues/4856","labels_url":"https://api.github.com/repos/django/django/issues/4856/labels{/name}","comments_url":"https://api.github.com/repos/django/django/issues/4856/comments","events_url":"https://api.github.com/repos/django/django/issues/4856/events","html_url":"https://github.com/django/django/pull/4856","id":88007689,"number":4856,"title":"Fixed #24971 -- Made startapp generate an apps.py","user":{"login":"MounirMesselmeni","id":1055731,"avatar_url":"https://avatars.githubusercontent.com/u/1055731?v=3","gravatar_id":"","url":"https://api.github.com/users/MounirMesselmeni","html_url":"https://github.com/MounirMesselmeni","followers_url":"https://api.github.com/users/MounirMesselmeni/followers","following_url":"https://api.github.com/users/MounirMesselmeni/following{/other_user}","gists_url":"https://api.github.com/users/MounirMesselmeni/gists{/gist_id}","starred_url":"https://api.github.com/users/MounirMesselmeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MounirMesselmeni/subscriptions","organizations_url":"https://api.github.com/users/MounirMesselmeni/orgs","repos_url":"https://api.github.com/users/MounirMesselmeni/repos","events_url":"https://api.github.com/users/MounirMesselmeni/events{/privacy}","received_events_url":"https://api.github.com/users/MounirMesselmeni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-13T13:49:54Z","updated_at":"2015-06-14T16:25:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/4856","html_url":"https://github.com/django/django/pull/4856","diff_url":"https://github.com/django/django/pull/4856.diff","patch_url":"https://github.com/django/django/pull/4856.patch"},"body":"Adding support for App config on the default app creation."},"comment":{"url":"https://api.github.com/repos/django/django/issues/comments/111844970","html_url":"https://github.com/django/django/pull/4856#issuecomment-111844970","issue_url":"https://api.github.com/repos/django/django/issues/4856","id":111844970,"user":{"login":"MounirMesselmeni","id":1055731,"avatar_url":"https://avatars.githubusercontent.com/u/1055731?v=3","gravatar_id":"","url":"https://api.github.com/users/MounirMesselmeni","html_url":"https://github.com/MounirMesselmeni","followers_url":"https://api.github.com/users/MounirMesselmeni/followers","following_url":"https://api.github.com/users/MounirMesselmeni/following{/other_user}","gists_url":"https://api.github.com/users/MounirMesselmeni/gists{/gist_id}","starred_url":"https://api.github.com/users/MounirMesselmeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MounirMesselmeni/subscriptions","organizations_url":"https://api.github.com/users/MounirMesselmeni/orgs","repos_url":"https://api.github.com/users/MounirMesselmeni/repos","events_url":"https://api.github.com/users/MounirMesselmeni/events{/privacy}","received_events_url":"https://api.github.com/users/MounirMesselmeni/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T16:25:32Z","updated_at":"2015-06-14T16:25:32Z","body":"@timgraham I updated the code with your notes thanks.\r\nThis patch will work only for a top level app creation, if you create a new project named myproject, a new app named myapp, cd into myapp and run ``djangoadmin startapp mysubapp``, the last command will generate a wrong path both for the ``__init__.py`` file ``default_app_config=\"mysubapp.apps.MysubappConfig\"`` and also in the ``apps.py`` for the ``AppConfig`` name which will be ``name='mysubapp'``\r\nI didn't find a way to get the user project root to be abled to extract the right module name ``myapp.mysubapp``\r\nSomething like this inside ``django/core/management/templates.py`` to pass this on template context but the ``project_path`` return the current directory like ``os.getcwd()``:\r\n```\r\nproject_path = os.path.abspath(os.path.dirname(__name__))\r\nmodule_path = top_dir.replace(project_path + os.path.sep, '').replace(os.path.sep, '.')\r\n```"}}