Changeset - fc2b604da623
[Not reviewed]
Merge
0 14 2
Christopher Neugebauer - 7 years ago 2017-08-17 17:45:02
chrisjrn@gmail.com
Merge remote-tracking branch 'origin/master' into wednesday-cleanup
4 files changed with 19 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -16,24 +16,29 @@ DATABASES = {
 
}
 

	
 
UNPREPEND_WWW = bool(os.environ.get("DJANGO_UNPREPEND_WWW", False))
 

	
 
# HEROKU: Update database configuration with $DATABASE_URL.
 
import dj_database_url
 
db_from_env = dj_database_url.config()
 
DATABASES['default'].update(db_from_env)
 

	
 
ALLOWED_HOSTS = [".localhost", ".herokuapp.com", ".northbaypython.org"]
 
CANONICAL_HOST = os.environ.get("DJANGO_CANONICAL_HOST", None)
 

	
 
# If DEFAULT_FROM_EMAIL is not set, email will most likely break in prod.
 
from_email = os.environ.get("DJANGO_DEFAULT_FROM_EMAIL", None)
 
if from_email is not None:
 
    DEFAULT_FROM_EMAIL = from_email
 

	
 
# Local time zone for this installation. Choices can be found here:
 
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 
# although not all choices may be available on all operating systems.
 
# On Unix systems, a value of None will cause Django to use the same
 
# timezone as the operating system.
 
# If running in a Windows environment this must be set to the same as your
 
# system time zone.
 
TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles")
 

	
 

	
 
# Set the email address that will receive errors.
 
admin_email = os.environ.get("DJANGO_ADMIN_EMAIL", None)
pinaxcon/templates/_footer.html
Show inline comments
 
{% load staticfiles %}
 
<div class="row">
 

	
 
  <div class="logo">
 
    <div class="circle">
 
      <div class="fill" style="background-image: url('{% static "images/logo.svg" %}');"></div>
 
    </div>
 
  </div>
 

	
 
  <div class="footer-copy">
 
    <p>&copy; 2017 North Bay Python, a member project of <a href="https://sfconservancy.org" >Software Freedom Conservancy</a>, a 501(c)(3) charity.</p>
 
    <p>&copy; 2017 North Bay Python, member project of <a href="https://sfconservancy.org" >Software Freedom Conservancy</a>, a 501(c)(3) charity.</p>
 

	
 
    <p>
 
      <a href="https://facebook.com/northbaypython">Facebook</a>
 
      | <a href="https://twitter.com/northbaypython">Twitter</a>
 
      | <a href="/code-of-conduct">Code of Conduct</a>
 
      | <a href="/about/colophon">Colophon</a></p>
 

	
 
    <p>This site is <a href="https://github.com/northbaypython/website">free and open source software</a>, powered by <a href="https://github.com/chrisjrn/symposion/">Symposion</a> and <a href="https://github.com/chrisjrn/registrasion/">Registrasion</a>.</p>
 
  </div>
 
</div>
pinaxcon/urls.py
Show inline comments
 
from django.conf import settings
 
from django.conf.urls import include, url
 
from django.conf.urls.static import static
 
from django.contrib.staticfiles.templatetags.staticfiles import static as _static
 
from django.views.generic import TemplateView
 
from django.views.generic import RedirectView
 

	
 

	
 
from django.contrib import admin
 

	
 
from pinaxcon import views
 

	
 
import symposion.views
 

	
 

	
 
urlpatterns = [
 
    url(r"^$", TemplateView.as_view(template_name="static_pages/homepage.html"), name="home"),
 

	
 
    # about
 
    url(r"^about/north-bay-python$", TemplateView.as_view(template_name="static_pages/about/north_bay_python.html"), name="about/north-bay-python"),
 
    # TODO add /about/the-mystic
 
    # TODO add /about/petaluma
 
    url(r"^about/team$", TemplateView.as_view(template_name="static_pages/about/team.html"), name="about/team"),
 
    url(r"^about/colophon$", TemplateView.as_view(template_name="static_pages/about/colophon.html"), name="about/colophon"),
...
 
@@ -69,12 +70,14 @@ urlpatterns = [
 
    # Demo payment gateway and related features
 
    url(r"^register/payments/", include("registripe.urls")),
 

	
 
    # Required by registrasion
 
    url(r'^register/', include('registrasion.urls')),
 
    url(r'^nested_admin/', include('nested_admin.urls')),
 

	
 
    # Catch-all MUST go last.
 
    #url(r"^", include("pinax.pages.urls")),
 
]
 

	
 
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 

	
 
handler500 = views.server_error
pinaxcon/views.py
Show inline comments
 
new file 100644
 
from django.http import HttpResponseServerError
 
from django.template import RequestContext
 
from django.template import Template
 
from django.template.loader import get_template
 
from django.views import defaults
 

	
 
def server_error(request, template_name=defaults.ERROR_500_TEMPLATE_NAME):
 
    t = Template("{%% include '%s' %%}" % template_name)
 
    return HttpResponseServerError(t.render(RequestContext(request)))
0 comments (0 inline, 0 general)