Is Django 2.0 stable for production use?

Asked

Viewed 64 times

1

I would like to know if I can migrate to Django 2.0 and use this version in production, without worrying about absurd bugs. I will have to update some libs and find solutions to outdated (until then quiet).

  • 1

    They are classified as stable: https://docs.djangoproject.com/en/2.0/ (redirected from https://docs.djangoproject.com/en/stable/). Who am I to judge that, right? I tried to see how many and which issues opened had, but I think the mobile vision of Github did not help: https://github.com/django/django

  • Thank you, I took a look at the issues here. Those who don’t take risks, let’s migrate!

  • 1

    I’m waiting for your answer to learn more about Django 2.0 then

  • 1

    Did you manage to migrate? Do you have any comments/reservations for anyone reading this content in the near future?

  • 1

    We got it (team here), very quiet! I will publish a reply with the result. We are using in production already too.

1 answer

1

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

We noticed that the structure of URLS. We need to define now within the urls.py of each app, one app_name (the namespace within the 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 better work 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 that we noticed, is how the version is treating access to routes. Before we received Warnings because we didn’t have the route /favicon.ico. This route was always called, something related to default browsers. Now it’s alerting as Error. Other than that we are getting as error also several invasion routes (must be bots trying to invade with random routes like /wp-admin, etc.).

A link that caught our attention to want to migrate to version 2.0, is a post informing about Django’s security updates. Here we like to always be updated with the new versions, not to get stuck in time. We will have to follow these news more. So I played the question here, to see if anyone was already using.

Completion

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.