Changes between Initial Version and Version 1 of Ticket #23436


Ignore:
Timestamp:
Sep 6, 2014, 4:55:35 AM (10 years ago)
Author:
Harry Percival
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23436 – Description

    initial v1  
    77Because there's no abspath, you can get different results for BASE_DIR depending on how settings.py is run.  This is an edge case, since settings.py is almost always imported by django in the right context, but still -- compare:
    88
     9{{{
    910    python manage.py shell
    1011    >>> from django.conf import settings
    1112    print(BASE_DIR)
     13}}}
    1214
    1315With:
    1416
     17{{{
    1518    python -i myproject/settings.py
    1619    >>> print(BASE_DIR)
     20}}}
    1721
    1822As an aside, in general, in any path wrangling you should always call abspath first. Try running this script, saved to a file:
Back to Top