Beispiel #1
0
from django.core.urlresolvers import reverse_lazy
from mailinglists.views import *
from hitcount.views import update_hit_count_ajax

from sitemap.sitemap import (
    RhizomeSitemap, ArtWorkSitemap, BlogSitemap, DiscussSitemap, 
    EventSitemap, ExhibitionSitemap, JobSitemap, OpportunitySitemap, 
    ProfilesSitemap, RhizEventSitemap, RhizExhibitionsSitemap
)

from tastypie.api import Api
from api import (
    BlockResource, CampaignResource, CreateDonationResource, QuickStatsResource
)

v1_api = Api(api_name='v1')
v1_api.register(BlockResource())
v1_api.register(CreateDonationResource())
v1_api.register(CampaignResource())
v1_api.register(QuickStatsResource())

sitemaps = {
    'about': RhizomeSitemap,
    'artworks': ArtWorkSitemap,
    'blog': BlogSitemap,
    'discuss': DiscussSitemap,
    'events': EventSitemap,
    'exhibitions': ExhibitionSitemap,
    'jobs': JobSitemap,
    'opportunities': OpportunitySitemap,
    'profiles': ProfilesSitemap,
Beispiel #2
0
from django.conf.urls import patterns, include, url
from tastypie.api import Api

from views import *
from api import NachaSettingsResource, UserResource

api_v1 = Api(api_name='v1')
api_v1.register(NachaSettingsResource())
api_v1.register(UserResource())

urlpatterns = patterns('',
    url(r'^$', ThathwebBase.as_view()),
    url(r'^settings/$', NachaSettings.as_view(), name='thathweb.nacha_creator.settings'),

    url(r'^generate/$', NachaCreate.as_view(), name='thathweb.nacha_creator.gen'),
    url(r'^generate/batch/$', NachaCreateBatch.as_view(), name='thathweb.nacha_creator.gen.batch'),
    url(r'^generate/entry/$', NachaCreateRecordEntry.as_view(), name='thathweb.nacha_creator.gen.entry'),

    url(r'^batches/$', NachaBatches.as_view(), name='thathweb.nacha_creator.batches'),
    url(r'^api/', include(api_v1.urls)),
)
Beispiel #3
0
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.views.generic import TemplateView
from django.contrib import admin
from tastypie.api import Api
from organisms.api import OrganismResource
from genes.api import GeneResource
from analyze.api import SearchResource, ExperimentResource,\
    AnnotationTypeResource, SampleResource, NodeResource, ActivityResource,\
    EdgeResource, ParticipationResource

v0_api = Api(api_name='v0')
v0_api.register(SearchResource())
v0_api.register(ExperimentResource())
v0_api.register(AnnotationTypeResource())
v0_api.register(SampleResource())
v0_api.register(OrganismResource())
v0_api.register(GeneResource())
v0_api.register(NodeResource())
v0_api.register(ActivityResource())
v0_api.register(EdgeResource())
v0_api.register(ParticipationResource())

urlpatterns = [
    url(r'^$', TemplateView.as_view(template_name="index.html"), name='home'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include(v0_api.urls)),
Beispiel #4
0
from cbh_chem_api.compounds import *

from cbh_core_api.resources import *
from cbh_core_api.views import *
from django.conf import settings
DEFAULT_API_NAME = 'chemblws'

try:
    api_name = settings.WEBSERVICES_NAME
    print api_name
except AttributeError:
    api_name = DEFAULT_API_NAME

from cbh_core_api.resources import ProjectTypeResource

api = Api(api_name=api_name)
api.register(ProjectTypeResource())
api.register(CBHCompoundUploadResource())
api.register(CBHCompoundBatchResource())
api.register(UserResource())
api.register(ChemRegDataPointProjectFieldResource())
api.register(ChemRegCustomFieldConfigResource())
api.register(ChemregProjectResource())
api.register(SkinningResource())
api.register(InvitationResource())
api.register(ProjectPermissionResource())
api.register(CBHFlowFileResource())
api.register(CBHFlowFileDownloadResource())
admin.autodiscover()
api.register(CBHSavedSearchResource())
api.register(CBHChemicalSearchResource())
Beispiel #5
0
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
# PURPOSE.  See the Mozilla Public License for more details.

import os

from django.conf import settings
from django.conf.urls import patterns, include, url
from util.helpers import get_install_dir
from tastypie.api import Api
from rest_api import templates_api as rest_api

# Enable admin:
from django.contrib import admin
admin.autodiscover()

api_test = Api(api_name='test')
api_test.register(rest_api.TemplatesResource())
api_test.register(rest_api.TemplatesFieldsResource())
api_test.register(rest_api.PrecompiledTemplateResource())
api_test.register(rest_api.ThumbnailResource())
api_test.register(rest_api.ExampleResource())

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'document_templates.views.home', name='home'),
    # url(r'^document_templates/', include('document_templates.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Beispiel #6
0
from .resources import *
from tastypie.api import Api

v1_api = Api(api_name="v1")
v1_api.register(TagResource())
v1_api.register(ArtistResource())
v1_api.register(AreaResource())
v1_api.register(AlbumResource())
v1_api.register(TrackResource())
v1_api.register(SongResource())
v1_api.register(PlaylistResource())
v1_api.register(SettingsResource())
v1_api.register(ApiKeyResource())
v1_api.register(SongInPlaylistResource())
Beispiel #7
0
#
#########################################################################
from tastypie.api import Api
from dynamic_rest import routers
from drf_spectacular.views import (
    SpectacularAPIView,
    SpectacularRedocView,
    SpectacularSwaggerView
)

from django.urls import path

from . import api as resources
from . import resourcebase_api as resourcebase_resources

api = Api(api_name='api')

api.register(resources.GroupCategoryResource())
api.register(resources.GroupResource())
api.register(resources.GroupProfileResource())
api.register(resources.OwnersResource())
api.register(resources.ProfileResource())
api.register(resources.RegionResource())
api.register(resources.StyleResource())
api.register(resources.TagResource())
api.register(resources.ThesaurusKeywordResource())
api.register(resources.TopicCategoryResource())
api.register(resourcebase_resources.DocumentResource())
api.register(resourcebase_resources.FeaturedResourceBaseResource())
api.register(resourcebase_resources.LayerResource())
api.register(resourcebase_resources.MapResource())
Beispiel #8
0
from survey.api.survey_response_api import SurveyResponseResource

import os
from django.contrib import admin
from dajaxice.core import dajaxice_autodiscover
dajaxice_autodiscover()

try:
    admin.autodiscover()
except admin.sites.AlreadyRegistered:
    # nose imports the admin.py files during tests, so
    # the models have already been registered.
    pass

# tastypie api
tastypie_api = Api(api_name='v1')
tastypie_api.register(UserResource())
tastypie_api.register(VoiceAppResource())
tastypie_api.register(GatewayResource())
tastypie_api.register(ContentTypeResource())
tastypie_api.register(PhonebookResource())
tastypie_api.register(CampaignResource())
tastypie_api.register(BulkContactResource())
tastypie_api.register(CampaignDeleteCascadeResource())
tastypie_api.register(CampaignSubscriberResource())
tastypie_api.register(CampaignSubscriberPerCampaignResource())
tastypie_api.register(CallrequestResource())
tastypie_api.register(AnswercallResource())
tastypie_api.register(DialCallbackResource())
tastypie_api.register(HangupcallResource())
tastypie_api.register(CdrResource())
Beispiel #9
0
# -*- coding: utf-8 -*-
# [email protected]
# 2014-12-01
# Copyright 2014 Yottabyte
# file description:

from django.conf.urls import patterns, url, include
from yottaweb.apps.subscription import views
from tastypie.api import Api
from yottaweb.apps.subscription.resources import SubscriptionResource

version_api = Api(api_name='v0')
version_api.register(SubscriptionResource())

urlpatterns = patterns('',
                       url(r'^subscription/new$', views.new, name='new'),
                       url(r'^subscription$', views.create, name='create'),
                       (r'^api/', include(version_api.urls)),
                       )
Beispiel #10
0
def shotgun_rest_api_factory(entity_types=SHOTGUN_ENTITY_TYPES):
    from tastypie.api import Api
    sg_api = Api(api_name='v3')
    for entity_type in entity_types:
        sg_api.register(shotgun_entity_resource_factory(entity_type)())
    return sg_api
Beispiel #11
0
from django.conf.urls import include, patterns, url

from rest_framework.routers import SimpleRouter
from tastypie.api import Api

from .resources import simple
from .resources.billing import CreateBillingConfigurationResource
from .resources.login import login
from .resources.notification import EventResource, NotificationResource
from .resources.package import BangoProductResource, PackageResource
from .resources.refund import RefundResource
from .resources.sbi import SBIResource
from .resources.status import DebugViewSet, StatusViewSet

bango = Api(api_name='bango')
for lib in (CreateBillingConfigurationResource, BangoProductResource,
            PackageResource, NotificationResource, EventResource,
            RefundResource, SBIResource, simple.MakePremiumResource,
            simple.UpdateRatingResource, simple.CreateBankDetailsResource):
    bango.register(lib())

# TODO: would be nice to have these a sub objects of the
# bango package instead of being on their own.
bango_drf = SimpleRouter()
bango_drf.register('status', StatusViewSet)
bango_drf.register('debug', DebugViewSet, base_name='debug')

urlpatterns = patterns(
    '',
    url(r'^login/', login, name='bango.login'),
    url(r'^', include(bango_drf.urls)),
class v1:
    api = Api(api_name='v1')
class raw:
    api = Api(api_name='raw')
Beispiel #14
0
            name='account.purchases.receipt'),
    )) + patterns(
        '',
        url('^$', views.purchases, name='account.purchases'),
    )

