Added get_full_name to event and used in required templates.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Wed, 21 Jul 2010 03:27:56 +0530
changeset 141 3a325a865252
parent 140 dd313f32bbe3
child 142 70fcb57d8d15
Added get_full_name to event and used in required templates.
project/scipycon/base/models.py
project/templates/registration/registrations.html
project/templates/user/_usermenu.html
--- a/project/scipycon/base/models.py	Wed Jul 21 03:26:58 2010 +0530
+++ b/project/scipycon/base/models.py	Wed Jul 21 03:27:56 2010 +0530
@@ -26,6 +26,9 @@
     def __unicode__(self):
         return '%s %s' % (self.name, self.turn)
 
+    def get_full_name(self):
+        return self.__unicode__()
+
 
 class Timeline(models.Model):
     """Timeline of the program
--- a/project/templates/registration/registrations.html	Wed Jul 21 03:26:58 2010 +0530
+++ b/project/templates/registration/registrations.html	Wed Jul 21 03:27:56 2010 +0530
@@ -6,7 +6,7 @@
 
 {% block content %}
 
-<h1>Submit Registration</h1>
+<h1>Registration Statistics</h1>
 
     {% if over_reg %}
     <div class="notice">
@@ -18,9 +18,16 @@
     </div>
     {% endif %}
 
-<p>Currently <strong>{{ registrations }}</strong> persons have registered to attend SciPy.in 2009.</p>
+<p>
+  Currently <strong>{{ registrations }}</strong> people have registered
+  to attend {{ event.get_full_name }}.
+</p>
 
-<p>To attend SciPy.in 2009 please <a href="/submit-registration/">register</a></p>
-
+{% if not registration %}
+  <p>
+    To attend {{ event.get_full_name }} please <a href="
+    {% url scipycon_submit_registration params.scope %}">register</a>
+  </p>
+{% endif %}
 
 {% endblock %}
--- a/project/templates/user/_usermenu.html	Wed Jul 21 03:26:58 2010 +0530
+++ b/project/templates/user/_usermenu.html	Wed Jul 21 03:27:56 2010 +0530
@@ -1,11 +1,15 @@
 <div class="right">
     <ul class="horizontal-menu">
         <li>
-            <a href="{% url scipycon_account params.scope %}">My Profile</a>
+            <a href="{% url scipycon_account params.scope %}">My Account</a>
         </li>
         <li>
             <a href="{% url scipycon_edit_profile params.scope %}">Edit Profile</a>
         </li>
+        {% comment %} <li>
+            <a href="{% url scipycon_edit_registration params.scope registration.id %}">Edit Registration</a>
+        </li>
+        {% endcomment %}
         <li>
             <a href="{% url scipycon_password params.scope %}">Change Password</a>
         </li>