src/cm/views/site.py
changeset 161 5f30378c79a4
parent 160 0c01050f9717
child 164 cc217bd00476
equal deleted inserted replaced
160:0c01050f9717 161:5f30378c79a4
   191                 Configuration.objects.set_key(field, val)
   191                 Configuration.objects.set_key(field, val)
   192         #handle_uploaded_file()
   192         #handle_uploaded_file()
   193     def save_file(self, logo_file):
   193     def save_file(self, logo_file):
   194         attach = Attachment.objects.create_attachment(filename='wp_logo', data=logo_file.read(), text_version=None)
   194         attach = Attachment.objects.create_attachment(filename='wp_logo', data=logo_file.read(), text_version=None)
   195         Configuration.objects.set_key('workspace_logo_file_key', attach.key)
   195         Configuration.objects.set_key('workspace_logo_file_key', attach.key)
   196         print attach.key
       
   197         
   196         
   198 @has_global_perm('can_manage_workspace')
   197 @has_global_perm('can_manage_workspace')
   199 def settingss(request):
   198 def settingss(request):
   200     if request.method == 'POST':
   199     if request.method == 'POST':
   201         if 'delete_logo' in request.POST:
   200         if 'delete_logo' in request.POST: