ROOT_URLCONF Error When Creating a Django Project From a Template

Django has a nifty feature that lets you create an entire project from a template. For example, check out the Two Scoops template. The biggest problem with this approach is its difficult to debug.

I was getting a ROOT_URLCONF error when running startproject. Turns out the source of this error was I accidentally put a url tag in a template using the normal Django syntax:

<a href="{% url 'account_logout'  %}">Log Out</a>

However, since the template is really a template of a template, I should have done this:

<a href="{% templatetag openblock %} url 'account_logout' {% templatetag closeblock %}">Log Out</a>

Evidently the system was trying to resolve the URL, which is why it needed ROOT_URLCONF.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s