Useful tips about many users mistakes

Useful tips about many users mistakes

2018, Jan 01    

- app_name error

app_name error happens from django 2.0 or over. Before 2.0 ver, in the urlpattens of project, you just added namespace in the url().

# project_name/
urlpatterns = [
    url(r'^sample/', include('sample.urls', namespace='sample'))

And you don’t need to add app_name in other file. but from django ver 2.0, you must add app_name in application For instance, according to example above, you must add following line in sample/ (sample is application name).

# sample/

app_name = 'sample'