Skip to content

Commit 68ed2f3

Browse files
author
Kátia Nakamura
authored
Merge pull request #2 from PythonBalkan/develop
coc: add code of conduct view with pdf
2 parents 9bffe39 + 30f5667 commit 68ed2f3

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed
429 KB
Binary file not shown.

pyconbalkan/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,5 @@
120120

121121
STATIC_URL = '/static/'
122122
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
123+
124+
PDF_PATH = 'pyconbalkan/core/static/pdf/'

pyconbalkan/urls.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@
1313
1. Import the include() function: from django.conf.urls import url, include
1414
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
1515
"""
16+
import os
17+
1618
from django.conf.urls import url
1719
from django.contrib import admin
20+
from django.views.static import serve
1821

1922
from pyconbalkan.core import views
23+
from pyconbalkan.settings import BASE_DIR, PDF_PATH
2024

2125
urlpatterns = [
2226
url(r'^$', views.home, name='index'),
27+
url(r'^coc$', serve, {'path': 'coc_pyconbalkan.pdf', 'document_root': os.path.join(BASE_DIR, PDF_PATH)}),
2328
url(r'^admin/', admin.site.urls),
2429
]

0 commit comments

Comments
 (0)