Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python

Django URLS in the content is diffence from real django

Hello In Urls lession the code was from django.conf.urls import include,url from django.contrib import admin from . import views

Urlpattrern= url(r'âdmin' ,...

but in real django version it is from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]

2 Answers

Dylan Thunn
Dylan Thunn
22,658 Points

Ya they need really to update Django. 2.0 was released in 2017, they should at least mention it in all those tutorials. Love TreeHouse but they are kind of slacking in the Django department.

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 27,510 Points

Dylan Thunn is correct-- there are definitely some differences in Django 2.x and if you are creating a new project from scratch, I would totally recommend doing it in Django 2.x. There is still quite a bit of utility in learning Django 1.x (1.9 is installed in Workspaces) and Django LTS (long-term-support) version is 1.11. Since most new Django developers first job opportunity will be maintaining existing code, it is a good experience to be familiar with LTS versions.

https://www.djangoproject.com/weblog/2015/jun/25/roadmap/