Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed pinax.core.context_processors.pinax_settings to work without si…

…tes app
  • Loading branch information...
commit 044ea16646bf824de1c339dac74c4911416bf434 1 parent 1d0198e
@brosner brosner authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 pinax/core/context_processors.py
View
15 pinax/core/context_processors.py
@@ -4,8 +4,13 @@
def pinax_settings(request):
- site = Site.objects.get_current()
- return {
- "SITE_NAME": site.name,
- "SITE_DOMAIN": site.domain
- }
+ ctx = {}
+
+ if Site._meta.installed:
+ site = Site.objects.get_current()
+ ctx.update({
+ "SITE_NAME": site.name,
+ "SITE_DOMAIN": site.domain
+ })
+
+ return ctx

0 comments on commit 044ea16

Please sign in to comment.
Something went wrong with that request. Please try again.