import instinctual from instinctual import informer from instinctual.settings import media_path from instinctual.informer.models import Project from instinctual.informer import relativeUrl as rel 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}),
expose_fields = Log.Rest.expose_fields, authentication = InformerAuthentication(), ) # -------------------- # 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'))