Пример #1
0
    "http://www2.gov.bc.ca/gov/content?id=D1EE0A405E584363B205CD4353E02C88",
    contact=openapi.Contact(email="*****@*****.**"),
    license=openapi.License(
        name="Open Government License - British Columbia",
        url=
        "https://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61"
    ),
),
                              public=False,
                              permission_classes=(
                                  permissions.RegistriesEditOrReadOnly, ))

urlpatterns = [

    # Organization note endpoints
    url(api_path_prefix() + r'/organizations/(?P<org_guid>[-\w]+)/notes$',
        views.OrganizationNoteListView.as_view(),
        name='org-note-list'),
    url(api_path_prefix() +
        r'/organizations/(?P<org_guid>[-\w]+)/notes/(?P<note_guid>[-\w]+)$',
        views.OrganizationNoteDetailView.as_view(),
        name='org-note-detail'),

    # Organization endpoints
    url(api_path_prefix() + r'/organizations/names$',
        never_cache(views.OrganizationNameListView.as_view()),
        name='organization-names'),
    url(api_path_prefix() + r'/organizations/(?P<org_guid>[-\w]+)/history$',
        never_cache(views.OrganizationHistory.as_view()),
        name='organization-history'),
    url(api_path_prefix() + r'/organizations/(?P<org_guid>[-\w]+)$',
Пример #2
0
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""
from django.conf.urls import url
from django.views.decorators.cache import never_cache

from gwells.urls import api_path_prefix
from . import views
from . import views_v2

urlpatterns = [

    # API endpoints
    # Submissions for a well
    url(api_path_prefix() + r'/wells/(?P<well_tag_number>[0-9]+)/edit$',
        never_cache(views.WellStaffEditDetail.as_view()),
        name='well-edit-details'),
    url(api_path_prefix() + r'/wells/(?P<well_id>[0-9]+)/history$',
        never_cache(views.WellHistory.as_view()),
        name='well-history'),

    # Submissions for a well
    url(api_path_prefix() + r'/wells/(?P<well_id>[0-9]+)/submissions$',
        never_cache(views.WellSubmissionsListAPIView.as_view()),
        name='submissions-by-well'),

    # Well's vertical aquifer extents
    url(r'api/v2/wells/(?P<well_tag_number>[0-9]+)/vertical-aquifer-extents$',
        never_cache(views_v2.WellAquiferListV2APIView.as_view()),
        name='well-aquifers'),
Пример #3
0
        name='aquifer-name-list-v2'),
    url(r'api/v1/aquifers/(?P<aquifer_id>[0-9]+)/edit$',
        never_cache(views.AquiferEditDetailsAPIViewV1.as_view()),
        name='aquifer-edit-details-v1'),
    url(r'api/v2/aquifers/(?P<aquifer_id>[0-9]+)/edit$',
        never_cache(views_v2.AquiferEditDetailsAPIViewV2.as_view()),
        name='aquifer-edit-details-v2'),
    url(r'api/v1/aquifers/(?P<aquifer_id>[0-9]+)$',
        never_cache(views.AquiferRetrieveUpdateAPIView.as_view()),
        name='aquifer-retrieve-update-v1'),
    url(r'api/v2/aquifers/(?P<aquifer_id>[0-9]+)$',
        never_cache(views_v2.AquiferRetrieveUpdateAPIViewV2.as_view()),
        name='aquifer-retrieve-update-v2'),

    # Documents (aquifer records)
    url(api_path_prefix() + r'/aquifers/(?P<aquifer_id>[0-9]+)/files$',
        never_cache(views.ListFiles.as_view()),
        name='aquifer-file-list'),

    # Change history for an aquifer
    url(api_path_prefix() + r'/aquifers/(?P<aquifer_id>[0-9]+)/history$',
        never_cache(views.AquiferHistory.as_view()),
        name='aquifer-history'),

    # Document Uploading (aquifer records)
    url(api_path_prefix() +
        r'/aquifers/(?P<aquifer_id>[0-9]+)/presigned_put_url$',
        never_cache(views.PreSignedDocumentKey.as_view()),
        name='aquifer-pre-signed-url'),

    # Document Deleting (aquifer records)
Пример #4
0
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from django.conf.urls import url
from django.views.decorators.cache import never_cache, cache_page

from aquifers import views
from gwells.urls import api_path_prefix

CACHE_TTL = 60*15

urlpatterns = [
    url(api_path_prefix() + r'/aquifers$',
        never_cache(views.AquiferListCreateAPIView.as_view()),
        name='aquifers-list-create'
        ),

    url(api_path_prefix() + r'/aquifers/csv$',
        never_cache(views.csv_export),
        name='aquifers-list-csv'
        ),

    url(api_path_prefix() + r'/aquifers/xlsx$',
        never_cache(views.xlsx_export),
        name='aquifers-list-xlsx'
        ),

    url(api_path_prefix() + r'/aquifers/names$',
Пример #5
0
from submissions.views import (
    SubmissionsOptions,
    SubmissionListAPIView,
    SubmissionConstructionAPIView,
    SubmissionAlterationAPIView,
    SubmissionDecommissionAPIView,
    SubmissionGetAPIView,
    SubmissionStaffEditAPIView,
    PreSignedDocumentKey,
)
from gwells.urls import api_path_prefix

urlpatterns = [

    # Submissions form options
    url(api_path_prefix() + r'/submissions/options$',
        never_cache(SubmissionsOptions.as_view()),
        name='submissions-options'),

    # Submissions list
    url(api_path_prefix() + r'/submissions$',
        never_cache(SubmissionListAPIView.as_view()),
        name='submissions-list'),
    # Submission
    url(api_path_prefix() + r'/submissions/(?P<filing_number>[0-9]+)$',
        never_cache(SubmissionGetAPIView.as_view()),
        name='submissions-get'),
    # Construction submission
    url(api_path_prefix() + r'/submissions/construction$',
        never_cache(SubmissionConstructionAPIView.as_view()),
        name='CON'),