Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Update templates to Jinja. #47

Merged
merged 1 commit into from about 2 years ago

2 participants

Giorgos Logiotatidis Jen Fong-Adwent
Giorgos Logiotatidis
Collaborator

Fix bug 728805

remo/base/templates/main.html
... ...
@@ -1,4 +1,5 @@
1  
-{% extends "base.html" %} {% load markup %} {% block content %}
  1
+{% extends "base.html" %}
  2
+{% block content %}
1

add a line break in here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Giorgos Logiotatidis glogiotatidis merged commit b510a85 into from March 02, 2012
Giorgos Logiotatidis glogiotatidis closed this March 02, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 02, 2012
Giorgos Logiotatidis Update templates to Jinja.
Fix bug 728805
7e0459c
This page is out of date. Refresh to see the latest.
7  remo/base/helpers.py
... ...
@@ -0,0 +1,7 @@
  1
+from django.contrib.markup.templatetags import markup
  2
+from jingo import register
  3
+
  4
+
  5
+@register.filter
  6
+def restructuredtext(text):
  7
+    return markup.restructuredtext(text)
33  remo/base/templates/base.html
@@ -63,17 +63,17 @@
63 63
           <div class="ten columns phone-three pull-one-phone pull-two" id="login-box">
64 64
             <ul>
65 65
               <li class="account anonymous nomenu logout">
66  
-                {% if not user.is_authenticated %}
  66
+                {% if not user.is_authenticated() %}
67 67
                   <a id="browserid" href="#">Sign In</a>
68  
-                  <form method="POST" action="{% url browserid_verify %}">
69  
-                    {% csrf_token %} {{ browserid_form.as_p }}
70  
-                    <input type="hidden" name="next" value="{{ request.get_full_path }}" />
  68
+                  <form method="POST" action="{{ url('browserid_verify') }}">
  69
+                    {{ csrf() }} {{ browserid_form.as_p() }}
  70
+                    <input type="hidden" name="next" value="{{ request.get_full_path() }}" />
71 71
                   </form>
72 72
                 {% else %}
73  
-                  <a href="{% url profiles_view_my_profile %}">
74  
-                    {{ user.get_full_name|default:user.userprofile.display_name}}
  73
+                  <a href="{{ url('profiles_view_my_profile') }}">
  74
+                    {{ user.get_full_name()|default('user.userprofile.display_name') }}
75 75
                   </a>
76  
-                  [<a href="{% url logout %}">Sign out</a>]
  76
+                  [<a href="{{ url('logout') }}">Sign out</a>]
77 77
                 {% endif %}
78 78
               </li>
79 79
             </ul>
@@ -86,7 +86,7 @@
86 86
           <!-- Logo and Wordmark -->
87 87
           <div class="four columns" id="logo-box">
88 88
             <div class="row hide-on-phones">
89  
-              <a href="{% url main %}">
  89
+              <a href="{{ url('main') }}">
90 90
                 <img src="{{ MEDIA_URL }}img/remo/remo_logo_medium.png"
91 91
                      alt="Mozilla Reps logo">
92 92
                 <h3>mozilla reps</h3>
@@ -101,10 +101,10 @@
101 101
           <div class="eight columns hide-on-phones" id="navigation-box">
102 102
             <ul class="nav-bar">
103 103
               <li>
104  
-                <a href="{% url main %}" class="main">Main</a>
  104
+                <a href="{{ url('main') }}" class="main">Main</a>
105 105
               </li>
106 106
               <li>
107  
-                <a href="{% url profiles_list_profiles %}" class="main">People</a>
  107
+                <a href="{{ url('profiles_list_profiles') }}" class="main">People</a>
108 108
               </li>
109 109
               <li>
110 110
                 <a href="https://wiki.mozilla.org/ReMo/Events" class="main">Events</a>
@@ -128,10 +128,10 @@
128 128
           <div class="eight columns show-on-phones" id="navigation-box-mobile">
129 129
             <ul class="nav-bar">
130 130
               <li>
131  
-                <a href="{% url main %}" class="main">Main</a>
  131
+                <a href="{{ url('main') }}" class="main">Main</a>
132 132
               </li>
133 133
               <li>
134  
-                <a href="{% url profiles_list_profiles %}" class="main">People</a>
  134
+                <a href="{{ url('profiles_list_profiles') }}" class="main">People</a>
135 135
               </li>
