From 981855ad27c331a03dbfcec24bd6b49c30681c94 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 9 Nov 2015 15:35:26 +0200 Subject: Remove username from profile page URLs --- servo/models/calendar.py | 4 +- servo/templates/accounts/calendars.html | 58 ++++++++++++++--------------- servo/templates/accounts/orders.html | 8 ++-- servo/templates/accounts/tabs.html | 12 +++--- servo/templates/accounts/updates.html | 2 +- servo/templates/accounts/view_calendar.html | 6 +-- servo/templates/checkin/index.html | 2 +- servo/templates/default.html | 14 +++---- servo/templates/search/spotlight.html | 2 +- servo/urls/default.py | 2 +- servo/views/account.py | 57 ++++++++++++++-------------- servo/views/order.py | 3 +- 12 files changed, 84 insertions(+), 86 deletions(-) (limited to 'servo') diff --git a/servo/models/calendar.py b/servo/models/calendar.py index b88faae..e7bf15f 100644 --- a/servo/models/calendar.py +++ b/servo/models/calendar.py @@ -28,7 +28,7 @@ class Calendar(models.Model): hours_per_day = models.FloatField( null=True, blank=True, - verbose_name=_("hours per day"), + verbose_name=_("Hours per day"), help_text=_("How many hours per day should be in this calendar") ) @@ -77,7 +77,7 @@ class Calendar(models.Model): return math.ceil(total/3600.0) def get_absolute_url(self): - return reverse('calendars.view', args=[self.user.username, self.pk]) + return reverse('calendars.view', args=[self.pk]) class Meta: app_label = "servo" diff --git a/servo/templates/accounts/calendars.html b/servo/templates/accounts/calendars.html index c10276c..72a83f9 100755 --- a/servo/templates/accounts/calendars.html +++ b/servo/templates/accounts/calendars.html @@ -4,26 +4,26 @@ {% block toolbar %}
- {% trans "New Calendar" %} -{% if calendar %} - {% trans "New Event" %} -{% endif %} + {% trans "New Calendar" %} + {% if calendar %} + {% trans "New Event" %} + {% endif %}
-{% if calendar %} - {% trans "Print" %} - {% trans "Edit" %} - {% if perms.servo.delete_calendar %} - {% trans "Delete" %} - {% else %} - {% trans "Delete" %} - {% endif %} -{% endif %} + {% if calendar %} + {% trans "Print" %} + {% trans "Edit" %} + {% if perms.servo.delete_calendar %} + {% trans "Delete" %} + {% else %} + {% trans "Delete" %} + {% endif %} + {% endif %}
- {% trans "Download" %} + {% trans "Download" %}
{% endblock toolbar %} @@ -31,25 +31,25 @@ {% block second_row %}
-
- -
- -
+
+ +
+ +
{% block detail_view %} -

{% trans "No calendar selected" %}

+

{% trans "No calendar selected" %}

{% endblock detail_view %} -
+
{% endblock second_row %} {% block crumbs %} -
  • {% trans "Calendars" %}
  • +
  • {% trans "Calendars" %}
  • {% endblock crumbs %} diff --git a/servo/templates/accounts/orders.html b/servo/templates/accounts/orders.html index 8420ad8..c26e07d 100755 --- a/servo/templates/accounts/orders.html +++ b/servo/templates/accounts/orders.html @@ -23,7 +23,7 @@
    - {% include "accounts/tabs.html" %} + {% include "accounts/tabs.html" %}
    @@ -32,15 +32,15 @@
    - {% for field in form %} + {% for field in form %}
    {{ field }}
    - {% endfor %} + {% endfor %}


    diff --git a/servo/templates/accounts/tabs.html b/servo/templates/accounts/tabs.html index 4444ab8..e570241 100755 --- a/servo/templates/accounts/tabs.html +++ b/servo/templates/accounts/tabs.html @@ -2,21 +2,19 @@ {% load servo_tags %} diff --git a/servo/templates/accounts/updates.html b/servo/templates/accounts/updates.html index 121aea9..08644ba 100644 --- a/servo/templates/accounts/updates.html +++ b/servo/templates/accounts/updates.html @@ -4,7 +4,7 @@ {% block toolbar %} {% if perms.servo.add_order %} - {% trans "Clear all" %} + {% trans "Clear all" %} {% endif %} {% endblock toolbar %} diff --git a/servo/templates/accounts/view_calendar.html b/servo/templates/accounts/view_calendar.html index 2b063e2..7eece46 100755 --- a/servo/templates/accounts/view_calendar.html +++ b/servo/templates/accounts/view_calendar.html @@ -15,9 +15,9 @@ {% block browse_block %} {% endblock browse_block %}
    @@ -61,6 +61,6 @@ {% endblock detail_view %} {% block crumbs %} -
  • {% trans "Calendars" %} /
  • +
  • {% trans "Calendars" %} /
  • {{ calendar.title }}
  • {% endblock crumbs %} diff --git a/servo/templates/checkin/index.html b/servo/templates/checkin/index.html index 2995be5..d7928fb 100644 --- a/servo/templates/checkin/index.html +++ b/servo/templates/checkin/index.html @@ -44,7 +44,7 @@
  • {% trans "No users found" %}
  • {% endfor %}
  • -
  • {% bootstrap_icon "log-in" %} {% trans "Go to Servo" %}
  • +
  • {% bootstrap_icon "log-in" %} {% trans "Go to Servo" %}
  • {% bootstrap_icon "off" %} {% trans "Log out" %}...
  • diff --git a/servo/templates/default.html b/servo/templates/default.html index 922d567..adcc592 100755 --- a/servo/templates/default.html +++ b/servo/templates/default.html @@ -31,7 +31,7 @@