-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.idea/ | ||
statics/ | ||
|
||
test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>{% block title %}Base{% end %}</title> | ||
<link rel="shortcut icon" href="{{ static_url('images/favicon.ico') }}"> | ||
</head> | ||
|
||
<body> | ||
{% block body %} this is tornado{% end %} | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block title %}explore page{% end %} | ||
|
||
|
||
{% block body %} | ||
explore page | ||
{% end %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block title %}index page{% end %} | ||
|
||
|
||
{% block body %} | ||
index | ||
{% end %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block title %}post page{% end %} | ||
|
||
|
||
{% block body %} | ||
post id {{ post_id }} | ||
{% end %} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
def ui_methods1(self): | ||
return 'methods 1' | ||
|
||
|
||
def ui_methods2(self): | ||
return 'methods 2' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from tornado.web import UIModule | ||
|
||
|
||
class UiModule(UIModule): | ||
def render(self, *args, **kwargs): | ||
return 'I am ui module' | ||
|
||
|
||
class Advertisement(UIModule): | ||
def render(self, *args, **kwargs): | ||
s = 'hello world' | ||
return self.render_string('06ad.html', up_string=self.upper(s)) | ||
|
||
def css_files(self): | ||
return "/static/css/King_Chance_Layer7.css" | ||
|
||
def javascript_files(self): | ||
return [ | ||
"/static/js/jquery_1_7.js", | ||
"/static/js/King_Chance_Layer.js", | ||
"/static/js/King_layer_test.js", ] | ||
|
||
def upper(self, word): | ||
return word.upper() |