136 136
               <li>
137 137
                 <a href="https://wiki.mozilla.org/ReMo/Events" class="main">Events</a>
@@ -196,7 +196,7 @@
196 196
       <p class="lead">So, you wanna join us?</p>
197 197
       <h2>Cool!</h2>
198 198
       <p>
199  
-        The Mozilla Reps program is open to all Mozillians who are 18 years 
  199
+        The Mozilla Reps program is open to all Mozillians who are 18 years
200 200
         of age and above. Before you become a Mozilla Rep, you must
201 201
         complete a short but rigorous application process in order to
202 202
         demonstrate your interest in and motivation for joining the
@@ -222,9 +222,10 @@
222 222
         <li>
223 223
           <h4>Step 1</h4>
224 224
           <p>Fill out and submit the
225  
-          <a href="https://bugzilla.mozilla.org/form.reps.mentorship">Mozilla
226  
-Reps application form</a>
227  
-          . A Mozilla Rep mentor will be in touch within 24 hours.</p>
  225
+          <a href="https://bugzilla.mozilla.org/form.reps.mentorship">
  226
+            Mozilla Reps application form
  227
+          </a>.
  228
+          A Mozilla Rep mentor will be in touch within 24 hours.</p>
228 229
         </li>
229 230
         <li>
230 231
           <h4>Step 2</h4>
10  remo/base/templates/main.html
... ...
@@ -1,4 +1,6 @@
1  
-{% extends "base.html" %} {% load markup %} {% block content %}
  1
+{% extends "base.html" %}
  2
+
  3
+{% block content %}
2 4
 
3 5
 <!-- Sidereel Orbit featured images -->
4 6
 <div class="row show-on-desktop">
@@ -64,16 +66,16 @@
64 66
       </div>
65 67
       <div class="eight columns">
66 68
         <h5>
67  
-          <a href="{% url profiles_view_profile featuredrep.user.userprofile.display_name %}">
  69
+          <a href="{{ url('profiles_view_profile', featuredrep.user.userprofile.display_name) }}">
68 70
             {{ featuredrep.user.first_name }}
69 71
           </a>
70 72
           <br>
71  
-          <a href="{% url profiles_view_profile featuredrep.user.userprofile.display_name %}">
  73
+          <a href="{{ url('profiles_view_profile', featuredrep.user.userprofile.display_name) }}">
72 74
             {{ featuredrep.user.last_name }}
73 75
           </a>
74 76
         </h5>
75 77
         <br>
76  
-        {{ featuredrep.user.userprofile.city }}, {{ featuredrep.user.userprofile.country}}
  78
+        {{ featuredrep.user.userprofile.city }}, {{ featuredrep.user.userprofile.country }}
77 79
       </div>
78 80
       {% else %}
79 81
       <div class="twelve columns">
10  remo/featuredrep/templates/featuredrep_alter.html
@@ -15,17 +15,17 @@
15 15
       Please specify the rep and add descriptive text.
16 16
     </p>
17 17
     <form class="custom" method="post" action="{{ post_to }}">
18  
-      {% csrf_token %}
  18
+      {{ csrf() }}
19 19
       <select id="id_user" name="user">
20  
-        {% if not form.user.value %}
  20
+        {% if not form.user.value() %}
21 21
           <option selected="selected" value="">
22 22
             ---------
23 23
           </option>
24 24
         {% endif %}
25 25
         {% for rep in reps %}
26 26
           <option value="{{ rep.id }}"
27  
-                  {% if rep.id == form.user.value %}selected="selected"{% endif %}>
28  
-            {{ rep.get_full_name }} :{{ rep.userprofile.display_name }}
  27
+                  {% if rep.id == form.user.value() %}selected="selected"{% endif %}>
  28
+            {{ rep.get_full_name() }} :{{ rep.userprofile.display_name }}
29 29
           </option>
30 30
         {% endfor %}
31 31
       </select>
@@ -33,7 +33,7 @@
33 33
         {{ form.user.errors }}
34 34
       </small>
35 35
       <textarea class="flat big" placeholder="Enter featured text using markup"
36  
-                name="text">{{ form.text.value }}</textarea>
  36
+                name="text">{{ form.text.value() }}</textarea>
37 37
       <small class="error">
38 38
         {{ form.text.errors }}
39 39
       </small>
