[extensions-web/django/upgrade-1.8] django: upgrade to 1.5.



commit b4fb3a9e9d55188acc4efa4f0ccbda1790eed56f
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sun Oct 23 21:19:00 2016 +0300

    django: upgrade to 1.5.
    
    Also bumped django-autoslug to 1.5.0. However I do not see any linear
    relations between django and autoslug.

 requirements.txt                                   |    6 +++---
 sweettooth/auth/templates/registration/login.html  |    4 ++--
 .../templates/registration/login_popup_form.html   |    4 ++--
 .../registration/password_reset_email.html         |    2 +-
 .../auth/templates/registration/profile.html       |    4 ++--
 .../auth/templates/registration/settings.html      |    2 +-
 sweettooth/extensions/models.py                    |    2 +-
 .../extensions/templates/extensions/comments.html  |    4 ++--
 .../extensions/templates/extensions/detail.html    |    2 +-
 .../templates/extensions/detail_edit.html          |    4 ++--
 .../templates/extensions/multiversion_status.html  |    2 +-
 sweettooth/review/templates/review/list.html       |    4 ++--
 sweettooth/review/templates/review/review.html     |   10 +++++-----
 sweettooth/templates/base.html                     |   14 +++++++-------
 sweettooth/templates/usermenu.html                 |    6 +++---
 15 files changed, 35 insertions(+), 35 deletions(-)
---
diff --git a/requirements.txt b/requirements.txt
index 3f9d439..8792736 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
-Django==1.4.22
-Pygments==1.6
-django-autoslug==1.4.1
+Django==1.5.12
+django-autoslug==1.5.0
 django-registration==1.0
+Pygments==1.6
 wsgiref==0.1.2
 South==0.7.6
 sorl-thumbnail
diff --git a/sweettooth/auth/templates/registration/login.html 
b/sweettooth/auth/templates/registration/login.html
index b7dde37..1cfd850 100644
--- a/sweettooth/auth/templates/registration/login.html
+++ b/sweettooth/auth/templates/registration/login.html
@@ -31,6 +31,6 @@
   </ol>
 </form>
 
-<a href="{% url registration_register %}">Register</a>
-<a href="{% url auth_password_reset %}">Forgot your password?</a>
+<a href="{% url 'registration_register' %}">Register</a>
+<a href="{% url 'auth_password_reset' %}">Forgot your password?</a>
 {% endblock %}
diff --git a/sweettooth/auth/templates/registration/login_popup_form.html 
b/sweettooth/auth/templates/registration/login_popup_form.html
index 2cae1e6..27d2860 100644
--- a/sweettooth/auth/templates/registration/login_popup_form.html
+++ b/sweettooth/auth/templates/registration/login_popup_form.html
@@ -1,7 +1,7 @@
-<form action="{% url auth-login %}" method="POST" class="login_popup_form user_popup">
+<form action="{% url 'auth-login' %}" method="POST" class="login_popup_form user_popup">
   {% csrf_token %}
   {{ login_popup_form.as_plain }}
   <input type="hidden" name="next" value="{{ request.path }}">
   <input type="submit" value="Login">
-  <a href="{% url registration_register %}">Register</a>
+  <a href="{% url 'registration_register' %}">Register</a>
 </form>
diff --git a/sweettooth/auth/templates/registration/password_reset_email.html 
b/sweettooth/auth/templates/registration/password_reset_email.html
index ff13c6c..f306249 100644
--- a/sweettooth/auth/templates/registration/password_reset_email.html
+++ b/sweettooth/auth/templates/registration/password_reset_email.html
@@ -1,7 +1,7 @@
 You have requested a password reset on {{ site_name }}. Please follow the link
 to reset your password.
 
-  https://extensions.gnome.org/{% url auth_password_reset_confirm uidb36=uid token=token %}
+  https://extensions.gnome.org/{% url 'auth_password_reset_confirm' uidb36=uid token=token %}
 
 Thanks!
   the GNOME Shell Extensions team
diff --git a/sweettooth/auth/templates/registration/profile.html 
b/sweettooth/auth/templates/registration/profile.html
index fecf0b7..7f22554 100644
--- a/sweettooth/auth/templates/registration/profile.html
+++ b/sweettooth/auth/templates/registration/profile.html
@@ -31,7 +31,7 @@
   {% for version in unreviewed %}
   {% with version.extension as extension %}
   <li class="extension profile">
