Changeset 2108
- Timestamp:
- 07/06/10 20:14:11 (19 months ago)
- Location:
- trunk/loreality
- Files:
-
- 3 added
- 5 edited
-
development.db (modified) (previous)
-
loreality/controllers/messager.py (added)
-
loreality/model/databases.py (modified) (2 diffs)
-
loreality/public/style.css (modified) (1 diff)
-
loreality/templates/component/navigation.html (modified) (1 diff)
-
loreality/templates/derived/page/messager.html (added)
-
loreality/tests/functional/test_messager.py (added)
-
loreality/websetup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/loreality/loreality/model/databases.py
r2106 r2108 90 90 self.name = name 91 91 #---------------------------------------------------------------- 92 class Message(Base): 93 __tablename__ = 'messages' 94 id = sa.Column(UUID(), primary_key=True,default=uuid.uuid4) 95 title = sa.Column(sa.types.String, nullable=False) 96 from_ = sa.Column(sa.types.String) 97 text = sa.Column(sa.types.String) 98 date = sa.Column(sa.types.String) 99 pilot_id = sa.Column(UUID(), ForeignKey('pilots.id')) 100 #---------------------------------------------------------------- 92 101 class Pilot(Base): 93 102 __tablename__ = 'pilots' … … 97 106 squadron_id = sa.Column(UUID(), ForeignKey('squadrons.id')) 98 107 108 messages = orm.relation("Message", backref="pilot") 99 109 100 110 def __init__( self, name, login ): -
trunk/loreality/loreality/public/style.css
r2105 r2108 55 55 font-size: small; 56 56 } 57 58 /* MESSAGER */ 59 .message, .from, .title, .date{ 60 width: 80%; 61 display: inline; 62 border: solid black 1px; 63 background: #AAAAAA; 64 } 65 .date{ 66 width: 20%; 67 } 68 .from{ 69 width: 30%; 70 } 71 .title{ 72 width: 50%; 73 } -
trunk/loreality/loreality/templates/component/navigation.html
r2104 r2108 15 15 <li> <a href=${h.url_for(controller='squadron', action='index')}>Squadrons</a> </li> 16 16 <li> <a href=${h.url_for(controller='pilot', action='index')}>Pilots</a> </li> 17 <li> <a href=${h.url_for(controller='messager', action='index')}>Messager</a> </li> 17 18 % endif 18 19 </ul> -
trunk/loreality/loreality/websetup.py
r2104 r2108 56 56 squ.pilots.append( pil ) 57 57 58 msg = Message() 59 msg.from_ = "Tolteque" 60 msg.date = "23/12/2010" 61 msg.title = "Info" 62 msg.text = """ 63 C'est super 64 """ 65 meta.Session.add( msg ) 66 pil.messages.append( msg ) 67 58 68 pil = Pilot("Tolteque", "Tolteque") 59 69 meta.Session.add( pil )
Note: See TracChangeset
for help on using the changeset viewer.
