Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 617:edd210915e64
Alternate email addresses are now available for users.
See the MIGRATION file for info on how to activate the feature.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 15 Feb 2002 07:08:45 +0000 |
| parents | dce4c75bef5a |
| children | bb52c1419b4c |
comparison
equal
deleted
inserted
replaced
| 616:08abec25b2c6 | 617:edd210915e64 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: dbinit.py,v 1.14 2002-01-14 02:20:15 richard Exp $ | 18 # $Id: dbinit.py,v 1.15 2002-02-15 07:08:44 richard Exp $ |
| 19 | 19 |
| 20 import os | 20 import os |
| 21 | 21 |
| 22 import instance_config | 22 import instance_config |
| 23 from roundup import roundupdb | 23 from roundup import roundupdb |
| 61 keyword.setkey("name") | 61 keyword.setkey("name") |
| 62 | 62 |
| 63 user = Class(db, "user", | 63 user = Class(db, "user", |
| 64 username=String(), password=Password(), | 64 username=String(), password=Password(), |
| 65 address=String(), realname=String(), | 65 address=String(), realname=String(), |
| 66 phone=String(), organisation=String()) | 66 phone=String(), organisation=String(), |
| 67 alternate_addresses=String()) | |
| 67 user.setkey("username") | 68 user.setkey("username") |
| 68 | 69 |
| 69 msg = FileClass(db, "msg", | 70 msg = FileClass(db, "msg", |
| 70 author=Link("user"), recipients=Multilink("user"), | 71 author=Link("user"), recipients=Multilink("user"), |
| 71 date=Date(), summary=String(), | 72 date=Date(), summary=String(), |
| 120 address=instance_config.ADMIN_EMAIL) | 121 address=instance_config.ADMIN_EMAIL) |
| 121 db.commit() | 122 db.commit() |
| 122 | 123 |
| 123 # | 124 # |
| 124 # $Log: not supported by cvs2svn $ | 125 # $Log: not supported by cvs2svn $ |
| 126 # Revision 1.14 2002/01/14 02:20:15 richard | |
| 127 # . changed all config accesses so they access either the instance or the | |
| 128 # config attriubute on the db. This means that all config is obtained from | |
| 129 # instance_config instead of the mish-mash of classes. This will make | |
| 130 # switching to a ConfigParser setup easier too, I hope. | |
| 131 # | |
| 132 # At a minimum, this makes migration a _little_ easier (a lot easier in the | |
| 133 # 0.5.0 switch, I hope!) | |
| 134 # | |
| 125 # Revision 1.13 2002/01/02 02:31:38 richard | 135 # Revision 1.13 2002/01/02 02:31:38 richard |
| 126 # Sorry for the huge checkin message - I was only intending to implement #496356 | 136 # Sorry for the huge checkin message - I was only intending to implement #496356 |
| 127 # but I found a number of places where things had been broken by transactions: | 137 # but I found a number of places where things had been broken by transactions: |
| 128 # . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename | 138 # . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename |
| 129 # for _all_ roundup-generated smtp messages to be sent to. | 139 # for _all_ roundup-generated smtp messages to be sent to. |
