Opened 5 years ago

Closed 5 years ago

#30559 closed Bug (needsinfo)

Django 2.2 | Auto-reload doesn't detect changes in new apps.

Reported by: Ron Owned by: nobody
Component: Utilities Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Just created a new project with Django CLI. My project split into multiple apps so the structure is like this:

project
app1/
    ..
    migrations/
    views/
    __init__.py
    apps.py
    urls.py
core/
    ..
    migrations/
    views/
    __init__.py
    apps.py
    urls.py
project/
    settings/
        __init__.py
        common.py
        development.py
    __init__.py
    urls.py
    wsgi.py

I'm using Docker to build the environment and make sure that both apps registered in the INSTALLED_APPS property.

The problem is that the Django doesn't listen to app1 app, but only to core app. Also, if I add another folder under the core app, it's doesn't listen to this folder as well.

I've changed the BASE_DIR property to support the new structure:

BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

Any suggestions?

Change History (1)

comment:1 by Mariusz Felisiak, 5 years ago

Component: UncategorizedUtilities
Resolution: needsinfo
Status: newclosed
Summary: Django 2.2 | Auto-reload doesn't detect changes in new appsDjango 2.2 | Auto-reload doesn't detect changes in new apps.
Type: UncategorizedBug

Thanks for the report, however I cannot reproduce this issue on Django 2.2 or on master even with a similar structure:

├── manage.py
├── test_one
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   │   └── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
├── test_two
│   ├── admin.py
│   ├── apps.py
│   ├── __init__.py
│   ├── migrations
│   │   └── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
└── ticket_30559
    ├── db.sqlite3
    ├── __init__.py
    ├── settings
    │   ├── __init__.py
    │   └── settings.py
    ├── settings.py
    ├── urls.py
    └── wsgi.py
Note: See TracTickets for help on using tickets.
Back to Top