Before I wrote in urls.py, my code… everything worked perfectly. Now I have problems – can’t go to my site. “cannot import name patterns”
My urls.py is:
from django.conf.urls import patterns, include, url
They said what error is somewhere here.
You don’t need those imports. The only thing you need in your urls.py (to start) is:
NOTE: This solution was intended for Django <1.6. This was actually the code generated by Django itself. For newer version, see Jacob Hume’s answer.