Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions blog/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from django.conf.urls import patterns, url
from . import views, feed

urlpatterns = patterns(
'',
urlpatterns = [
url(r'^feed/$', feed.LatestPosts(), name="feed"),
url(r'^$', views.BlogIndex.as_view(), name="index"),
url(r'^entry/(?P<slug>\S+)$', views.BlogDetail.as_view(), name="entry_detail"),
)
]
20 changes: 17 additions & 3 deletions qblog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


Expand Down Expand Up @@ -53,6 +51,23 @@

ROOT_URLCONF = 'qblog.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates"),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.request',
],
},
},
]

WSGI_APPLICATION = 'qblog.wsgi.application'


Expand Down Expand Up @@ -84,5 +99,4 @@
# https://docs.djangoproject.com/en/dev/howto/static-files/

STATIC_URL = '/static/'
TEMPLATE_DIRS = (os.path.join(BASE_DIR, "templates"), )
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"), )
5 changes: 2 additions & 3 deletions qblog/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin

urlpatterns = patterns(
'',
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^markdown/', include("django_markdown.urls")),
url(r'^', include('blog.urls')),
)
]