Skip to content

Commit bda3b2f

Browse files
committed
django version updated to 1.9
1 parent 5649824 commit bda3b2f

File tree

8 files changed

+90
-57
lines changed

8 files changed

+90
-57
lines changed

junction/base/monkey.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ def patch_urlresolvers():
3636

3737
old_reverse = urlresolvers.reverse
3838

39-
def new_reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None):
40-
path = old_reverse(viewname, urlconf=urlconf, args=args, kwargs=kwargs, prefix=prefix, current_app=current_app)
39+
40+
def new_reverse(viewname, urlconf=None, args=None, kwargs=None, current_app=None):
41+
path = old_reverse(viewname, urlconf=urlconf, args=args, kwargs=kwargs, current_app=current_app)
4142
if is_absolute_url(path):
4243
return path
4344

junction/proposals/urls.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
from __future__ import absolute_import, unicode_literals
33

44
# Third Party Stuff
5-
from django.conf.urls import include, patterns, url
5+
from django.conf.urls import include, url
66

77
from . import comments_views, views, votes_views, dashboard
88

9-
comment_urls = patterns(
10-
'',
9+
comment_urls = [
10+
1111
url(r'^(?P<proposal_slug>[\w-]+)/create/$',
1212
comments_views.create_proposal_comment, name='proposal-comment-create'),
1313
url(r'^(?P<proposal_slug>[\w-]+)/comments/(?P<proposal_comment_id>\d+)/up-vote/$',
1414
votes_views.proposal_comment_up_vote, name='proposal-comment-up-vote'),
1515
url(r'^(?P<proposal_slug>[\w-]+)/comments/(?P<proposal_comment_id>\d+)/down-vote/$',
1616
votes_views.proposal_comment_down_vote, name='proposal-comment-down-vote'),
17-
)
17+
]
18+
19+
urlpatterns = [
1820

19-
urlpatterns = patterns(
20-
'',
2121
# proposal urls
2222
url(r'^$', views.list_proposals, name='proposals-list'),
2323
url(r'^create/$', views.create_proposal, name='proposal-create'),
@@ -40,4 +40,4 @@
4040
url(r'^(?P<proposal_slug>[\w-]+)/vote/$', votes_views.proposal_reviewer_vote, name='proposal-reviewer-vote'),
4141
url(r'^(?P<proposal_slug>[\w-]+)/second-vote/$', votes_views.proposal_reviewer_secondary_vote,
4242
name='proposal-reviewer-secondary-vote'),
43-
)
43+
]

junction/schedule/urls.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
from __future__ import absolute_import, unicode_literals
33

44
# Third Party Stuff
5-
from django.conf.urls import patterns, url
5+
from django.conf.urls import url
66

77
from . import views
88

9-
urlpatterns = patterns(
10-
'',
9+
urlpatterns = [
1110
# schedule urls
1211
url(r'^dummy_schedule/$', views.dummy_schedule, name='dummy_schedule'),
13-
)
12+
]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.9 on 2017-01-05 11:43
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('tickets', '0001_initial'),
12+
]
13+
14+
operations = [
15+
migrations.AlterField(
16+
model_name='ticket',
17+
name='email',
18+
field=models.EmailField(max_length=254),
19+
),
20+
]

junction/tickets/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
from __future__ import absolute_import, unicode_literals
33

44
# Third Party Stuff
5-
from django.conf.urls import patterns, url
5+
from django.conf.urls import url
66

77
from . import views
88

9-
urlpatterns = patterns(
10-
'',
9+
urlpatterns = [
10+
1111
url(r'^sync_data/$', views.sync_data, name='sync_data'),
12-
)
12+
]

