Skip to content

Commit

Permalink
Merge pull request #2 from praekelt/feature/issue-1-add-namespace
Browse files Browse the repository at this point in the history
use namespaced URLs
  • Loading branch information
Saeed Marzban committed Aug 19, 2016
2 parents cedd56d + 0b9e347 commit dd166d5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions molo/servicedirectory/templates/servicedirectory/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p class="sd-help-text search">Search by typing something, or choose a category below:</p>

<form action="{% url 'location-search' %}" method="get" class="sd-search-form">
<form action="{% url 'molo.servicedirectory:location-search' %}" method="get" class="sd-search-form">

<input type="text" name="search" placeholder="I'm looking for..." />
<input type="submit" value="Search" />
Expand All @@ -15,13 +15,13 @@
<div class="sd-categories">
{% for category in categories_keywords %}
<h1 class="sd-heading category-grouping">
<a href="{% url 'location-search' %}?search={{ category.name }}">{{ category.name }}</a>
<a href="{% url 'molo.servicedirectory:location-search' %}?search={{ category.name }}">{{ category.name }}</a>
<br>
{% for keyword in category.keywords %}
<a href="{% url 'location-search' %}?search={{ keyword }}" class="sd-cat-keyword">{{ keyword }}</a>{% if not forloop.last or and_more %}, {% endif %}
<a href="{% url 'molo.servicedirectory:location-search' %}?search={{ keyword }}" class="sd-cat-keyword">{{ keyword }}</a>{% if not forloop.last or and_more %}, {% endif %}
{% endfor %}
{% if and_more %}
<a href="{% url 'home' %}?category={{ category.name }}" class="sd-cat-keyword">and more...</a>
<a href="{% url 'molo.servicedirectory:home' %}?category={{ category.name }}" class="sd-cat-keyword">and more...</a>
{% endif %}
</h1>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<p class="sd-back"><a href="{% url 'home' %}">< Back</a></p>
<p class="sd-back"><a href="{% url 'molo.servicedirectory:home' %}">< Back</a></p>

<p class="sd-heading search">
In which area would you like to find a service?
</p>

<form action="{% url 'location-results' %}" method="get" class="sd-search-form">
<form action="{% url 'molo.servicedirectory:location-results' %}" method="get" class="sd-search-form">

<input type="text" name="location" value="{{ location_term }}"/>
<input type="submit" value="Search" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h6 class="sd-heading choose-location">Choose a location:</h6>
<ul class="sd-search-results">
{% for prediction in autocomplete_suggestions.predictions %}
<li>
<a href="{% url 'organisation-results' %}?place_id={{ prediction.place_id }}&location={{ location_term }}&search={{ search_term }}">{{ prediction.description }}</a>
<a href="{% url 'molo.servicedirectory:organisation-results' %}?place_id={{ prediction.place_id }}&location={{ location_term }}&search={{ search_term }}">{{ prediction.description }}</a>
<br/>
</li>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ <h1 class="sd-heading service-tradinghours">Trading Hours</h1>
</div>
{% endif %}

<a class="sd-report-link" href="{% url 'organisation-report' organisation.id %}?org_name={{ organisation.name | urlencode }}">Report incorrect info</a>
<a class="sd-report-link" href="{% url 'molo.servicedirectory:organisation-report' organisation.id %}?org_name={{ organisation.name | urlencode }}">Report incorrect info</a>

<a href="{% url 'organisation-sms' organisation.id %}" class="sd-sms-button primary">Send Service to Someone</a>
<a href="{% url 'molo.servicedirectory:organisation-sms' organisation.id %}" class="sd-sms-button primary">Send Service to Someone</a>

<a href="{% url 'organisation-sms-self' organisation.id %}" class="sd-sms-button secondary">Send This Service to Yourself</a>
<a href="{% url 'molo.servicedirectory:organisation-sms-self' organisation.id %}" class="sd-sms-button secondary">Send This Service to Yourself</a>

<hr/>

<h1 class="sd-heading service-rating">How helpful was this?</h1>

<form method="post" action="{% url 'organisation-rate' organisation.id %}">
<form method="post" action="{% url 'molo.servicedirectory:organisation-rate' organisation.id %}">
{% csrf_token %}
<div class="org-rate-container">
<div class="org-rate-faces">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p class="sd-back"><a href="{{ change_location_url }}">< Back</a></p>

<form action="{% url 'organisation-results' %}" method="get" class="sd-search-form">
<form action="{% url 'molo.servicedirectory:organisation-results' %}" method="get" class="sd-search-form">

<input type="text" name="search" value="{{ search_term }}" />
<input type="submit" value="Search" />
Expand All @@ -31,7 +31,7 @@
<hr/>

{% for organisation in search_results %}
<a href="{% url 'organisation-detail' organisation.id %}" class="sd-service-result">
<a href="{% url 'molo.servicedirectory:organisation-detail' organisation.id %}" class="sd-service-result">
<h1 class="sd-heading svc-org-name">
{{ organisation.name }}
</h1>
Expand Down Expand Up @@ -64,12 +64,12 @@ <h1 class="sd-heading svc-org-name">
Check your spelling
</li>
<li>
<a href="{% url 'home' %}">Search for something else</a>
<a href="{% url 'molo.servicedirectory:home' %}">Search for something else</a>
</li>
<li>
Search a category:
{% for category in categories_keywords %}
<a href="{% url 'organisation-results' %}?search={{ category.name }}&location={{ location_term }}&place_id={{ place_id }}{% if place_latlng %}&place_latlng={{ place_latlng }}{% endif %}{% if place_formatted_address %}&place_formatted_address={{ place_formatted_address }}{% endif %}">
<a href="{% url 'molo.servicedirectory:organisation-results' %}?search={{ category.name }}&location={{ location_term }}&place_id={{ place_id }}{% if place_latlng %}&place_latlng={{ place_latlng }}{% endif %}{% if place_formatted_address %}&place_formatted_address={{ place_formatted_address }}{% endif %}">
{{ category.name }}
</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h1 class="sd-heading send-sms">
Do you want to send this service to yourself? It's free!
</h1>

<form action="{% url 'organisation-sms' organisation_id %}" method="post">
<form action="{% url 'molo.servicedirectory:organisation-sms' organisation_id %}" method="post">
{% csrf_token %}
<div class="sd-input">
<label for="cell_number">Your cellphone number</label>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Django==1.8.8
Django==1.9.8

0 comments on commit dd166d5

Please sign in to comment.