-    <h4 class="extension-name"><a href="{% url review-version pk=version.pk %}">
+    <h4 class="extension-name"><a href="{% url 'review-version' pk=version.pk %}">
         <img src="{{ extension.icon.url }}" class="icon"> {{ extension.name }}
     </a></h4>
     <span class="version">(v{{ version.version }})</span>
@@ -45,7 +45,7 @@
   {% for version in waiting %}
   {% with version.extension as extension %}
   <li class="extension profile">
-    <h4 class="extension-name"><a href="{% url review-version pk=version.pk %}">
+    <h4 class="extension-name"><a href="{% url 'review-version' pk=version.pk %}">
         <img src="{{ extension.icon.url }}" class="icon"> {{ extension.name }}
     </a></h4>
     <span class="version">(v{{ version.version }})</span>
diff --git a/sweettooth/auth/templates/registration/settings.html 
b/sweettooth/auth/templates/registration/settings.html
index b64f7fb..d156a68 100644
--- a/sweettooth/auth/templates/registration/settings.html
+++ b/sweettooth/auth/templates/registration/settings.html
@@ -2,6 +2,6 @@
 {% block body %}
   <h3> Settings </h3>
   <ul>
-    <li> <a href="{% url auth_password_change %}">Change your password</a> </li>
+    <li> <a href="{% url 'auth_password_change' %}">Change your password</a> </li>
   </ul>
 {% endblock %}
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index df0387a..a3f3900 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -69,7 +69,7 @@ class Extension(models.Model):
     slug = autoslug.AutoSlugField(populate_from="name")
     creator = models.ForeignKey(User, db_index=True)
     description = models.TextField(blank=True)
-    url = models.URLField(verify_exists=False, blank=True)
+    url = models.URLField(blank=True)
     created = models.DateTimeField(auto_now_add=True)
     downloads = models.PositiveIntegerField(default=0)
     popularity = models.IntegerField(default=0)
diff --git a/sweettooth/extensions/templates/extensions/comments.html 
b/sweettooth/extensions/templates/extensions/comments.html
index 36e6cae..db7717e 100644
--- a/sweettooth/extensions/templates/extensions/comments.html
+++ b/sweettooth/extensions/templates/extensions/comments.html
@@ -10,7 +10,7 @@
     Leave a...
     <a href="javascript:void 0" id="leave_comment">Comment</a>
     <a href="javascript:void 0" id="leave_rating">Rating</a>
-    <a href="{% url errorreports.views.report_error pk=extension.pk %}">Bug report</a>
+    <a href="{% url 'errorreports.views.report_error' pk=extension.pk %}">Bug report</a>
   </div>
   <div id="rating_form">
     {% load comments %}
@@ -18,7 +18,7 @@
   </div>
   {% else %}
   <p class="unauthenticated">
-    Unfortunately, to help prevent spam, we require that you <a href="{% url auth-login %}">log in to GNOME 
Shell Extensions</a> in order to post a comment or report an error. You understand, right?
+    Unfortunately, to help prevent spam, we require that you <a href="{% url 'auth-login' %}">log in to 
GNOME Shell Extensions</a> in order to post a comment or report an error. You understand, right?
   </p>
   {% endif %}
 </div>
diff --git a/sweettooth/extensions/templates/extensions/detail.html 
b/sweettooth/extensions/templates/extensions/detail.html
index 4605fde..45fe3aa 100644
--- a/sweettooth/extensions/templates/extensions/detail.html
+++ b/sweettooth/extensions/templates/extensions/detail.html
@@ -18,7 +18,7 @@
         {% endblock icon %}
 
         <h3 class="extension-name" id="extension_name">{{ extension.name }}</h3>
-        <span class="author">by <a href="{% url auth-profile user=extension.creator.username %}">{{ 
extension.creator }}</a></span>
+        <span class="author">by <a href="{% url 'auth-profile' user=extension.creator.username %}">{{ 
extension.creator }}</a></span>
       </div>
 
       <div class="extension-details">
diff --git a/sweettooth/extensions/templates/extensions/detail_edit.html 
b/sweettooth/extensions/templates/extensions/detail_edit.html
index 0fef195..4b7323b 100644
--- a/sweettooth/extensions/templates/extensions/detail_edit.html
+++ b/sweettooth/extensions/templates/extensions/detail_edit.html
@@ -28,10 +28,10 @@
         </td>
         {% if version.is_approved %}
         <td class="extension_status_toggle{% if version.is_active %} visible{% endif %}">
