Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Penguidom
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
domotika
Penguidom
Commits
2308deed
Commit
2308deed
authored
7 years ago
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Template loading for GUI
parent
6af34a25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
web.py
penguidom/web/web.py
+15
-1
No files found.
penguidom/web/web.py
View file @
2308deed
...
...
@@ -47,7 +47,7 @@ log = logging.getLogger( 'Webgui' )
curdir
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]))
LOGINFILE
=
os
.
path
.
normpath
(
"/"
.
join
([
curdir
,
'Web/resources/login.html'
]))
GUIFILE
=
os
.
path
.
normpath
(
"/"
.
join
([
curdir
,
'Web/resources/page.html'
]))
from
common
import
uni
,
GzipRequest
,
StaticFile
,
codeOk
,
permissionDenied
,
RedirectToHome
,
neededPermission
import
ajax
...
...
@@ -101,10 +101,24 @@ class BasePage(rend.Page):
return
permissionDenied
()
class
GuiPage
(
BasePage
):
addSlash
=
True
html
=
"""<html><head></head><body><div>Cannot find GuiPage template files</div></body></html>"""
def
__init__
(
self
,
avatarid
):
self
.
avatarId
=
avatarid
super
(
GuiPage
,
self
)
.
__init__
(
self
)
if
os
.
path
.
isfile
(
GUIFILE
):
try
:
lf
=
open
(
GUIFILE
,
"r"
)
self
.
html
=
lf
.
read
()
lf
.
close
()
except
:
pass
def
renderHTTP
(
self
,
ctx
):
request
=
inevow
.
IRequest
(
ctx
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment