Каталог проекта C:\Server\www\p
Добавлено в апачевский конфиг: {} на самом деле треугольные, форум просто их не принииммает
{Location "/p/"}
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['c:\\Server\\www'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE p.settings
PythonDebug On
{/Location}
from django.conf.urls.defaults import *
from p.a.views import current_date
urlpatterns = patterns('',
# Example:
(r'^p/now/', include('current_date')),
# Uncomment this for admin:
(r'^p/admin/', include('django.contrib.admin.urls')),
)
from django.http import HttpResponse
import datetime
def current_date(request):
now = datetime.datetime.now()
html = "<html><body>It is now %s.</body></html>" % now
return HttpResponse(html)
ImportError at /p/now/
No module named current_date
0.96