15  remo/featuredrep/templates/featuredrep_list.html
... ...
@@ -1,5 +1,4 @@
1 1
 {% extends "base.html" %}
2  
-{% load markup %}
3 2
 
4 3
 {% block pagetitle %}Mozilla Reps - Featured Reps {% endblock%}
5 4
 
@@ -15,7 +14,7 @@
15 14
 <!-- Adding new rep -->
16 15
 <div class="row">
17 16
   <div class="twelve columns align-right">
18  
-    <a href="{% url featuredrep_add_featured %}"
  17
+    <a href="{{ url('featuredrep_add_featured') }}"
19 18
        class="featured-button small white button nice radius">Add new</a>
20 19
   </div>
21 20
 </div>
@@ -42,8 +41,8 @@
42 41
         {% for feature in featured %}
43 42
         <tr>
44 43
           <td>
45  
-            <a href="{% url profiles_view_profile feature.user.userprofile.display_name %}">
46  
-              {{ feature.user.get_full_name }}
  44
+            <a href="{{ url('profiles_view_profile', feature.user.userprofile.display_name) }}">
  45
+              {{ feature.user.get_full_name() }}
47 46
             </a>
48 47
           </td>
49 48
           <td>
@@ -53,17 +52,17 @@
53 52
             {{ feature.created_on }}
54 53
           </td>
55 54
           <td>
56  
-            <a href="{% url featuredrep_edit_featured feature.id %}"
  55
+            <a href="{{ url('featuredrep_edit_featured', feature.id) }}"
57 56
                class="featured-edit pictogram-button">e</a>
58 57
             <form id="deleteform-{{ feature.id }}" method="post"
59  
-                  action="{% url featuredrep_delete_featured feature.id %}">
60  
-              {% csrf_token %}
  58
+                  action="{{ url('featuredrep_delete_featured', feature.id) }}">
  59
+              {{ csrf() }}
61 60
               <a href="#" data-reveal-id="delete-feature"
62 61
                  class="featured-delete pictogram-button">X</a>
63 62
             </form>
64 63
           </td>
65 64
         </tr>
66  
-        {% empty %}
  65
+        {% else %}
67 66
         <tr>
68 67
           <td>
69 68
             No entries yet!
1  remo/profiles/people_urls.py
... ...
@@ -1,4 +1,3 @@
1  
-from django.core.urlresolvers import reverse
2 1
 from django.conf.urls.defaults import *
3 2
 
4 3
 # We use /people/[query] to automatically load the people list view
2  remo/profiles/templates/plainlogin.html
@@ -10,7 +10,7 @@
10 10
     {% if form.errors %}
11 11
       <p>Your username and password didn't match. Please try again.</p>
12 12
     {% endif %}
13  
-    <form method="post" action="{% url plainlogin %}">
  13
+    <form method="post" action="{{ url('plainlogin') }}">
14 14
       {% csrf_token %}
15 15
       <table>
16 16
         <tr>
62  remo/profiles/templates/profiles_edit.html
@@ -16,8 +16,8 @@
16 16
   </div>
17 17
 </div>
18 18
 <form class="custom" method="post"
19  
-      action="{% url profiles_edit pageuser.userprofile.display_name %}">
20  
-  {% csrf_token %}
  19
+      action="{{ url('profiles_edit', pageuser.userprofile.display_name) }}">
  20
+  {{ csrf() }}
21 21
   <!-- Two column block -->
22 22
   <div class="row">
23 23
     <div class="six columns">
@@ -27,7 +27,7 @@
27 27
         </div>
28 28
         <div class="eleven columns">
29 29
           <input type="text" placeholder="Username" name="display_name"
30  
-                 value="{{ profileform.display_name.value }}"
  30
+                 value="{{ profileform.display_name.value() }}"
31 31
           class="input-text big">
32 32
           {% if profileform.display_name.errors %}
33 33
             <small class="error">
@@ -35,7 +35,7 @@
35 35
             </small>
36 36
           {% endif %}
37 37
           <input type="text" placeholder="Last name" name="last_name"
38  
-                 value="{{ userform.last_name.value }}"
  38
+                 value="{{ userform.last_name.value() }}"
39 39
           class="input-text big">
40 40
           {% if userform.last_name.errors %}
41 41
             <small class="error">
@@ -43,7 +43,7 @@
43 43
             </small>
44 44
           {% endif %}
45 45
           <input type="text" placeholder="First name" name="first_name"
46  
-                 value="{{ userform.first_name.value }}"
  46
+                 value="{{ userform.first_name.value() }}"
47 47
           class="input-text big">
48 48
           {% if userform.first_name.errors %}
49 49
             <small class="error">
@@ -51,7 +51,7 @@
51 51
             </small>
52 52
           {% endif %}
53 53
           <input type="text" placeholder="Name in local language"
54  
-                 name="local_name" value="{{ profileform.local_name.value }}"
  54
+                 name="local_name" value="{{ profileform.local_name.value() }}"
55 55
           class="input-text big">
56 56
           {% if profileform.local_name.errors %}
57 57
             <small class="error">
@@ -96,14 +96,14 @@
96 96
         </div>
97 97
         <div class="eleven columns">
98 98
           <input type="text" placeholder="Personal email"
99  
-                 value="{{ profileform.private_email.value }}"
  99
+                 value="{{ profileform.private_email.value() }}"
100 100
           name="private_email" class="input-text big">
101 101
           {% if profileform.private_email.errors %}
102 102
             <small class="error">
103 103
               {{ profileform.private_email.errors }}
104 104
             </small>
105 105
           {% endif %}
106  
-          <input type="text" placeholder="Bugzilla email" value="{{ userform.email.value }}"
  106
+          <input type="text" placeholder="Bugzilla email" value="{{ userform.email.value() }}"
107 107
           name="email" class="input-text big">
108 108
           {% if userform.email.errors %}
109 109
             <small class="error">
@@ -111,7 +111,7 @@
111 111
             </small>
112 112
           {% endif %}
113 113
           <input type="text" placeholder="Mozillians.org profile"
114  
-                 value="{{ profileform.mozillians_profile_url.value }}"
  114
+                 value="{{ profileform.mozillians_profile_url.value() }}"
115 115
           name="mozillians_profile_url" class="input-text big">
116 116
           {% if profileform.mozillians_profile_url.errors %}
117 117
             <small class="error">
@@ -119,7 +119,7 @@
119 119
             </small>
120 120
           {% endif %}
121 121
           <input type="text" placeholder="Wiki profile"
122  
-                 value="{{ profileform.wiki_profile_url.value }}"
  122
+                 value="{{ profileform.wiki_profile_url.value() }}"
123 123
                  name="wiki_profile_url" class="input-text big">
124 124
           {% if profileform.wiki_profile_url.errors %}
125 125
             <small class="error">
@@ -127,15 +127,15 @@
127 127
             </small>
128 128
           {% endif %}
129 129
           <select name="mentor">
130  
-            {% if not profileform.mentor.value %}
  130
+            {% if not profileform.mentor.value() %}
131 131
               <option selected="selected" value="">
132 132
                 Choose mentor
133 133
               </option>
134 134
             {% endif %}
135 135
             {% for mentor in mentors %}
136  
-              <option value="{{ mentor.id }}" {% if mentor.id == profileform.mentor.value %}
  136
+              <option value="{{ mentor.id }}" {% if mentor.id == profileform.mentor.value() %}
137 137
                       selected="selected" {% endif %}>
138  
-                {{ mentor.get_full_name }}
  138
+                {{ mentor.get_full_name() }}
139 139
               </option>
140 140
             {% endfor %}
141 141
           </select>
@@ -148,14 +148,14 @@
148 148
           p
149 149
         </div>
150 150
         <div class="eleven columns">
151  
-          <input type="text" placeholder="City" value="{{ profileform.city.value }}"
  151
+          <input type="text" placeholder="City" value="{{ profileform.city.value() }}"
152 152
                  name="city" class="input-text big">
153 153
           {% if profileform.city.errors %}
154 154
             <small class="error">
155 155
               {{ profileform.city.errors }}
156 156
             </small>
157 157
           {% endif %}
158  
-          <input type="text" placeholder="State or Region" value="{{ profileform.region.value }}"
  158
+          <input type="text" placeholder="State or Region" value="{{ profileform.region.value() }}"
159 159
                  name="region" class="input-text big">
160 160
           {% if profileform.region.errors %}
161 161
             <small class="error">
@@ -163,12 +163,12 @@
163 163
             </small>
164 164
           {% endif %}
165 165
           <select name="country">
