Ejemplo n.º 1
0
    def createRender(self, render):
        parsed = informer.parseSetup(render.setup)
        project = parsed['project']
        shot = parsed['shot']
        url = informer.getProjectShotRendersUrl(project, shot, 'xml')

        data = {}
        data['job'] = render.job
        data['rate'] = render.rate
        data['created_by'] = render.user
        data['setup'] = render.setup
        data['host'] = render.hostname

        LOG.warn(''.join(['-'*20, 'Event', '-'*20]))
        for (key, val) in data.items():
            LOG.warn("%s: %s" % (key, val))
        LOG.warn(''.join(['-'*20, '---------', '-'*20]))

        result = self.POST(url, data)
Ejemplo n.º 2
0
conf = instinctual.getConf()
root = informer.getServerRoot()

pat_project = "(?P<project_name>[^/]+)"
pat_shot    = "(?P<shot_name>[^/]+)"

url_api = informer.getApiFragment()

url_projects              = rel(informer.getProjectsUrl(format='html'))
url_project_print         = rel(informer.getProjectPrintUrl(pat_project, format='html'))
url_project_shots         = rel(informer.getProjectShotsUrl(pat_project, format='html'))
url_project_shots_alt     = url_projects + pat_project + '/'
url_project_shot          = rel(informer.getProjectShotUrl(pat_project, pat_shot, format='html'))
url_project_shot_notes    = rel(informer.getProjectShotNotesUrl(pat_project, pat_shot, format='html'))
url_project_shot_elements = rel(informer.getProjectShotElementsUrl(pat_project, pat_shot, format='html'))
url_project_shot_renders  = rel(informer.getProjectShotRendersUrl(pat_project, pat_shot, format='html'))

# --------------------
# base patterns:
#
urlpatterns = patterns('',
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^' + url_api + '/', include('instinctual.informer.urls')),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': media_path}),
    (r'^accounts/login/$', 'django.contrib.auth.views.login'),
    (r'^accounts/logout/$', 'django.contrib.auth.views.logout'),

    (r'^/?$',                                'instinctual.informer.views.project_list'),
    (r'^' + url_projects + '$',              'instinctual.informer.views.project_list'),
    (r'^' + url_project_print + '$',         'instinctual.informer.views.project_print'),
    (r'^' + url_project_shots + '$',         'instinctual.informer.views.project_detail'),
Ejemplo n.º 3
0
 def get_json_renders_url(self):
     project = self.project.name
     return informer.getProjectShotRendersUrl(project, self.name, format='json')
Ejemplo n.º 4
0
 def get_absolute_renders_url(self):
     project = self.project.name
     return informer.getProjectShotRendersUrl(project, self.name, format='html')
Ejemplo n.º 5
0
pat_project = '[^/]+'
pat_shot    = '[^/]+'
pat_note    = '(\d+)'
pat_element = '(\d+)'

xml_url_shots           = rel(informer.getShotsUrl(format='xml'))
xml_url_projects        = rel(informer.getProjectsUrl(format='xml'))
xml_url_project_shots   = rel(informer.getProjectShotsUrl(pat_project, format='xml'))
xml_url_note            = rel(informer.getProjectShotNoteUrl(pat_project, pat_shot, pat_note, format='xml'))
xml_url_notes           = rel(informer.getProjectShotNotesUrl(pat_project, pat_shot, format='xml'))
xml_url_element         = rel(informer.getProjectShotElementUrl(pat_project, pat_shot, pat_element, format='xml'))
xml_url_elements        = rel(informer.getProjectShotElementsUrl(pat_project, pat_shot, format='xml'))
xml_url_users           = rel(informer.getUsersUrl(format='xml'))
xml_url_events          = rel(informer.getProjectShotEventsUrl(pat_project, pat_shot, format='xml'))
xml_url_frames          = rel(informer.getFramesUrl(format='xml'))
xml_url_renders         = rel(informer.getProjectShotRendersUrl(pat_project, pat_shot, format='xml'))
xml_url_logs            = rel(informer.getProjectShotLogsUrl(pat_project, pat_shot, format='xml'))

json_url_shots           = rel(informer.getShotsUrl(format='json'))
json_url_projects        = rel(informer.getProjectsUrl(format='json'))
json_url_project_shots   = rel(informer.getProjectShotsUrl(pat_project, format='json'))
json_url_note            = rel(informer.getProjectShotNoteUrl(pat_project, pat_shot, pat_note, format='json'))
json_url_notes           = rel(informer.getProjectShotNotesUrl(pat_project, pat_shot, format='json'))
json_url_element         = rel(informer.getProjectShotElementUrl(pat_project, pat_shot, pat_element, format='json'))
json_url_elements        = rel(informer.getProjectShotElementsUrl(pat_project, pat_shot, format='json'))
json_url_users           = rel(informer.getUsersUrl(format='json'))
json_url_events          = rel(informer.getProjectShotEventsUrl(pat_project, pat_shot, format='json'))
json_url_frames          = rel(informer.getFramesUrl(format='json'))
json_url_renders         = rel(informer.getProjectShotRendersUrl(pat_project, pat_shot, format='json'))
json_url_logs            = rel(informer.getProjectShotLogsUrl(pat_project, pat_shot, format='json'))