one more thing to display for preview only

pull/1/head
Andromeda Yelton 2012-01-15 14:56:26 -05:00
parent c7511b3b84
commit c6f2e0b531
5 changed files with 14 additions and 1 deletions

3
context_processors.py Normal file
View File

@ -0,0 +1,3 @@
def is_preview(request):
from django.conf import settings
return {'is_preview': settings.IS_PREVIEW}

View File

@ -69,9 +69,11 @@
</div>
</div>
{% if is_preview == 1 %}
<div class="preview_top">
Welcome to the alpha version of Unglue.It. This site is a preview of our full functionality; some things (including pledging) aren't quite working yet. If something seems broken or confusing -- or if you find something you love! -- please give us <a href="/feedback">feedback</a>. Thank you for your interest, and have fun.
</div>
{% endif %}
{% block topsection %}{% endblock %}
{% block content %}{% endblock %}
</div>

View File

@ -75,7 +75,7 @@
</ul>
</div>
<div class="content-block-content">
{% if request.META.HTTP_HOST == "unglue.it" %}
{% if is_preview == 1 %}
<div class="preview_content">
We're not running campaigns during our alpha phase.<br /><br />
After we've implemented a few more features and improved the site based on <a href="/feedback">your feedback</a>, you'll see a list of active campaigns here.<br /><br />

View File

@ -72,6 +72,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.static',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'regluit.context_processors.is_preview',
)
MIDDLEWARE_CLASSES = (
@ -206,3 +207,7 @@ UNGLUEIT_RECOMMENDED_USERNAME = 'recommended'
TEST_RUNNER = "djcelery.contrib.test_runner.CeleryTestSuiteRunner"
import djcelery
djcelery.setup_loader()
# this suppresses functionality that should not be visible on the alpha site
# change to 0 if you want to see it on your local machine
IS_PREVIEW = 1

View File

@ -3,6 +3,9 @@ from regluit.settings.common import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# if you're doing development work, you'll want this to be zero
IS_PREVIEW = 0
ADMINS = (
('Ed Summers', 'ehs@pobox.com'),
)