diff --git a/src/papiez_ipsum/settings.py b/src/papiez_ipsum/settings.py index 24e8bd6..8077ddf 100644 --- a/src/papiez_ipsum/settings.py +++ b/src/papiez_ipsum/settings.py @@ -1,6 +1,6 @@ # Django settings for papiez_ipsum project. -DEBUG = False +DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( diff --git a/src/papiezator/pope_utils.py b/src/papiezator/pope_utils.py index 31898d6..69a98a5 100644 --- a/src/papiezator/pope_utils.py +++ b/src/papiezator/pope_utils.py @@ -28,7 +28,6 @@ def unpopable(width, height): #======== your friendly decorators :3 ====================================== def redis_me(func): def inner(*args, **kwargs): - import ipdb; ipdb.set_trace() if not redis or SAGE_REDIS: return func(*args, **kwargs) diff --git a/src/papiezator/templates/papiezator/index.html b/src/papiezator/templates/papiezator/index.html index 01e5cb0..4f06cff 100644 --- a/src/papiezator/templates/papiezator/index.html +++ b/src/papiezator/templates/papiezator/index.html @@ -39,11 +39,11 @@
- beta feature: BXVI! + beta feature: BXVI!
- beta feature: noirpope + norimakipope

How do i popes?

@@ -53,15 +53,15 @@

Get your popes

- - - + + +

Get your popes today

- - - + + +
diff --git a/src/papiezator/urls.py b/src/papiezator/urls.py index 1c92e7e..b213a7a 100644 --- a/src/papiezator/urls.py +++ b/src/papiezator/urls.py @@ -9,6 +9,7 @@ wh = r'(?P\d+)/(?P\d+)/$' urlpatterns = patterns( '', url(r'^$', views.index, name='index'), + url(r'^(?P\w+)/$', views.index, name='index'), url(r'^' + wh, views.conclave, name='conclave'), url(r'^' + whp, views.conclave, name='grand_conclave'), url(r'^noirpope/' + wh, noir.view, name='noir'), diff --git a/src/papiezator/views.py b/src/papiezator/views.py index 53254ad..54029cf 100644 --- a/src/papiezator/views.py +++ b/src/papiezator/views.py @@ -3,13 +3,23 @@ from django.shortcuts import render from django.core.urlresolvers import reverse from papiezator.papiezator_settings import LOLGITHUB_URL from papiezator.pope_utils import get_pope, http_return_image +from papiezator.models import Pope -def index(request): +def index(request, pope=None): + + if pope: + pope = Pope.objects.filter(name=pope.replace('_', ' ')).first() + if pope: + pope = pope.id + + if not pope: + pope = 0 c = { "absolute_url": request.build_absolute_uri(reverse("papiezator:conclave", args=[200, 300])), "absolute_url_exp": request.build_absolute_uri("width/height/"), - "github_url": LOLGITHUB_URL + "github_url": LOLGITHUB_URL, + "pope": pope } return render(request, "papiezator/index.html", c)