junction/urls.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Third Party Stuff
55
from django.conf import settings
6-
from django.conf.urls import include, patterns, url
6+
from django.conf.urls import include, url
77
from django.conf.urls.static import static
88
from django.contrib import admin
99
from django.views.generic.base import RedirectView, TemplateView
@@ -33,8 +33,10 @@
3333
reference to them here.
3434
'''
3535

36-
urlpatterns = patterns(
37-
'',
36+
import junction.proposals.dashboard
37+
38+
urlpatterns = [
39+
3840
url(r'^$', HomePageView.as_view(), name="page-home"),
3941

4042
# Django Admin
@@ -50,18 +52,18 @@
5052
# Proposals related
5153
url(r'^(?P<conference_slug>[\w-]+)/proposals/', include('junction.proposals.urls')),
5254
url(r'^(?P<conference_slug>[\w-]+)/dashboard/reviewers/',
53-
'junction.proposals.dashboard.reviewer_comments_dashboard',
55+
junction.proposals.dashboard.reviewer_comments_dashboard,
5456
name='proposal-reviewers-dashboard'),
5557
url(r'^(?P<conference_slug>[\w-]+)/dashboard/proposal_state/$',
56-
'junction.proposals.dashboard.proposal_state',
58+
junction.proposals.dashboard.proposal_state,
5759
name='proposal-state'),
5860
url(r'^(?P<conference_slug>[\w-]+)/dashboard/$',
59-
'junction.proposals.dashboard.proposals_dashboard', name='proposal-dashboard'),
61+
junction.proposals.dashboard.proposals_dashboard, name='proposal-dashboard'),
6062
url(r'^(?P<conference_slug>[\w-]+)/dashboard/votes/$',
61-
'junction.proposals.dashboard.reviewer_votes_dashboard',
63+
junction.proposals.dashboard.reviewer_votes_dashboard,
6264
name='proposal-reviewer-votes-dashboard'),
6365
url(r'^(?P<conference_slug>[\w-]+)/dashboard/votes/export/$',
64-
'junction.proposals.dashboard.export_reviewer_votes',
66+
junction.proposals.dashboard.export_reviewer_votes,
6567
name='export-reviewer-votes'),
6668
url(r'^feedback/(?P<schedule_item_id>\d+)/$',
6769
view_feedback,
@@ -100,12 +102,14 @@
100102
RedirectView.as_view(pattern_name="proposals-list"),
101103
name='conference-detail'),
102104

103-
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
105+
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
106+
107+
import django.views.defaults
104108

105109
if settings.DEBUG:
106-
urlpatterns += patterns('',
107-
url(r'^400/$', 'django.views.defaults.bad_request'), # noqa
108-
url(r'^403/$', 'django.views.defaults.permission_denied'),
109-
url(r'^404/$', 'django.views.defaults.page_not_found'),
110-
url(r'^500/$', 'django.views.defaults.server_error'),
111-
)
110+
urlpatterns += [
111+
url(r'^400/$', django.views.defaults.bad_request), # noqa
112+
url(r'^403/$', django.views.defaults.permission_denied),
113+
url(r'^404/$', django.views.defaults.page_not_found),
114+
url(r'^500/$', django.views.defaults.server_error),
115+
]

requirements.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Django==1.8.14
2-
celery==3.1.18
3-
djangorestframework==3.1.3
4-
django-filter==0.10.0
1+
Django==1.9
2+
celery==3.1.20
3+
djangorestframework==3.4
4+
django-filter==1.0.1
55

66
# Persistent Store
77
# -------------------------------------------------
8-
psycopg2==2.6.1
9-
redis==2.10.5
8+
psycopg2==2.6.2
9+
redis==2.10.0
1010
dj-database-url==0.4.1
1111

1212
# Extensions
1313
# -------------------------------------------------
14-
django-extensions==1.5.5
15-
six==1.9.0
16-
django-sampledatahelper==0.3
14+
django-extensions==1.7.5
15+
six==1.10
16+
django-sampledatahelper==0.4
1717
unicode-slugify==0.1.3
1818
XlsxWriter==0.7.3
1919
arrow==0.8.0
@@ -26,26 +26,26 @@ Pillow==2.9.0
2626

2727
# Auth
2828
# -------------------------------------------------
29-
django-allauth==0.21.0
30-
oauthlib==0.7.2
29+
django-allauth==0.24.0
30+
oauthlib==1.1.2
3131
python-openid==2.2.5
3232
requests==2.7.0
3333
requests-oauthlib==0.5.0
3434

3535
# Admin
3636
# -------------------------------------------------
37-
django_simple_history==1.6.3
37+
django_simple_history==1.8.0
3838

3939
# Frontend Helpers
4040
# -------------------------------------------------
41-
django-bootstrap3==6.1.0
41+
django-bootstrap3==7.1.0
4242
django-bootstrap-breadcrumbs==0.8
4343
django-flat-theme==1.1.3
4444

4545
# Markdown Editor
4646
# -------------------------------------------------
4747
django-markdown==0.8.4
48-
django-pagedown==0.1.0
48+
django-pagedown==0.1.
4949
mdx-linkify==0.6
5050
Markdown==2.6.6
5151
markdown2==2.3.1

settings/common.py

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
ADMINS = ()
2020

21+
DEBUG = True
22+
2123
# Absolute Url of frontend hosted site. Used to render the urls in templattes,
2224
# static and media files appropriately. e.g 'https://in.pycon.org/junction'
2325
SITE_URL = os.environ.get('SITE_URL', '').rstrip('/')
@@ -89,13 +91,24 @@
8991

9092
INSTALLED_APPS = CORE_APPS + THIRD_PARTY_APPS + OUR_APPS
9193

92-
TEMPLATE_CONTEXT_PROCESSORS = (
93-
"django.core.context_processors.request",
94-
"django.contrib.auth.context_processors.auth",
95-
"allauth.account.context_processors.account",
96-
"allauth.socialaccount.context_processors.socialaccount",
97-
"junction.base.context_processors.site_info",
98-
)
94+
95+
TEMPLATES = [
96+
{
97+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
98+
'DIRS': [os.path.join(APP_DIR, 'templates')],
99+
'APP_DIRS': True,
100+
'OPTIONS': {
101+
'context_processors': [
102+
'django.template.context_processors.request',
103+
"django.contrib.auth.context_processors.auth",
104+
"junction.base.context_processors.site_info",
105+
],
106+
107+
'debug': DEBUG,
108+
},
109+
},
110+
]
111+
99112

100113
AUTHENTICATION_BACKENDS = (
101114
# Needed to login by username in Django admin, regardless of `allauth`
@@ -190,9 +203,6 @@
190203
MEDIA_ROOT = join(ROOT_DIR, '.media')
191204
MEDIA_URL = '/m/'
192205

193-
TEMPLATE_DIRS = (
194-
os.path.join(APP_DIR, 'templates'),
195-
)
196206

197207
DATABASES = {
198208
'default': {
@@ -209,7 +219,6 @@
209219
'SECRET_KEY',
210220
'z^bd9lk)o!03n#9e_u87zidd1zt7*^_oc4v6t!@@86vtbu0*&j')
211221

212-
DEBUG = TEMPLATE_DEBUG = os.environ.get('DEBUG', 'on') == 'on'
213222

214223
ALLOWED_HOSTS = [] # TODO:
215224

0 commit comments

Comments
 (0)