Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 54 lines (46 sloc) 1.719 kb
ff20af9 @alobbs Adds the new admin
alobbs authored
1 # -*- coding: utf-8 -*-
2 #
3 # Cherokee-admin
4 #
5 # Authors:
6 # Alvaro Lopez Ortega <alvaro@alobbs.com>
7 #
8 # Copyright (C) 2010 Alvaro Lopez Ortega
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of version 2 of the GNU General Public
12 # License as published by the Free Software Foundation.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 # 02110-1301, USA.
23 #
24
25 import CTK
26 import Cherokee
27 import validations
28 import CgiBase
29 import Balancer
ceaf427 @alobbs Clean up: The constants file was definitely not the right place for a
alobbs authored
30
31 from util import *
ff20af9 @alobbs Adds the new admin
alobbs authored
32 from consts import *
33
34 HELPS = CgiBase.HELPS + [('modules_handlers_uwsgi', "UWSGI")]
35
36 class Plugin_uwsgi (CgiBase.PluginHandlerCGI):
37 def __init__ (self, key, **kwargs):
38 kwargs['show_script_alias'] = False
39 kwargs['show_change_uid'] = False
40 kwargs['show_document_root'] = True
41
42 # CGI Generic
43 CgiBase.PluginHandlerCGI.__init__ (self, key, **kwargs)
44 CgiBase.PluginHandlerCGI.AddCommon (self)
45
46 # Balancer
ceaf427 @alobbs Clean up: The constants file was definitely not the right place for a
alobbs authored
47 modul = CTK.PluginSelector('%s!balancer'%(key), trans_options(Cherokee.support.filter_available (BALANCERS)))
ff20af9 @alobbs Adds the new admin
alobbs authored
48 table = CTK.PropsTable()
49 table.Add (_("Balancer"), modul.selector_widget, _(Balancer.NOTE_BALANCER))
50
51 self += CTK.RawHTML ('<h2>%s</h2>' %(_('UWSGI Specific')))
52 self += CTK.Indenter (table)
53 self += modul
Something went wrong with that request. Please try again.