Saturday, July 21, 2018

Teodesson (Blogspot) Moves to Dariawan.com

So here we are. teodesson.blogspot.com has been around since 2005. That’s more than 13 years! And I’ll going for at least another 50 :p.

Today, I announce that I'll start posting new articles on my new home, www.dariawan.com. Dariawan will serve a bigger pictures than just a blog site. It'll serve as a base for my new adventures.


Dariawan.com will hosts Java, Spring, Web Application and Microservices tutorials, blogs, and announcements of my side projects

Follow our:
Twitter: dariawantech
Facebook: dariawantech

Let The Show Begin!

Thursday, July 19, 2018

Some errors encounter in Django 2.x Projects

ImportError: No module named 'django.core.urlresolvers'
Django 2.0 removes the django.core.urlresolvers module, which was moved to django.urls in version 1.10. You should change any import to use django.urls instead
from django.urls import reverse, NoReverseMatch

'WSGIRequest' object has no attribute 'user' Django admin
In Django 2.x  go to your setting and look for MIDDLEWARE_CLASSES. The new-style is MIDDLEWARE. Change it...

'djdt' is not a registered namespace
Not exactly Django 2.x problem, but because of django-debug-toolbar
Add debug_toolbar.middleware.DebugToolbarMiddleware in MIDDLEWARE, and add urlpattern:
if DEBUG:
 import debug_toolbar
 urlpatterns += [
  url(r'^__debug__/', include(debug_toolbar.urls)),
  ...
 ]