Skip to content

Commit 9c242e1

Browse files
committed
Surrounds BLOG_NAME with try/catch rather than getattr.
Fixes "DatabaseError: no such table: django_site" issue, refs pigmonkey#3
1 parent b61129c commit 9c242e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vellum/settings.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
# The name of the blog.
99
# This defaults to the name of the site.
10-
BLOG_NAME = getattr(settings, 'BLOG_NAME', Site.objects.get_current().name)
10+
try:
11+
BLOG_NAME = settings.BLOG_NAME
12+
except ValueError:
13+
BLOG_NAME = Site.objects.get_current().name
1114

1215
# A short description of what the blog is about.
1316
BLOG_DESCRIPTION = getattr(settings, 'BLOG_DESCRIPTION', 'A basic Django blog')

0 commit comments

Comments
 (0)