-          <a href="{% url extensions-ajax-set-status-inactive %}">Inactivate</a>
+          <a href="{% url 'extensions-ajax-set-status-inactive' %}">Inactivate</a>
         </td>
         <td class="extension_status_toggle{% if version.is_inactive %} visible{% endif %}">
-          <a href="{% url extensions-ajax-set-status-active %}">Activate</a>
+          <a href="{% url 'extensions-ajax-set-status-active' %}">Activate</a>
         </td>
         {% endif %}
 
diff --git a/sweettooth/extensions/templates/extensions/multiversion_status.html 
b/sweettooth/extensions/templates/extensions/multiversion_status.html
index 5688cf8..17a3024 100644
--- a/sweettooth/extensions/templates/extensions/multiversion_status.html
+++ b/sweettooth/extensions/templates/extensions/multiversion_status.html
@@ -1 +1 @@
-<a class="extension-status {{ version.get_status_class }}" href="{% url review-version pk=version.pk %}">{{ 
version.get_status_display }}</a>
+<a class="extension-status {{ version.get_status_class }}" href="{% url 'review-version' pk=version.pk 
%}">{{ version.get_status_display }}</a>
diff --git a/sweettooth/review/templates/review/list.html b/sweettooth/review/templates/review/list.html
index ac3d526..19614ea 100644
--- a/sweettooth/review/templates/review/list.html
+++ b/sweettooth/review/templates/review/list.html
@@ -8,9 +8,9 @@
 {% for version in version_list %}
 {% with version.extension as extension %}
 <li class="extension">
-  <h3 class="extension-name"><a href="{% url review-version pk=version.pk %}"><img src="{{ 
extension.icon.url }}" class="icon"> {{ extension.name }}</a></h3>
+  <h3 class="extension-name"><a href="{% url 'review-version' pk=version.pk %}"><img src="{{ 
extension.icon.url }}" class="icon"> {{ extension.name }}</a></h3>
   <span class="version">(v{{ version.version }})</span>
-  <span class="author">by <a href="{% url auth-profile user=extension.creator %}">{{ extension.creator 
}}</a></span>
+  <span class="author">by <a href="{% url 'auth-profile' user=extension.creator %}">{{ extension.creator 
}}</a></span>
   <p class="description">{{ extension.first_line_of_description }}</p>
 </li>
 {% endwith %}
diff --git a/sweettooth/review/templates/review/review.html b/sweettooth/review/templates/review/review.html
index 19f27dd..9ed0b9e 100644
--- a/sweettooth/review/templates/review/review.html
+++ b/sweettooth/review/templates/review/review.html
@@ -12,7 +12,7 @@
       </a>
     </h3>
 
-    <span class="author">by <a href="{% url auth-profile user=extension.creator %}">{{ extension.creator 
}}</a></span>
+    <span class="author">by <a href="{% url 'auth-profile' user=extension.creator %}">{{ extension.creator 
}}</a></span>
 
     <div>
       {% if extension.screenshot %}
@@ -51,7 +51,7 @@
   <div id="files" data-pk="{{ version.pk }}">
   </div>
   <p>Note: Binary files aren't shown on the web site. To see all
-    files, please <a href="{% url review-download pk=version.pk %}">download
+    files, please <a href="{% url 'review-download' pk=version.pk %}">download
       the extension zipfile</a>.</p>
 </div>
 
@@ -72,7 +72,7 @@
         <td> {{ ver.version }} </td>
         <td>
           {% if ver.version == version.version %}
-          <span class="current_version extension-status {{ ver.get_status_class }}">{{ 
ver.get_status_display }}</a>
+          <span class="current_version extension-status {{ ver.get_status_class }}">{{ 
ver.get_status_display }}</span>
           {% else %}
           <a class="extension-status {{ ver.get_status_class }}" href="{% url review-version pk=ver.pk 
%}">{{ ver.get_status_display }}</a>
           {% endif %}
@@ -88,7 +88,7 @@
 <div id="previous_reviews">
   {% for review in previous_reviews %}
   <div class="review">
