Is Django 2.0 stable for use in production?

1

I wonder if I can migrate to Django 2.0 and use this production version without worrying about absurd bugs. I'm going to have to update some libs and find solutions for the outdated ones (even quiet).

    
asked by anonymous 12.03.2018 / 16:07

1 answer

1

We have migrated here from Django 1.8 to 2.0. It was very quiet the migration itself. We had to update some libs in the requeriments.txt that were generating error in the logs , but nothing absurd. We did this manually, until there were not so many libs.

We noticed that the URLS structure has changed a bit. We need to now define within the urls.py of each app, a app_name (the namespace within urls.py of the root project). See in the example:

myapp/
- urls.py
urlpatterns = [   
    url(r'^noticias/', include('apps.news.urls', namespace='news')),
]

We use namespaces to work better on how to organize urls within the app. In the new version of Django, we need to specify this namespace within the internal urls of each app

**myapp/
- apps/
- - news/
- - - urls.py**

app_name="news"  
urlpatterns = [      
    url(r'^$', view.list, name='home'),
...
]

Another thing we noticed, is how the version is treating the accesses to the routes. Previously we received Warnings because we did not have the /favicon.ico route. This route was always called, something related to standard browsers. You are now alerting us as Error . Apart from this we are receiving as error also several routes of invasion (they must be bots trying to invade with random routes like /wp-admin , etc).

A link that caught our attention in order to migrate to version 2.0, is a posting the Django security updates . Here we like to always be updated with the new versions, so as not to get stuck in time. We'll have to keep up with this news. So I threw in the question here to see if anyone was already using it.

Conclusion

So far we have not encountered serious problems. We are in production now and everything is working normally. Go without fear:)

    
15.03.2018 / 16:03