If i try to open a created url i get an 500 error.
My procedure was:
First python manage.py startapp black
I added in project/settings.py under INSTALLED_APPS 'black',
I added in project/urls.py url(r'^test/', include('black.urls')),
Content of black/urls.py is:
from django.conf.urls import patterns, url
from black import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index')
)
And content of black/views.py:
from django.http import HttpResponse
def index(request):
return HttpResponse("SHOW ME: BLACK")
After all i synced the database.
I can’t see any error in apache-error-log and also not in my posted django files. What could cause this?
I suggest you to take a look a the several handy ways to log errors with django.
For production, you will want to configure your logging behavior.
You can find an example here in the same docs.
What I personally do in production is enabling email logging, it sends me an email each time there is a fatal error.
Let’s see what it would look like for logging both by mail and in a file:
settings.py