One of these days I'll remember to test BEFORE pushing...

This commit is contained in:
2020-10-08 23:29:11 +01:00
parent 5d56f4f7b0
commit 5af075946a
5 changed files with 11 additions and 9 deletions

View File

@@ -473,7 +473,7 @@ class Event(models.Model, RevisionMixin):
return reverse_lazy('event_detail', kwargs={'pk': self.pk}) return reverse_lazy('event_detail', kwargs={'pk': self.pk})
def __str__(self): def __str__(self):
return self.display_id + ": " + self.name return "{}: {}".format(self.display_id, self.name)
def clean(self): def clean(self):
errdict = {} errdict = {}

View File

@@ -95,6 +95,7 @@ class OrganisationList(GenericListView):
context['union_account'] = True context['union_account'] = True
return context return context
class OrganisationDetail(GenericDetailView): class OrganisationDetail(GenericDetailView):
model = models.Organisation model = models.Organisation
@@ -107,6 +108,7 @@ class OrganisationDetail(GenericDetailView):
context['associated2'] = 'partials/associated_events.html' context['associated2'] = 'partials/associated_events.html'
return context return context
class OrganisationCreate(generic.CreateView): class OrganisationCreate(generic.CreateView):
template_name = 'organisation_form.html' template_name = 'organisation_form.html'
model = models.Organisation model = models.Organisation

View File

@@ -124,7 +124,7 @@ class SupplierList(BasePage):
URL_TEMPLATE = reverse('supplier_list') URL_TEMPLATE = reverse('supplier_list')
_supplier_item_locator = (By.ID, 'row_item') _supplier_item_locator = (By.ID, 'row_item')
_search_text_locator = (By.XPATH, '//*[@id="main"]/div[2]/form/div/input') _search_text_locator = (By.ID, 'id_search_text')
_go_button_locator = (By.ID, 'id_search') _go_button_locator = (By.ID, 'id_search')
class SupplierListRow(Region): class SupplierListRow(Region):

View File

@@ -12,7 +12,7 @@
{% csrf_token %} {% csrf_token %}
<div class="input-group"> <div class="input-group">
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}" <input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
class="form-control"/> class="form-control" id="id_search_text"/>
<span class="input-group-append">{% button 'search' id="id_search" %}</span> <span class="input-group-append">{% button 'search' id="id_search" %}</span>
</div> </div>
</form> </form>

View File

@@ -145,6 +145,6 @@
</div> </div>
<h4>Events</h4> <h4>Events</h4>
{% with object.latest_events as events %} {% with object.latest_events as events %}
{% include 'event_table.html' %} {% include 'partials/event_table.html' %}
{% endwith %} {% endwith %}
{% endblock %} {% endblock %}