Skip to content

Commit

Permalink
Ne permet pas la suppression des orgas
Browse files Browse the repository at this point in the history
  • Loading branch information
OdyX committed Aug 29, 2017
1 parent a687663 commit daf5c9e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion apps/orga/templates/orga/organization_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,5 @@ <h4>{{ organization.name }}</h4>
{% buttons %}
<a class="btn btn-primary pull-right" href="{% url 'organization-update' pk=organization.pk %}">{% trans "Éditer" %}</a>
<a class="btn btn-default" href="{% url 'organization-list' %}">{% trans "Retour à la liste des établissements" %}</a>
<a class="btn btn-danger" href="{% url 'organization-delete' pk=organization.pk %}">{% trans "Supprimer" %}</a>
{% endbuttons %}
{% endblock %}
6 changes: 2 additions & 4 deletions apps/orga/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from django.views.decorators.cache import never_cache

from .views import (
OrganizationAutocomplete, OrganizationCreateView, OrganizationDeleteView, OrganizationDetailView,
OrganizationListExport, OrganizationsListView, OrganizationUpdateView,
OrganizationAutocomplete, OrganizationCreateView, OrganizationDetailView, OrganizationListExport,
OrganizationsListView, OrganizationUpdateView,
)

urlpatterns = [
Expand All @@ -37,8 +37,6 @@
name="organization-detail"),
url(r'^(?P<pk>[0-9]+)/update/$', OrganizationUpdateView.as_view(),
name="organization-update"),
url(r'^(?P<pk>[0-9]+)/delete/$', OrganizationDeleteView.as_view(),
name="organization-delete"),
url(r'^autocomplete/$', OrganizationAutocomplete.as_view(),
name='organization-autocomplete'),
]
4 changes: 0 additions & 4 deletions apps/orga/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ class OrganizationCreateView(OrganizationMixin,
success_message = _("Établissement créé")


class OrganizationDeleteView(OrganizationMixin, DeleteView):
success_url = reverse_lazy('organization-list')


class OrganizationListExport(ExportMixin, OrganizationsListView):
export_class = OrganizationResource()
export_filename = _('Établissements')
Expand Down

0 comments on commit daf5c9e

Please sign in to comment.