I am following a tutorial for django, im hosting my project in a free hosting for testing,
the hosting is working fine with python ,and the django shell for example,
but I cannot see the proper data in my index.html or have acces to the /admin
so I think is a problem with a wrong path?,
so please advice on this noob issue,
this is the folder where I have my files /home/mako34/www/blog
here my code:
I suppose settings is configured correctly for the db as it is creating the sqlite db, and the necessary folders
settings.py
import os
*
* configure connection do db, etc
*
ROOT_URLCONF = 'blog.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(os.path.dirname(__file__),'templates'), # creates a absolute path
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
urls.py
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'blog.views.home', name='home'),
# url(r'^blog/', include('blog.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^, 'blog.views.index'), #<------------------- index/root entry
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Blog</title>
</head>
<body>
<H1>Test Django</H1>
<div id="content">
{% block content %}
{% endblock %}
</div>
</body>
</html>
So what im i missing?
so i can see my index html with data [as now it shows the tags {% block content %}
{% endblock %}
and no data in them
and cannot have acces to http://mako34.alwaysdata.net/blog/admin/
thanks!