Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411207 - [GSOC] Remove Deprecation Warnings from okupy after upgrade to Django 1.4
Summary: [GSOC] Remove Deprecation Warnings from okupy after upgrade to Django 1.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Theo Chatzimichos (RETIRED)
URL: http://git.overlays.gentoo.org/gitweb...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-07 23:00 UTC by Gaurish Sharma
Modified: 2012-04-08 21:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
remove deprecation warnings (bug-411201.patch,557 bytes, patch)
2012-04-07 23:07 UTC, Gaurish Sharma
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gaurish Sharma 2012-04-07 23:00:51 UTC
okupy is a Django based CMS which proposed to replace Gorg on gentoo.org, with LDAP frontend.  This project was done a year back, at that time stable version of django(python web frame that cms uses) was 1.3.

Now,
new stable version of Django is released -- v1.4. As its always a good idea to keep all applications updated to latest versions, specially in case of webapps. Hence I have started the upgrade process of okupy to v1.4. 

At first look, okupy seems to work fine with 1.4 but there are Deprecation Warnings encountered while running okupy cms.


Basically, the ADMIN_MEDIA_PREFIX setting has been Deprecated & we should remove this from okupy.

Reproducible: Always

Steps to Reproduce:
1.make sure you are running django 1.4. Else, Upgrade using following command(if using pip):
  $  pip install Django --upgrade
2. run, 
  $ python manage.py runserver
3. Watch the warnings appear
Actual Results:  
----------------------
/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
  warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning)
/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
Validating models...

0 errors found
Django version 1.4, using settings 'okupy.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

---------------------------------

Expected Results:  
No warnings
----------------------
Validating models...

0 errors found
Django version 1.4, using settings 'okupy.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

---------------------------------

The release notes which detail the removal of setting can be found in release notes:
https://docs.djangoproject.com/en/dev/ref/settings/#id5
Comment 1 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-04-07 23:06:06 UTC
do you want me to do it or do you prefer to send me a patch instead?
Comment 2 Gaurish Sharma 2012-04-07 23:07:16 UTC
Created attachment 308173 [details, diff]
remove deprecation warnings
Comment 3 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-04-07 23:14:36 UTC
The warning says to replace it with STATIC_URL instead
Comment 4 Gaurish Sharma 2012-04-07 23:39:55 UTC
Yes you are correct but as STATIC_URL has already defined (http://git.overlays.gentoo.org/gitweb/?p=proj/okupy.git;a=blob;f=settings/base.py;h=d2f789f31b1b3fd28fa56a3f7e75803623e02b9c;hb=HEAD#l30) .


According to release notes, Django will now expect to find the admin static files under the URL /static/admin/ without need to for setting explicitly specifying it. 

https://docs.djangoproject.com/en/dev/releases/1.4/#django-contrib-admin


PS: I am doing this bugfix as part of gentoo's requirement to fix one bug while applying for gsoc.
Comment 5 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-04-08 08:59:33 UTC
Pushed, thanks
Comment 6 Gaurish Sharma 2012-04-08 21:09:07 UTC
Perfect Thanks!