~oubiwann/adytum-collection/Projects

« back to all changes in this revision

Viewing changes to MacGregorSite/cms/views/main.py

  • Committer: oubiwann
  • Date: 2009-03-20 04:32:44 UTC
  • Revision ID: svn-v4:a5ecbb21-ded8-0310-8b19-a7ee6de54fb5:Projects:880
* Moved admin security code into a security module.
* Moved response and page not found into new view publisher module.
* Moved edit_instance and edit_updated_page into admin module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import mimetypes
23
23
 
24
24
import configuration
 
25
 
25
26
from django import http
26
27
from django.core import urlresolvers
27
28
from django.utils import simplejson
 
29
 
 
30
from google.appengine.api import users
 
31
 
28
32
import models
29
33
import utility
 
34
from views import publisher
30
35
 
31
36
 
32
37
def send_page(page, request):
61
66
 
62
67
  base_html = '../templates/themes/%s/base.html' % (configuration.SYSTEM_THEME_NAME)
63
68
  page_html = '../templates/themes/%s/page.html' % (configuration.SYSTEM_THEME_NAME)
64
 
  return utility.respond(request, page_html, {'page': page, 'files': files,
 
69
  return publisher.respond(request, page_html, {'page': page, 'files': files,
65
70
                                              'is_editor': is_editor, 
66
71
                                              'base_html': base_html})
67
72
 
134
139
  if isinstance(item, models.FileStore):
135
140
    return send_file(item, request)
136
141
 
137
 
  return utility.page_not_found(request)
 
142
  return publisher.page_not_found(request)
138
143
 
139
144
 
140
145
def get_tree_data(request):
175
180
 
176
181
def page_list(request):
177
182
  """List all pages."""
178
 
  return utility.respond(request, 'sitemap')
 
183
  return publisher.respond(request, 'sitemap')