Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading django 1.10 #5

Open
XaviP opened this issue Mar 26, 2017 · 0 comments
Open

Upgrading django 1.10 #5

XaviP opened this issue Mar 26, 2017 · 0 comments

Comments

@XaviP
Copy link
Contributor

XaviP commented Mar 26, 2017

Removing RemovedInDjango110Warning still in dj1.9:


About RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10:

  • Include the import needed in each urls.py file and remove simple quotations in view argument:
vim valuenetwork/valueaccounting/urls.py # add at the top: import valuenetwork.valueaccounting.views
sed -Ei "s/'(valuenetwork\.valueaccounting\.views\.[^']*)'/\1/g" valuenetwork/valueaccounting/urls.py

You'll need a manual checking because of other possible imports/removes needed, but the main work is done.

  • This must be done in any urls.py file shown in:
cd [installation dir]
find . -name urls.py

See too: https://pinax-notifications.readthedocs.io/en/latest/usage/


About: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.:

  • urls.py files cannot use patterns() anymore, it must be in the form:
urlpatterns = [
    url(...),
    url(...),
]
  • Remove patterns from all from django.conf.urls import patterns, url

About: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead. in account/fields.py, see:
http://stackoverflow.com/questions/31793259/in-a-django-custom-field-what-does-the-subfieldbase-metaclass-do#answer-31793506

Just remove metaclass line from account/fields.py


About: RemovedInDjango110Warning: You haven't defined a TEMPLATES setting. You must do so before upgrading to Django 1.10. Otherwise Django will be unable to load templates.

See: FreedomCoop/valuenetwork@9753232

Changes with django 1.10

grep -r "{% if " | grep " = "
grep -r "{% elif " | grep " = "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant