Browse Source

Make Misago Django 1.10-compatible and update requirements.txt

TheKit 8 years ago
parent
commit
e31b1f6b38
3 changed files with 16 additions and 18 deletions
  1. 1 1
      misago/admin/urls.py
  2. 2 4
      misago/core/mail.py
  3. 13 13
      requirements.txt

+ 1 - 1
misago/admin/urls.py

@@ -1,4 +1,4 @@
-from django.conf.urls import include, patterns, url
+from django.conf.urls import include, url
 
 from misago import admin
 

+ 2 - 4
misago/core/mail.py

@@ -1,5 +1,4 @@
 from django.core import mail as djmail
-from django.template import RequestContext
 from django.template.loader import render_to_string
 
 
@@ -8,10 +7,9 @@ def build_mail(request, recipient, subject, template, context=None):
     context['sender'] = request.user
     context['recipient'] = recipient
     context['subject'] = subject
-    context = RequestContext(request, context)
 
-    message_plain = render_to_string('%s.txt' % template, context)
-    message_html = render_to_string('%s.html' % template, context)
+    message_plain = render_to_string('%s.txt' % template, context, request=request)
+    message_html = render_to_string('%s.html' % template, context, request=request)
 
     message = djmail.EmailMultiAlternatives(
         subject, message_plain, to=[recipient.email])

+ 13 - 13
requirements.txt

@@ -1,17 +1,17 @@
-django~=1.9.6
-djangorestframework==3.3.3
-beautifulsoup4==4.4.1
-bleach==1.4.3
-django-debug-toolbar==1.4
-django-crispy-forms==1.6.0
-django-htmlmin==0.9.1
-django-mptt==0.8.4
-fake-factory~=0.5.7
+django~=1.10.3
+djangorestframework==3.5.3
+beautifulsoup4==4.5.1
+bleach==1.5.0
+django-debug-toolbar==1.6
+django-crispy-forms==1.6.1
+django-htmlmin==0.10.0
+django-mptt==0.8.6
+fake-factory~=0.7.2
 html5lib<0.99999999,>=0.999
-markdown==2.6.6
-path.py==8.2.1
-pillow==3.2.0
-psycopg2==2.6.1
+markdown==2.6.7
+path.py==9.0
+pillow==3.4.2
+psycopg2==2.6.2
 pytz
 requests<3
 unidecode