Django : A Simple Blog Example
First Create application in Django project directory
#python manage.py startapp blog
Edit your setting.py file and add appilcation code
Edit your setting.py file and add appilcation code
For example :-
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'mysite.blog',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
)
also add Email host to send email.
by default its for locahost, but if your host have not configure EMAIL_HOST then you add this in settings.py
#EMAIL_HOST = "hostname.com"
Edit Urls in url.py main file in project Directory.
Urls.py
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^blog/', include('mysite.blog.urls')),
)