示例#1
0
 def ready(self):
     """Registers requests and communications with the activity streams plugin"""
     # pylint: disable=invalid-name
     from actstream import registry as action
     from autocomplete_light import shortcuts as autocomplete_light
     from watson import search
     import django.utils.html
     import re
     import muckrock.foia.signals  # pylint: disable=unused-import,unused-variable
     FOIARequest = self.get_model('FOIARequest')
     FOIACommunication = self.get_model('FOIACommunication')
     FOIANote = self.get_model('FOIANote')
     action.register(FOIARequest)
     action.register(FOIACommunication)
     action.register(FOIANote)
     search.register(FOIARequest.objects.get_public())
     autocomplete_light.autodiscover()
     # monkey patch the word_split regex so urlize works better
     django.utils.html.word_split_re = re.compile(r'([\s<>\(\)\[\]"\']+)')
示例#2
0
"""testproject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    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 autocomplete_light import shortcuts as autocomplete_light
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView

autocomplete_light.autodiscover()

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', TemplateView.as_view(template_name='main.html')),
    url(r'^gallery/', include('imagestore.urls', namespace='imagestore')),
    url(r'^autocomplete/', include('autocomplete_light.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
示例#3
0
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
import autocomplete_light.shortcuts as al
import home.views
import phenotypedb.rest as rest
import phenotypedb.views
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.urlpatterns import format_suffix_patterns
from rest_framework_swagger.views import get_swagger_view
from django.views.decorators.csrf import csrf_exempt
from utils.statistics import SUPPORTED_TRANSFORMATIONS
admin.autodiscover()
al.autodiscover()
schema_view = get_swagger_view(title=settings.APP_NAME + ' API')

ACCESSION_ID_REGEX = r"PI [0-9]{6}"
ID_REGEX = r"[0-9]+"
REGEX_STUDY = ID_REGEX + "|" + rest.DOI_REGEX_STUDY
REGEX_PHENOTYPE = ID_REGEX + "|" + rest.DOI_REGEX_PHENOTYPE
REGEX_TRANSFORMATIONS = r"(%s)" % "|".join(SUPPORTED_TRANSFORMATIONS)
UUID_REGEX = r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ONTOLOGY_REGEX = r"(EO|TO|UO){1}:[0-9]*"
ONTOLOGY_SOURCE_REGEX = "(PECO|PTO|UO)"

urlpatterns = [
    url(r'^autocomplete/', include('autocomplete_light.urls')),
    url(r'^$', home.views.home, name="home"),
    url(r'^rnaseq/$', home.views.home_rnaseq, name="home"),
示例#4
0
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
import settings
from django.conf.urls import include, url
from django.contrib import admin

from rest_framework import routers

import fablabadmin.nfc.views as nfc
from fablabadmin.base import urls
from django.contrib.auth.views import password_change

import autocomplete_light.shortcuts as al
from fablabadmin.base.autocomplete_light_registry import *
al.autodiscover()
admin.autodiscover()

router = routers.DefaultRouter(trailing_slash=False)


#router.register(r'games', views.GameViewSet)
#router.register(r'departments', views.DepartmentViewSet)
#router.register(r'languages', views.LanguageViewSet)
#router.register(r'questions', views.QuestionViewSet)

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/accounting', include('fablabadmin.accounting.urls')),
    url(r'^admin_tools/', include('admin_tools.urls')),
    url(r'^autocomplete/', include('autocomplete_light.urls')),