166  
-            {% if not profileform.country.value %}
  166
+            {% if not profileform.country.value() %}
167 167
               <option selected="selected">Country</option>
168 168
             {% endif%}
169 169
             {% for country in countries %}
170 170
               <option value="{{ country }}"
171  
-                {% if profileform.country.value == country %}selected="selected"{% endif %}>
  171
+                {% if profileform.country.value() == country %}selected="selected"{% endif %}>
172 172
                 {{ country }}
173 173
               </option>
174 174
             {% endfor %}
@@ -178,9 +178,9 @@
178 178
               {{ profileform.country.errors }}
179 179
             </small>
180 180
           {% endif %}
181  
-          <input type="hidden" placeholder="Latitude" value="{{ profileform.lat.value }}"
  181
+          <input type="hidden" placeholder="Latitude" value="{{ profileform.lat.value() }}"
182 182
           name="lat" class="input-text point-lat">
183  
-          <input type="hidden" placeholder="Longitude" value="{{ profileform.lon.value }}"
  183
+          <input type="hidden" placeholder="Longitude" value="{{ profileform.lon.value() }}"
184 184
           name="lon" class="input-text point-long">
185 185
           {% if profileform.lat.errors or profileform.lon.errors %}
186 186
             <small class="error">
@@ -203,7 +203,7 @@
203 203
         </div>
204 204
         <div class="eleven columns">
205 205
           <input type="text" placeholder="Twitter handle"
206  
-                 value="{{ profileform.twitter_account.value }}"
  206
+                 value="{{ profileform.twitter_account.value() }}"
207 207
           name="twitter_account" class="input-text big">
208 208
           {% if profileform.twitter_account.errors %}
209 209
             <small class="error">
@@ -211,7 +211,7 @@
211 211
             </small>
212 212
           {% endif %}
213 213
           <input type="text" placeholder="Facebook profile"
214  
-                 value="{{ profileform.facebook_url.value }}"
  214
+                 value="{{ profileform.facebook_url.value() }}"
215 215
           name="facebook_url" class="input-text big">
216 216
           {% if profileform.facebook_url.errors %}
217 217
             <small class="error">
@@ -219,7 +219,7 @@
219 219
             </small>
220 220
           {% endif %}
221 221
           <input type="text" placeholder="Diaspora profile"
222  
-                 value="{{ profileform.diaspora_url.value }}"
  222
+                 value="{{ profileform.diaspora_url.value() }}"
223 223
           name="diaspora_url" class="input-text big">
224 224
           {% if profileform.diaspora_url.errors %}
225 225
             <small class="error">
@@ -227,7 +227,7 @@
227 227
             </small>
228 228
           {% endif %}
229 229
           <input type="text" placeholder="LinkedIn profile"
230  
-                 value="{{ profileform.linkedin_url.value }}"
  230
+                 value="{{ profileform.linkedin_url.value() }}"
231 231
           name="linkedin_url" class="input-text big">
232 232
           {% if profileform.linkedin_url.errors %}
233 233
             <small class="error">
@@ -244,7 +244,7 @@
244 244
         </div>
245 245
         <div class="eleven columns">
246 246
           <input type="text" placeholder="Jabber ID"
247  
-                 value="{{ profileform.jabber_id.value }}"
  247
+                 value="{{ profileform.jabber_id.value() }}"
248 248
           name="jabber_id" class="input-text big">
249 249
           {% if profileform.jabber_id.errors %}
250 250
             <small class="error">
@@ -252,7 +252,7 @@
252 252
             </small>
253 253
           {% endif %}
254 254
           <input type="text" placeholder="IRC nickname"
255  
-                 value="{{ profileform.irc_name.value }}"
  255
+                 value="{{ profileform.irc_name.value() }}"
256 256
           name="irc_name" class="input-text big">
257 257
           {% if profileform.irc_name.errors %}
258 258
             <small class="error">
@@ -260,7 +260,7 @@
260 260
             </small>
261 261
           {% endif %}
262 262
           <textarea class="flat" placeholder="Please list the channels you use in IRC"
263  
-                    name="irc_channels">{{ profileform.irc_channels.value }}</textarea>
  263
+                    name="irc_channels">{{ profileform.irc_channels.value() }}</textarea>
264 264
           {% if profileform.irc_channels.errors %}
265 265
             <small class="error">
