ndarville / pony-forum

A modern alternative to ancient forum CMSes like vBulletin and PHPBB in Python on Django. (Alpha stage.) (NB: dotCloud have since removed their free Sandbox tier.)
http://pony-forum.com
26 stars 7 forks source link

Django 1.4 upgrade #29

Closed ndarville closed 12 years ago

ndarville commented 12 years ago

python -Wall manage.py runserver

ndarville commented 12 years ago

Deprecation Errors

$ python -Wall manage.py runserver

/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py:455: PendingDeprecationWarning: The 'execute_manager' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  PendingDeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py:399: PendingDeprecationWarning: The 'setup_environ' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  PendingDeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/conf/__init__.py:184: PendingDeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged
  PendingDeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py:455: PendingDeprecationWarning: The 'execute_manager' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  PendingDeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py:399: PendingDeprecationWarning: The 'setup_environ' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  PendingDeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)

/home/dotcloud/env/lib/python2.6/site-packages/django/conf/__init__.py:184: PendingDeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged
  PendingDeprecationWarning)

PendingDeprecationWarning

  1. The execute_manager function is deprecated,
  2. The setup_environ function is deprecated,
  3. You have no filters defined on the mail_admins logging handler:

DeprecationWarning

  1. The ADMIN_MEDIA_PREFIX setting has been removed;
    • use STATIC_URL instead.

Fixes

ndarville commented 12 years ago

manage.py & Dir Structure Error

Fixing the aforementioned deprecation warnings includes a modified manage.py that includes this line of code:

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "foo.settings")

No matter what value I choose for foo, be it my project or app name, I keep getting this error:

$ python manage.py runserver

Error: Could not import settings 'foo.settings' (Is it on sys.path?): No module named foo.settings

Current Dir Structure

wsgi.py
mysite/
    - __init__.py
    - << manage.py
    - settings.py
    - urls.py
    - << myapp/
        - __init__.py
        - models.py
        - views.py
        - static/
        - templates/

New Dir Structure

manage.py
wsgi.py
mysite/
    - __init__.py
    - settings.py
    - urls.py
myapp/
    - __init__.py
    - models.py
    - views.py
    - static/
    - templates/

Fixes

Further Reading

ndarville commented 12 years ago

No visible errors. Engage!