-    <a class="review-author" href="{% url auth-profile user=review.reviewer.username %}">{{ review.reviewer 
}}</a>
+    <a class="review-author" href="{% url 'auth-profile' user=review.reviewer.username %}">{{ 
review.reviewer }}</a>
     {% if review.new_status %}
     <span class="extension-status {{ review.get_new_status_display|lower }}">
       {% if review.auto %}auto-{% endif%}
@@ -110,7 +110,7 @@
 <h2 class="expanded"> Review </h2>
 
 <div id="review">
-  <form id="review_form" action="{% url review-submit pk=version.pk %}" method="POST">
+  <form id="review_form" action="{% url 'review-submit' pk=version.pk %}" method="POST">
     {% csrf_token %}
     <textarea id="comments" name="comments"></textarea>
     <select name="status">
diff --git a/sweettooth/templates/base.html b/sweettooth/templates/base.html
index 5355384..bcbb3f1 100644
--- a/sweettooth/templates/base.html
+++ b/sweettooth/templates/base.html
@@ -5,7 +5,7 @@
     <link rel="stylesheet" href="/static/css/sweettooth.css" />
     <link rel="shortcut icon" href="/static/images/favicon.png" />
     <link rel="alternate" type="application/rss+xml"
-          href="{% url extensions-rss-feed %}" title="Latest extensions in GNOME Shell Extensions" />
+          href="{% url 'extensions-rss-feed' %}" title="Latest extensions in GNOME Shell Extensions" />
     <title>{% block title %}GNOME Shell Extensions{% endblock %}</title>
     <script>
       var require = { baseUrl: '/static/js/' };
@@ -25,12 +25,12 @@
 
           <a class="root" href="http://www.gnome.org/";>GNOME.org</a>
           {% if n_unreviewed_extensions %}
-          <a id="unreviewed_counter" href="{% url review-list %}">{{ n_unreviewed_extensions }}</a>
+          <a id="unreviewed_counter" href="{% url 'review-list' %}">{{ n_unreviewed_extensions }}</a>
           {% endif %}
           {% if request.user.is_authenticated %}
           <a class="user" href="#">{{ request.user.username }}</a>
           {% else %}
-          <a class="user" href="{% url auth-login %}">Login</a>
+          <a class="user" href="{% url 'auth-login' %}">Login</a>
           {% endif %}
 
           {% endspaceless %}
@@ -46,10 +46,10 @@
         <h1><a href="/"><img src="/static/images/foot.png" alt="GNOME" />Extensions</a></h1>
         
         <ul id="globalnav" class="{% block navclass %}{% endblock %}">
-          <li class="main"><a href="{% url extensions-index %}">Extensions</a></li>
-          <li class="upload"><a href="{% url extensions-upload-file %}">Add yours</a></li>
-          <li class="local"><a href="{% url extensions-local %}">Installed extensions</a></li>
-          <li class="about"><a href="{% url extensions-about %}">About</a></li>
+          <li class="main"><a href="{% url 'extensions-index' %}">Extensions</a></li>
+          <li class="upload"><a href="{% url 'extensions-upload-file' %}">Add yours</a></li>
+          <li class="local"><a href="{% url 'extensions-local' %}">Installed extensions</a></li>
+          <li class="about"><a href="{% url 'extensions-about' %}">About</a></li>
         </ul>
 
         {% block search-bar %}
diff --git a/sweettooth/templates/usermenu.html b/sweettooth/templates/usermenu.html
index a832d24..5805db2 100644
--- a/sweettooth/templates/usermenu.html
+++ b/sweettooth/templates/usermenu.html
@@ -1,12 +1,12 @@
 {% if request.user.is_authenticated %}
 <div class="user_settings user_popup">
   {% load gravatar %}
-  <a class="avatar" href="{% url auth-profile user=request.user.username %}" title="Profile">
+  <a class="avatar" href="{% url 'auth-profile' user=request.user.username %}" title="Profile">
     <img src="{% gravatar_url request request.user.email %}">
   </a>
   <ul>
-    <li><a class="text" href="{% url auth-settings user=request.user.username %}">Website Settings</a></li>
-    <li><a class="text" href="{% url auth-logout %}">Log Out</a></li>
+    <li><a class="text" href="{% url 'auth-settings' user=request.user.username %}">Website Settings</a></li>
+    <li><a class="text" href="{% url 'auth-logout' %}">Log Out</a></li>
   </ul>
 </div>
 {% else %}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]