users_patterns = patterns(
    '',
    # Keeping the same URL pattern since admin pages already know about this.
    url(r'^(?:(?P<user_id>\d+)/)?edit$',
        views.admin_edit,
        name='users.admin_edit'),
    url(r'''^(?P<username>[^/<>"']+)$''', views.profile, name='users.profile'),
    url(r'''^(?P<username>[^/<>"']+)/abuse$''',
        views.abuse,
        name='users.abuse'))

# Account API.
account = Api(api_name='account')
account.register(AccountResource())
account.register(FeedbackResource())
account.register(InstalledResource())
account.register(LoginResource())
account.register(PermissionResource())
account.register(NewsletterResource())

api_patterns = patterns(
    '',
    url('^', include(account.urls)),
)
Beispiel #15
0
from django.conf.urls import patterns, url, include
from django.contrib import admin
admin.autodiscover()
from tastypie.api import Api  # modulo webservices
from api import UserResource  # clase en api.py con informacion sobre url
import views
user_api = Api(api_name='v1')  # v1 es una etiqueta para identificar el recurso
user_api.register(UserResource())  # registrar  api.UserResource

urlpatterns = patterns(
    '',
    url(r'^register/$', views.register, name='register'),
    url(r'^login/$', views.login, name='login'),
    url(r'^api/', include(user_api.urls)
        ),  # agnadir los urls contenidas en api.Userresource.prepend_urls
)
Beispiel #16
0
from django.conf.urls import patterns, include, url
from tastypie.api import Api
from analyzer.api import SampleResource, QueueResource
from django.views.generic import RedirectView
from django.views.generic import TemplateView

# URL's for the admin (backend)
from django.contrib import admin
admin.autodiscover()

# URL's for the API (backend)
bot_api = Api(api_name='bot')
bot_api.register(SampleResource())
bot_api.register(QueueResource())

# URL's and forwarding for the website (frontend)
urlpatterns = patterns('',
    url(r'^favicon\.ico$', RedirectView.as_view(url='/static/favicon.ico'), name='favicon'),
    url(r'^robots\.txt/$', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
    (r'^$', 'analyzer.views.index'),
    (r'^reports/$', 'analyzer.views.reports'),
    (r'^report/$', 'analyzer.views.report'),
    (r'^xml_report_static/$', 'analyzer.views.xml_report_static'),
    (r'^xml_report_dynamic/$', 'analyzer.views.xml_report_dynamic'),
    (r'^search/$', 'analyzer.views.search'),
    (r'^submit/$', 'analyzer.views.submit'),
    (r'^about/$', 'analyzer.views.about'),
    (r'^cert/$', 'analyzer.views.cert'),
    (r'^drebin/$', 'analyzer.views.drebin'),
    (r'^screenshots/$', 'analyzer.views.screenshots'),
    (r'^network/$', 'analyzer.views.network'),