266 266
               {{ profileform.irc_channels.errors }}
@@ -278,7 +278,7 @@
278 278
         </div>
279 279
         <div class="eleven columns">
280 280
           <input type="text" placeholder="Personal site URL"
281  
-                 value="{{ profileform.personal_website_url.value }}"
  281
+                 value="{{ profileform.personal_website_url.value() }}"
282 282
                  name="personal_website_url" class="input-text big">
283 283
           {% if profileform.personal_website_url.errors %}
284 284
             <small class="error">
@@ -286,7 +286,7 @@
286 286
             </small>
287 287
           {% endif %}
288 288
           <input type="text" placeholder="Feed for Reps Planet"
289  
-                 value="{{ profileform.personal_blog_feed.value }}"
  289
+                 value="{{ profileform.personal_blog_feed.value() }}"
290 290
                  name="personal_blog_feed" class="input-text big">
291 291
           {% if profileform.personal_blog_feed.errors %}
292 292
             <small class="error">
@@ -304,7 +304,7 @@
304 304
         <div class="eleven columns">
305 305
           <br>
306 306
           <textarea class="flat" placeholder="Bio - Write us a bit about yourself"
307  
-                    name="bio">{{ profileform.bio.value }}</textarea>
  307
+                    name="bio">{{ profileform.bio.value() }}</textarea>
308 308
           {% if profileform.bio.errors %}
309 309
             <small class="error">
310 310
               {{ profileform.bio.errors }}
@@ -409,8 +409,8 @@
409 409
     By pressing the following button you will permanently and irreversibly delete the
410 410
     profile of this Rep.
411 411
   </p>
412  
-    <form method="post" action="{% url profiles_delete pageuser.userprofile.display_name %}">
413  
-      {% csrf_token %}
  412
+    <form method="post" action="{{ url('profiles_delete', pageuser.userprofile.display_name) }}">
  413
+      {{ csrf() }}
414 414
       <button class="large red button nice radius close-reveal-modal">
415 415
         Delete profile
416 416
       </button>
4  remo/profiles/templates/profiles_invite.html
@@ -14,8 +14,8 @@
14 14
 <div class="row">
15 15
   <div class="twelve columns">
16 16
     <p>Please enter the Bugzilla mail of the newly accepted rep and press add.</p>
17  
-    <form action="{% url profiles_invite %}" method="post" class="custom">
18  
-      {% csrf_token %}
  17
+    <form action="{{ url('profiles_invite') }}" method="post" class="custom">
  18
+      {{ csrf() }}
19 19
       <input type="text" name="email" placeholder="Bugzilla mail" class="input-text">
20 20
       {% if form.email.errors %}
21 21
         <small class="error">
18  remo/profiles/templates/profiles_people.html
@@ -38,13 +38,13 @@
38 38
   <ul class="block-grid mobile three-up" id="searchlist">
39 39
     {% for person in people %}
40 40
       <li id="li-person-{{ person.id }}">
41  
-        <a href="{% url profiles_view_profile person.userprofile.display_name %}">
  41
+        <a href="{{ url('profiles_view_profile', person.userprofile.display_name) }}">
42 42
           <div class="panel grid-profile">
43 43
             <div class="row">
44 44
               <div class="three phone-one columns grid-profile-image">
45  
-                <img src="{{ person.userprofile.get_avatar_url }}"
  45
+                <img src="{{ person.userprofile.get_avatar_url() }}"
46 46
                      class="profiles-people-avatar"
47  
-                     alt="{{ person.get_full_name }} avatar">
  47
+                     alt="{{ person.get_full_name() }} avatar">
48 48
                 </div>
49 49
                 <div class="nine phone-three columns grid-profile-text">
50 50
                   <h6>{{ person.first_name }}</h6>
@@ -88,25 +88,25 @@
88 88
           {% for person in people %}
89 89
             <tr>
90 90
               <td>
91  
-                <a href="{% url profiles_view_profile person.userprofile.display_name %}">
92  
-                  {{ person.get_full_name }}
  91
+                <a href="{{ url('profiles_view_profile', person.userprofile.display_name) }}">
  92
+                  {{ person.get_full_name() }}
93 93
                 </a>
94 94
               </td>
95 95
               <td>
96 96
                 {{ person.userprofile.display_name }}
97 97
               </td>
98 98
               <td>
