Python Format/import opt

This commit is contained in:
2020-04-12 19:28:17 +01:00
parent f308a095f3
commit 5e60675115
22 changed files with 257 additions and 111 deletions

View File

@@ -21,7 +21,8 @@ urlpatterns = [
name='person_create'),
path('people/<int:pk>/', permission_required_with_403('RIGS.view_person')(views.PersonDetail.as_view()),
name='person_detail'),
path('people/<int:pk>/history/', permission_required_with_403('RIGS.view_person')(versioning.VersionHistory.as_view()),
path('people/<int:pk>/history/',
permission_required_with_403('RIGS.view_person')(versioning.VersionHistory.as_view()),
name='person_history', kwargs={'model': models.Person}),
path('people/<int:pk>/edit/', permission_required_with_403('RIGS.change_person')(views.PersonUpdate.as_view()),
name='person_update'),
@@ -29,13 +30,17 @@ urlpatterns = [
# Organisations
path('organisations/', permission_required_with_403('RIGS.view_organisation')(views.OrganisationList.as_view()),
name='organisation_list'),
path('organisations/add/', permission_required_with_403('RIGS.add_organisation')(views.OrganisationCreate.as_view()),
path('organisations/add/',
permission_required_with_403('RIGS.add_organisation')(views.OrganisationCreate.as_view()),
name='organisation_create'),
path('organisations/<int:pk>/', permission_required_with_403('RIGS.view_organisation')(views.OrganisationDetail.as_view()),
path('organisations/<int:pk>/',
permission_required_with_403('RIGS.view_organisation')(views.OrganisationDetail.as_view()),
name='organisation_detail'),
path('organisations/<int:pk>/history/', permission_required_with_403('RIGS.view_organisation')(versioning.VersionHistory.as_view()),
path('organisations/<int:pk>/history/',
permission_required_with_403('RIGS.view_organisation')(versioning.VersionHistory.as_view()),
name='organisation_history', kwargs={'model': models.Organisation}),
path('organisations/<int:pk>/edit/', permission_required_with_403('RIGS.change_organisation')(views.OrganisationUpdate.as_view()),
path('organisations/<int:pk>/edit/',
permission_required_with_403('RIGS.change_organisation')(views.OrganisationUpdate.as_view()),
name='organisation_update'),
# Venues
@@ -45,7 +50,8 @@ urlpatterns = [
name='venue_create'),
path('venues/<int:pk>/', permission_required_with_403('RIGS.view_venue')(views.VenueDetail.as_view()),
name='venue_detail'),
path('venues/<int:pk>/history/', permission_required_with_403('RIGS.view_venue')(versioning.VersionHistory.as_view()),
path('venues/<int:pk>/history/',
permission_required_with_403('RIGS.view_venue')(versioning.VersionHistory.as_view()),
name='venue_history', kwargs={'model': models.Venue}),
path('venues/<int:pk>/edit/', permission_required_with_403('RIGS.change_venue')(views.VenueUpdate.as_view()),
name='venue_update'),
@@ -71,7 +77,8 @@ urlpatterns = [
name='event_create'),
path('event/archive/', login_required()(rigboard.EventArchive.as_view()),
name='event_archive'),
path('event/<int:pk>/embed/', xframe_options_exempt(login_required(login_url='/user/login/embed/')(rigboard.EventEmbed.as_view())),
path('event/<int:pk>/embed/',
xframe_options_exempt(login_required(login_url='/user/login/embed/')(rigboard.EventEmbed.as_view())),
name='event_embed'),
path('event/<int:pk>/oembed_json/', rigboard.EventOembed.as_view(),
name='event_oembed'),
@@ -83,7 +90,8 @@ urlpatterns = [
name='event_update'),
path('event/<int:pk>/duplicate/', permission_required_with_403('RIGS.add_event')(rigboard.EventDuplicate.as_view()),
name='event_duplicate'),
path('event/<int:pk>/history/', permission_required_with_403('RIGS.view_event')(versioning.VersionHistory.as_view()),
path('event/<int:pk>/history/',
permission_required_with_403('RIGS.view_event')(versioning.VersionHistory.as_view()),
name='event_history', kwargs={'model': models.Event}),
# Finance
@@ -103,9 +111,11 @@ urlpatterns = [
name='invoice_print'),
path('invoice/<int:pk>/void/', permission_required_with_403('RIGS.change_invoice')(finance.InvoiceVoid.as_view()),
name='invoice_void'),
path('invoice/<int:pk>/delete/', permission_required_with_403('RIGS.change_invoice')(finance.InvoiceDelete.as_view()),
path('invoice/<int:pk>/delete/',
permission_required_with_403('RIGS.change_invoice')(finance.InvoiceDelete.as_view()),
name='invoice_delete'),
path('invoice/(<int:pk>/history/', permission_required_with_403('RIGS.view_invoice')(versioning.VersionHistory.as_view()),
path('invoice/(<int:pk>/history/',
permission_required_with_403('RIGS.view_invoice')(versioning.VersionHistory.as_view()),
name='invoice_history', kwargs={'model': models.Invoice}),
path('payment/create/', permission_required_with_403('RIGS.add_payment')(finance.PaymentCreate.as_view()),
@@ -114,9 +124,11 @@ urlpatterns = [
name='payment_delete'),
# Client event authorisation
path('event/<pk>/auth/', permission_required_with_403('RIGS.change_event')(rigboard.EventAuthorisationRequest.as_view()),
path('event/<pk>/auth/',
permission_required_with_403('RIGS.change_event')(rigboard.EventAuthorisationRequest.as_view()),
name='event_authorise_request'),
path('event/<int:pk>/auth/preview/', permission_required_with_403('RIGS.change_event')(rigboard.EventAuthoriseRequestEmailPreview.as_view()),
path('event/<int:pk>/auth/preview/',
permission_required_with_403('RIGS.change_event')(rigboard.EventAuthoriseRequestEmailPreview.as_view()),
name='event_authorise_preview'),
url(r'^event/(?P<pk>\d+)/(?P<hmac>[-:\w]+)/$', rigboard.EventAuthorise.as_view(),
name='event_authorise'),