Created
August 18, 2012 11:51
-
-
Save halit/3386356 to your computer and use it in GitHub Desktop.
My Elixir Model
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
from elixir import * | |
# veritabani seciliyor | |
metadata.bind = "sqlite:///siteler.db" | |
# sql sorgusu ekrana basiliyor | |
metadata.bind.echo = False | |
class Siteler(Entity): | |
# baslik kolonu 30 karakter siniriyla | |
baslik = Field(Unicode(30)) | |
# site kolonu | |
site = Field(Unicode) | |
# aciklama kolonu | |
aciklama = Field(UnicodeText) | |
# geri donus | |
def __repr__(self): | |
return "<Site '%s' (%s) - %s" %(self.baslik, self.site, self.aciklama) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment