def getElements(self, setup): parsed = informer.parseSetup(setup) project = parsed['project'] shot = parsed['shot'] url = informer.getProjectShotElementsUrl(project, shot, 'xml') data = self.GET(url) deserializer = Deserializer(data) elements = self._getObjects(deserializer) return elements
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'),
def get_json_elements_url(self): project = self.project.name return informer.getProjectShotElementsUrl(project, self.name, format='json')
def get_absolute_elements_url(self): project = self.project.name return informer.getProjectShotElementsUrl(project, self.name, format='html')
# informer urls: # conf = instinctual.getConf() 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'))