Ticket #1401 (closed defect: worksforme)
[PATCH] tg-admin sql does not work on a deployed egg
| Reported by: | aji | Owned by: | anonymous |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5 |
| Component: | tg-admin (non-toolbox) | Version: | 1.0.2 |
| Severity: | normal | Keywords: | sql |
| Cc: |
Description
Running tg-admin to create a new database for a deployed project fails. The following command generates either an error about setup.py or a request to let tg-admin fix the missing project.
tg-admin --config=/full/path/to/someconfig.cfg --egg=someproject sql create
The attached patch uses turbogears.util.get_project_name() to get the eggname; if it cannot, then it proceeds with the original code, which checks for the development directory structure.
Attachments
Change History
Changed 5 years ago by aji
-
attachment
base.py.patch
added
comment:1 Changed 5 years ago by Chris Arndt
- Milestone changed from 1.0.3 to 1.0.4
Batch promoting 1.0.3 tickets to Milestone 1.0.4
comment:2 Changed 4 years ago by faide
- Milestone changed from 1.0.4 to 1.1
This patch concerns a branch of code when "--egg" is _not_ in the command line. But the explanation going with it states that it fixes an error regarding a command line that _contains_ the "--egg" parameter...
What should we do here. Last time I checked creation of a db from tg-admin worked quite well with an application installed as an egg. (TurboBlog? uses this method)
Patch for turbogears/command/base.py