99  
-                <a href="{% url profiles_list_profiles %}{{ person.userprofile.city }}">
  99
+x                <a href="{{ url('profiles_list_profiles') }}{{ person.userprofile.city }}">
100 100
                   {{ person.userprofile.city }}
101 101
                 </a>
102 102
               </td>
103 103
               <td>
104  
-                <a href="{% url profiles_list_profiles %}{{ person.userprofile.country }}">
  104
+                <a href="{{ url('profiles_list_profiles') }}{{ person.userprofile.country }}">
105 105
                   {{ person.userprofile.country }}
106 106
                 </a>
107 107
               </td>
108 108
               <td>
109  
-                {{ person.userprofile.mozillians_profile_url|urlizetrunc:50}}
  109
+                {{ person.userprofile.mozillians_profile_url|urlize(50)}}
110 110
               </td>
111 111
               <td>
112 112
                 {{ person.userprofile.private_email }}
@@ -118,7 +118,7 @@
118 118
                 <span>{{ person.userprofile.irc_name }}</span>
119 119
                 <span>{{ person.userprofile.twitter_account }}</span>
120 120
                 <span>{{ person.userprofile.jabber_id }}</span>
121  
-                <span>{{ person.userprofile.get_gender_display }}</span>
  121
+                <span>{{ person.userprofile.get_gender_display() }}</span>
122 122
               </td>
123 123
             </tr>
124 124
           {% endfor %}
34  remo/profiles/templates/profiles_view.html
... ...
@@ -1,5 +1,4 @@
1 1
 {% extends "base.html" %}
2  
-{% load markup %}
3 2
 
4 3
 {% block pagetitle %}
5 4
 Mozilla Reps - Profile of {{ user_profile.display_name }}
@@ -87,15 +86,15 @@ <h5 class="grayed">
87 86
             Location
88 87
           </span>
89 88
           &nbsp;
90  
-          <a href="{% url profiles_list_profiles %}{{ user_profile.city }}">
  89
+          <a href="{{ url('profiles_list_profiles') }}{{ user_profile.city }}">
91 90
             {{ user_profile.city }}
92 91
           </a>
93 92
           -
94  
-          <a href="{% url profiles_list_profiles %}{{ user_profile.region }}">
  93
+          <a href="{{ url('profiles_list_profiles') }}{{ user_profile.region }}">
95 94
             {{ user_profile.region }}
96 95
           </a>
97 96
           -
98  
-          <a href="{% url profiles_list_profiles %}{{ user_profile.country }}">
  97
+          <a href="{{ url('profiles_list_profiles') }}{{ user_profile.country }}">
99 98
             {{ user_profile.country }}
100 99
           </a>
101 100
         </p>
@@ -104,7 +103,7 @@ <h5 class="grayed">
104 103
           <span class="white radius label">
105 104
             Gender
106 105
           </span>
107  
-          &nbsp;{{ user_profile.get_gender_display }}
  106
+          &nbsp;{{ user_profile.get_gender_display() }}
108 107
         </p>
109 108
         {% endif %}
110 109
       </div>
@@ -130,13 +129,13 @@ <h5 class="grayed">
130 129
           <span class="white radius label">
131 130
             Mozillians Profile
132 131
           </span>
133  
-          &nbsp;{{ user_profile.mozillians_profile_url|urlizetrunc:50 }}
  132
+          &nbsp;{{ user_profile.mozillians_profile_url|urlize(50) }}
134 133
         </p>
135 134
         <p class="profile-item">
136 135
           <span class="white radius label">
137 136
             Wiki Profile
138 137
           </span>
139  
-          &nbsp;{{ user_profile.wiki_profile_url|urlizetrunc:50 }}
  138
+          &nbsp;{{ user_profile.wiki_profile_url|urlize(50) }}
140 139
         </p>
141 140
         {% if mentor %}
142 141
           <p class="profile-item">
@@ -144,15 +143,16 @@ <h5 class="grayed">
144 143
               Mentor
145 144
             </span>
146 145
             &nbsp;
147  
-            <a href="{% url profiles_view_profile mentor.userprofile.display_name %}">
148  
-              {{ mentor.get_full_name }}
  146
+            <a href="{{ url('profiles_view_profile', mentor.userprofile.display_name) }}">
  147
+              {{ mentor.get_full_name() }}
149 148
             </a>
