Commits

zerodx  committed b928c1d

Added favicon and database scheme.

  • Participants
  • Parent commits e4746a0

Comments (0)

Files changed (5)

 api_version: 1
 
 handlers:
+- url: /icon.png
+  static_files: static/icon.png
+  upload: static/icon.png
+
 - url: /style
   static_dir: style
   
+
+from google.appengine.ext import db
+from google.appengine.ext.db import polymodel
+
+class Thread(db.Model):
+    title = db.StringProperty()
+    tags = db.ListProperty(db.Category)
+
+class Content(polymodel.PolyModel):
+    thread = db.ReferenceProperty(Thread)
+    author = db.UserProperty(required = True)
+    created = db.DateTimeProperty(auto_now_add = True)
+    edited = db.DateTimeProperty(auto_now = True)
+    distinctVisibility = db.BooleanProperty(default = False)
+
+class Link(Content):
+    title = db.StringProperty()
+    url = db.LinkProperty(required = True)
+    description = db.TextProperty()
+    icon = db.BlobProperty(default = None)
+    
+    def __repr__(self):
+        try:
+            r = (str(self.title) if self.title else str(self.url))
+            r = (r[:80] + '...' if len(r) > 80 else r)
+            return r
+        except:
+            return '#'*5 + ' ' + str(self.url)
 start = time()
 
 from flask import Flask
+
+from database import Thread, Content, Link
+
 app = Flask(__name__)
 
 from google.appengine.ext import db

File static/icon.png

Added
New image

File templates/main.html

     <meta charset="utf-8" /> 
     <title>zrdxer</title>
     <link href="/style/style.css" rel="stylesheet" type="text/css" media="screen, projection"  />
-    <link rel="shortcut icon" href="favicon.png" type="image/ico" />
+    <link rel="shortcut icon" href="icon.png" type="image/ico" />
 </head> 
 <body>
     <header>