Example #1
0
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView

from core.views import ReportView, AngularView

urlpatterns = patterns(
    '',
    url(r'^$',
        TemplateView.as_view(template_name='website/home.html'),
        name='home'),
    url(r'^learnmore$',
        TemplateView.as_view(template_name='website/learnmore.html'),
        name='learnmore'),
    url(r'^report/$', ReportView.as_view(), name='report'),
    url(r'^accounts/', include('accounts.urls', namespace='accounts')),
    url(r'^app/(?P<website_id>\d)/', AngularView.as_view(),
        name='app'),  # angular app
    url(r'api/', include('core.apiurls', namespace='api')),
)
Example #2
0
from django.urls import path
from core.views import HomeView, ReportView

app_name = 'core'

urlpatterns = [
    path('', HomeView.as_view(), name='home'),
    path('report/', ReportView.as_view(), name='report'),
]
Example #3
0
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView

from core.views import ReportView, AngularView


urlpatterns = patterns('',
   url(r'^$', TemplateView.as_view(template_name='website/home.html'), name='home'),
   url(r'^learnmore$', TemplateView.as_view(template_name='website/learnmore.html'), name='learnmore'),
   url(r'^report/$', ReportView.as_view(), name='report'),
   url(r'^accounts/', include('accounts.urls', namespace='accounts')),
   url(r'^app/(?P<website_id>\d)/', AngularView.as_view(), name='app'),  # angular app

   url(r'api/', include('core.apiurls', namespace='api')),
)
Example #4
0
from django.urls import path

from core.views import UserView, DoctorsView, AppointmentView, ReportView, LoginView

urlpatterns = [
    path('user/', UserView.as_view()),
    path('doctors/', DoctorsView.as_view()),
    path('user/<int:id>/', UserView.as_view()),
    path('login/', LoginView.as_view()),
    path('appointment/', AppointmentView.as_view()),
    path('report/', ReportView.as_view()),
    #path('appointment/<int:patient>/', AppointmentView.as_view()),
]
Example #5
0
    urlpatterns = [
        url(r'^$', cache_page(60 * 5)(HomeView.as_view()), name='home'),
        url(r'^leaflets/', include('leaflets.urls')),
        url(r'^parties/', include('parties.urls')),
        url(r'^person/', include('people.urls')),
        url(r'^constituencies/', include('constituencies.urls')),
        url(r'^analysis/', include('analysis.urls')),
        url(r'^tags/', include('tags.urls')),
        url(r'^categories/', include('categories.urls')),
        url(r'^api/', include('api.urls')),

        # Feeds
        url(r'^feeds/latest/$', feeds.LatestLeafletsFeed(), name='latest_feed'),
        url(r'^feeds/constituency/(?P<cons_slug>[\w_\-\.]+)/$', feeds.ConstituencyFeed(), name='constituency_feed'),
        url(r'^feeds/category/(?P<cat_slug>[\w_\-\.]+)/$', feeds.CategoryFeed(), name='category_feed'),
        url(r'^feeds/tag/(?P<tag_slug>[\w_\-\.]+)/$', feeds.TagFeed(), name='tag_feed'),

        # Individual urls
        url(r'^about/$', TemplateView.as_view(template_name='core/about.html'), name='about'),
        url(r'^donate/$', TemplateView.as_view(template_name='core/donate.html'), name='donate'),
        url(r'^press/$', TemplateView.as_view(template_name='core/press.html'), name='press'),
        url(r'^report/(?P<pk>\d+)/sent/$', ReportThanksView.as_view(), name='report_abuse_sent'),
        url(r'^report/(?P<pk>\d+)/$', ReportView.as_view(), name='report_abuse'),

        # Administration URLS
        url(r'^admin/', include(admin.site.urls)),
        url(r'^accounts/', include('allauth.urls')),
    ]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #6
0
            name='about'),
        url(r'^donate/$',
            TemplateView.as_view(template_name='core/donate.html'),
            name='donate'),
        url(r'^press/$',
            TemplateView.as_view(template_name='core/press.html'),
            name='press'),
        url(r'^press/signup/thanks/done$',
            TemplateView.as_view(
                template_name='core/press_signup_thanks_done.html'),
            name='press_signup_thanks_done'),
        url(r'^press/signup/thanks$',
            TemplateView.as_view(
                template_name='core/press_signup_thanks.html'),
            name='press_signup_thanks'),
        url(r'^report/(?P<pk>\d+)/sent/$',
            ReportThanksView.as_view(),
            name='report_abuse_sent'),
        url(r'^report/(?P<pk>\d+)/$',
            ReportView.as_view(),
            name='report_abuse'),

        # Administration URLS
        url(r'^admin/', include(admin.site.urls)),
        url(r'^accounts/', include('allauth.urls')),
    ]

urlpatterns += static(
    settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(
        settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #7
0
                IndigenousVillageKMLView,
                base_name='villages-kml')
router.register(r'arch_kml', ArchaeologicalPlaceKMLView, base_name='arch-kml')
router.register(r'arch_geojson', ArchaeologicalPlaceGeojsonView)
router.register(r'archaeological', ArchaeologicalPlaceViewSet)
router.register(r'landtenurereport', LandTenureReportViewSet)
router.register(r'projects', ProjectsViewSet)

urlpatterns = [
    url(r'^$', TemplateView.as_view(template_name='index.html'), name='home'),
    url(r'^embed/$',
        EmbeddableTemplateView.as_view(template_name='embed.html'),
        name='embed'),
    # Services
    url(r'^api/', include(router.urls)),
    url(r'^api/lands_report', ReportView.as_view(), name='report_view'),
    url(r'^api/pages', include('pages.urls', namespace='pages')),
    url(r'^export/villages.xlsx$',
        IndigenousVillageExportView.as_view(),
        name='export_xls_villages'),
    url(r'^export/lands.xlsx$',
        IndigenousLandExportView.as_view(),
        name='export_xls_lands'),
    url(r'^export/archaeological.xlsx$',
        ArchaeologicalPlaceExportView.as_view(),
        name='export_xls_archaeological'),
    url(r'^shapefiles/villages/$',
        IndigenousVillagesShapefileView.as_view(),
        name='villages_shapefiles'),
    url(r'^shapefiles/lands/$',
        IndigenousLandsShapefileView.as_view(),