150 149
           </p>
151 150
         {% endif %}
152 151
       </div>
153 152
     </div>
154 153
     <div class="row">
155  
-      {% if user_profile.twitter_account or user_profile.facebook_url or user_profile.diaspora_url or user_profile.linkedin_url %}
  154
+      {% if user_profile.twitter_account or user_profile.facebook_url or
  155
+            user_profile.diaspora_url or user_profile.linkedin_url %}
156 156
         <div class="one columns pictogram">
157 157
           T
158 158
         </div>
@@ -173,7 +173,7 @@ <h5 class="grayed">
173 173
             <span class="white radius label">
174 174
               Facebook profile
175 175
             </span>
176  
-            &nbsp;{{ user_profile.facebook_url|urlizetrunc:50 }}
  176
+            &nbsp;{{ user_profile.facebook_url|urlize(50) }}
177 177
           </p>
178 178
         {% endif %}
179 179
         {% if user_profile.diaspora_url %}
@@ -181,7 +181,7 @@ <h5 class="grayed">
181 181
             <span class="white radius label">
182 182
               Diaspora profile
183 183
             </span>
184  
-            &nbsp;{{ user_profile.diaspora_url|urlizetrunc:50 }}
  184
+            &nbsp;{{ user_profile.diaspora_url|urlize(50) }}
185 185
           </p>
186 186
         {% endif %}
187 187
         {% if user_profile.linkedin_url %}
@@ -189,7 +189,7 @@ <h5 class="grayed">
189 189
             <span class="white radius label">
190 190
               LinkedIn profile
191 191
             </span>
192  
-            &nbsp;{{ user_profile.linkedin_url|urlizetrunc:50 }}
  192
+            &nbsp;{{ user_profile.linkedin_url|urlize(50) }}
193 193
           </p>
194 194
         {% endif %}
195 195
         </div>
@@ -235,7 +235,7 @@ <h5 class="grayed">
235 235
               <span class="white radius label">
236 236
                 Personal Site
237 237
               </span>
238  
-              &nbsp;{{ user_profile.personal_website_url|urlizetrunc:50 }}
  238
+              &nbsp;{{ user_profile.personal_website_url|urlize(50) }}
239 239
             </p>
240 240
           {% endif %}
241 241
           {% if user_profile.personal_blog_feed %}
@@ -243,7 +243,7 @@ <h5 class="grayed">
243 243
               <span class="white radius label">
244 244
                 Feed for Reps Planet
245 245
               </span>
246  
-              &nbsp;{{ user_profile.personal_blog_feed|urlizetrunc:50 }}
  246
+              &nbsp;{{ user_profile.personal_blog_feed|urlize(50) }}
247 247
             </p>
248 248
           {% endif %}
249 249
         </div>
@@ -260,7 +260,7 @@ <h5 class="grayed">
260 260
               Added by
261 261
             </span>
262 262
             &nbsp;
263  
-            <a href="{% url profiles_view_profile added_by.userprofile.display_name %}">
  263
+            <a href="{{ url('profiles_view_profile', added_by.userprofile.display_name) }}">
264 264
               {{ added_by.userprofile.display_name }}
265 265
             </a>
266 266
           </p>
@@ -272,7 +272,7 @@ <h5 class="grayed">
272 272
 {% if user == pageuser or perms.profiles.can_edit_profiles %}
273 273
   <div class="row">
274 274
     <div id="save-profile" class="twelve columns align-right">
275  
-      <a href="{% url profiles_edit user_profile.display_name %}"
  275
+      <a href="{{ url('profiles_edit', user_profile.display_name) }}"
276 276
          class="small white button nice radius">Edit profile</a>
277 277
     </div>
278 278
   </div>
3  remo/settings/base.py
@@ -73,9 +73,6 @@
73 73
 # Required for BrowserID. Very important security feature
74 74
 SITE_URL = 'http://reps.mozilla.org'
75 75
 
76  
-# Remove jinja template engine. To be revisited
77  
-TEMPLATE_LOADERS = filter(lambda x: x != 'jingo.Loader', TEMPLATE_LOADERS)
78  
-
79 76
 # Remove LocaleURLMiddleware since we are not localing our website
80 77
 MIDDLEWARE_CLASSES = filter(
81 78
     lambda x: x != 'funfactory.middleware.LocaleURLMiddleware',
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.