예제 #1
0
    def __init__(self):
        """ Initializes the extension """
        super(DockerExtension, self).__init__()
        self.docker_client = docker.from_env()
        self.subscribe(KeywordQueryEvent, KeywordQueryEventListener())
        self.subscribe(ItemEnterEvent, ItemEnterEventListener())

        parser = ArgumentParser()
        parser.add_argument('-c', '--c', action='store', dest='container_id')
        parser.add_argument('-a',
                            '--a',
                            action='store_true',
                            default=False,
                            dest='all_containers')
        parser.add_argument('-i',
                            '--i',
                            action='store_true',
                            default=False,
                            dest='info')

        self.arg_parser = parser

        self.list_containers_view = ListContainersView(self)
        self.container_details_view = ContainerDetailsView(self)
        self.info_view = InfoView(self)
        self.utils_view = UtilsView(self)

        Notify.init("DockerExtension")
예제 #2
0
  (r'^admin/', include(admin.site.urls)),

  (r'^js/(?P<path>.*)$', 'django.views.static.serve',
    { 'document_root': '%s/templates/static/js' % settings.BASE_DIR}),
  (r'^css/(?P<path>.*)$', 'django.views.static.serve',
    { 'document_root': '%s/templates/static/css' % settings.BASE_DIR}),
  (r'^images/(?P<path>.*)$', 'django.views.static.serve',
    { 'document_root': '%s/templates/static/images' % settings.BASE_DIR}),
  (r'^fonts/(?P<path>.*)$', 'django.views.static.serve',
    { 'document_root': '%s/templates/static/fonts' % settings.BASE_DIR}),

  # home page
  (r'^$', HomeView.as_view()),  
  
  # info page
  (r'^info.html$', InfoView.as_view()),  

  (r'^persone/(?P<slug>[-\w]+).html$', DetailView.as_view(
    model=Person,
    context_object_name='person',
    template_name='person.html')),

  (r'^istituzioni.html$', ListView.as_view(
    model=Institution,
    template_name='institutions_list.html'
  )),
  (r'^istituzioni/(?P<slug>[-\w]+).html$', InstitutionDetailView.as_view(
    template_name='institution.html')),
    
  (r'^uffici.html$', ListView.as_view(
    model=Office,
예제 #3
0
파일: urls.py 프로젝트: fengmo/blog
urlpatterns = [
	url(r'^$', 
		IndexView.as_view(), 
		name='article_index'
	),
	url(r'^article/(?P<pk>\S+)/$', 
		ADetailView.as_view(), 
		name='article_detail'
	),
	url(r'^archive/$', 
		ArchiveView.as_view(), 
		name='archive_list'
	),
	url(r'^info/$', 
		InfoView.as_view(),
		name='info'
	),
	url(r'^blog_login/$', 
		blog_login, 
		name='blog_login'
	),
	url(r'^blog_logout/$', 
		login_required(blog_logout, login_url='/'), 
		name='blog_logout'
	),
	url(r'^publish/$', 
		login_required(APublishView.as_view(), 
			login_url='/blog_login/'
		),
		name='article_publish'
예제 #4
0
#coding: utf-8
__author__ = 'ridhid'

from django.conf.urls import patterns, url
from views import ConfigView
from views import ServerControl
from views import InfoView

urlpatterns = patterns('',
    url(r'^config', ConfigView.as_view(), name="config"),
    url(r'^info', InfoView.as_view(), name="info"),
    url(r'^control', ServerControl.as_view(), name="control"),
)